From 8689d44e098f9479505cf2a3c01107a41b4d5c14 Mon Sep 17 00:00:00 2001 From: The Magician Date: Sun, 5 Nov 2023 19:29:21 +0000 Subject: [PATCH] Add Notes on the Names of Colors --- thebookofcolors | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/thebookofcolors b/thebookofcolors index 8e876e6..b32210a 100755 --- a/thebookofcolors +++ b/thebookofcolors @@ -86,20 +86,32 @@ section_regular_colors() { printf "These colors and their respective escape codes are shown in the following table:\n" newline - printf "\e[30m\\e[30m Black\e[0m\n" - printf "\e[31m\\e[31m Red\e[0m\n" - printf "\e[32m\\e[32m Green\e[0m\n" - printf "\e[33m\\e[33m Brown\e[0m\n" - printf "\e[34m\\e[34m Blue\e[0m\n" - printf "\e[35m\\e[35m Purple\e[0m\n" - printf "\e[36m\\e[36m Cyan\e[0m\n" - printf "\e[37m\\e[37m Light grey\e[0m\n" + printf "\e[30m\\e[30;47mBlack\e[0m (shown on light grey background to ensure visibility)\n" + printf "\e[31m\\e[31mRed\e[0m\n" + printf "\e[32m\\e[32mGreen\e[0m\n" + printf "\e[33m\\e[33mBrown\e[0m\n" + printf "\e[34m\\e[34mBlue\e[0m\n" + printf "\e[35m\\e[35mPurple\e[0m\n" + printf "\e[36m\\e[36mCyan\e[0m\n" + printf "\e[37m\\e[37;40mLight grey (shown on black background to ensure visibility)\e[0m\n" } section_notes_on_names() { title "Notes on the Names of Colors" - printf 'TODO\n' + printf "It's possible that the actual colors you see may not match the names of the colors printed in the tables found throughout " + thebookofcolors + printf ".\n" + printf "This is because the colors displayed for each color code are dependent on both terminal implementation and individual user configuration, whereas the different color values have hardcoded names.\n" + printf "Depending on your terminal and individual configurations, what you see may vary mildly or wildly from what " + thebookofcolors "The Book" + printf " lists as the name of each color.\n" + thebookofcolors + printf " uses the canonical color names throughout, since there's no way to know what any individual reader will see.\n" + newline + + printf "The colors chosen to be part of the standard palette may seem to be arbitrary (and arbitrarily ordered), but there is a logic to it -- after \e[30;47mblack\e[0m, \e[31mred\e[0m is first for highlighting error conditions, then \e[32mgreen\e[0m for successes, \e[33mbrown\e[0m for warnings, \e[34mblue\e[0m for information, and \e[35mpurple\e[0m and \e[36mcyan\e[0m for more obscure conditions.\n" + } section_reset() {