From 8fc2e237734ff7a868d77c118619e44a6d7bde02 Mon Sep 17 00:00:00 2001 From: The Magician Date: Tue, 7 Nov 2023 12:59:59 +0000 Subject: [PATCH] Add section on concealment --- thebookofcolors | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/thebookofcolors b/thebookofcolors index 5ec248d..429a387 100755 --- a/thebookofcolors +++ b/thebookofcolors @@ -401,7 +401,26 @@ section_inverse() { section_conceal() { title "Code 8; Conceal, or Hide" - printf "TODO\n" + printf "Code 8 causes text to be hidden from view.\n" + printf "This appears to be achieved by setting the foreground color to be equal to the background color, thus rendering the text illegible.\n" + newline + + subtitle "Examples of Concealed Text" + printf "Here are four instances of the text \"THIS TEXT IS HIDDEN\", displayed on both the default background color and a cyan background.\n" + printf "The second of each pair has code 8 enabled to cause the text to be hidden.\n" + newline + + printf "THIS TEXT IS HIDDEN\n" + printf "\e[8mTHIS TEXT IS HIDDEN\e[0m\n" + + printf "\e[46mTHIS TEXT IS HIDDEN\e[0m\n" + printf "\e[8;46mTHIS TEXT IS HIDDEN\e[0m\n" + newline + + printf "Please note that using this code to hide text is NOT a security feature.\n" + printf "You will observe that, if using a pager such as \`less\` to view this text, you will still be able to find all instances of the text using the search function.\n" + printf "Likewise, if output from a program which uses this code is redirected to a file, then the \"concealed\" text will be visible in that file.\n" + printf "It is NOT SAFE to output sensitive information, such as passwords or API keys, using this code.\n" } section_strikethrough() {