From a78187b435db96c5febb4eb4ba17a461be3c5c06 Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Fri, 22 Oct 2021 18:27:21 +0200 Subject: [PATCH] add another script to dump colors in a different order --- sh/colors2 | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 sh/colors2 diff --git a/sh/colors2 b/sh/colors2 new file mode 100644 index 0000000..fed9394 --- /dev/null +++ b/sh/colors2 @@ -0,0 +1,22 @@ +#!/usr/bin/env bash +# YES_ZSH +# YES_BASH +# YES_DASH +# YES_ASH + +colors2() { + [ $# -eq 0 ] || { printf "%s\n" "$0: does not take arguments" >&2; return 1; } + for a in 0 60; do + for b in 0 60; do + for i in 30 31 33 32 36 34 35 37; do + for j in 40 41 43 42 46 44 45 47; do + printf ' \033[%s;%sm %03d \033[m' $((a+j)) $((b+i)) $((a+j)) + done + printf '\n' + done + done + [ $a = 0 ] && printf '\n' + done +} + +[ -n "${preload+-}" ] || colors2 "$@"