From b886b89f44d9dc541a0f5c0569ff546ecdf483a7 Mon Sep 17 00:00:00 2001 From: Liam Galvin Date: Mon, 22 Oct 2018 11:10:43 +0100 Subject: [PATCH] Add true colour test script --- demo/true.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 demo/true.sh diff --git a/demo/true.sh b/demo/true.sh new file mode 100755 index 0000000..92d9e45 --- /dev/null +++ b/demo/true.sh @@ -0,0 +1,19 @@ + +#!/bin/bash + +awk -v term_cols="${width:-$(tput cols || echo 80)}" 'BEGIN{ + + + s=" "; + for (colnum = 0; colnum255) g = 510-g; + printf "\033[48;2;%d;%d;%dm", r,g,b; + printf "\033[38;2;%d;%d;%dm", 255-r,255-g,255-b; + printf "%s\033[0m", substr(s,colnum%2+1,1); + } + printf "\n"; + + }'