From 1ea50e600eda266745a820fa7240ea2bac0845b3 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Thu, 16 Jul 2026 15:49:15 -0700 Subject: [PATCH] Add function to check all the terminal colors of a system. --- rc_shared.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/rc_shared.sh b/rc_shared.sh index 05a2ee1..951a83f 100644 --- a/rc_shared.sh +++ b/rc_shared.sh @@ -825,6 +825,7 @@ alias exec-html="run-site" alias site-host="run-site" alias host-site="run-site" +# TBD: Move this to a different section? function git-check { dir="`pwd`" if [[ -n "$1" ]]; then @@ -858,6 +859,28 @@ function git-check { echo -e "\nDone!" } +# TBD: Move this to a different section? +function check-colors { + min=0 + max=255 + unset i + for (( i = min; i <= max; i++ )); do + tput setaf $i + printf "%03d" "$i" + tput sgr0 + if (( i < max )); then + printf " " + fi + done + printf "\n" +} +alias color-check="check-colors" +alias show-colors="check-colors" +alias test-colors="check-colors" +alias colors="check-colors" +alias term-colors="check-colors" +alias display-colors="check-colors" + ## Finalize ##