From 711f31438b544ffa0dd5a565ec1446bb5d0c892e Mon Sep 17 00:00:00 2001 From: SkwalExe Date: Mon, 5 Aug 2024 19:50:07 +0200 Subject: [PATCH] Add truecolor test script --- test-truecolor.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 test-truecolor.sh diff --git a/test-truecolor.sh b/test-truecolor.sh new file mode 100755 index 0000000..f52dea3 --- /dev/null +++ b/test-truecolor.sh @@ -0,0 +1,13 @@ +#!/usr/bin/bash +awk -v term_cols="${width:-$(tput cols || echo 80)}" 'BEGIN{ + 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("||",colnum%2+1,1); + } + printf "\n"; +}'