Add Notes on the Names of Colors

This commit is contained in:
The Magician 2023-11-05 19:29:21 +00:00
parent b0f6e4f4c8
commit 8689d44e09
1 changed files with 21 additions and 9 deletions

View File

@ -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[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[37m Light grey\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() {