From 4c1931dffd3c53a07cb4f42f79c87f6a37d026df Mon Sep 17 00:00:00 2001 From: Ilan Cosman Date: Tue, 7 Dec 2021 22:01:39 -0800 Subject: [PATCH] Add color swatch script --- tools/swatch.fish | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tools/swatch.fish diff --git a/tools/swatch.fish b/tools/swatch.fish new file mode 100644 index 0000000..ba999d2 --- /dev/null +++ b/tools/swatch.fish @@ -0,0 +1,12 @@ +set -l height_in_lines 2 + +set -l width_in_chars (math --scale=0 $height_in_lines x 2.5) # 2.5 = ratio + +for arg in $argv + for i in (seq $height_in_lines) + set_color -b $arg + string repeat --no-newline --count $width_in_chars ' ' + set_color normal + echo + end +end