Super Tiny Colors Library
What is it?
It is an ultra-super small compact and minimalist library (done in 7 code lines) used for scripts of Bash.
How does it work?
This uses variables to set the colors, encapsulating in this way the direct use of the ANSI color codes, accomplishing quickness, consolidation and independence.
Wrapper of ANSI color codes:
-
Use of ANSI color codes:
echo -e "\e[40;38;5;82m Hello \e[30;48;5;82m World \e[0m"
Example of command execution:
-
Use of the super-tiny-colors:
git clone git@github.com:nelbren/npres.git source /usr/local/npres/lib/super-tiny-colors.bash echo -e "${nG} Hello ${Iy} World $S" echo -e "${nG} Hello ${Ig} World $S" echo -e "${nG} Hello ${Ir} World $S" echo -e "${nG} Hello ${Iw} World $S"
Example of command execution:
How do I obtain it?
- Through github (recommended):
cd /usr/local/ git clone https://github.com/nelbren/npres.git
Repository of utilities of support of management of Debian GNU/Linux.
- Through wget:
wget https://raw.githubusercontent.com/nelbren/npres/master/lib/super-tiny-colors.bash
How are the colors defined?
-
Identification of colors:
Letter Color w white m magenta b blue r red g green y yellow a gray -
Format used by the library:
Description Background color Front color Example Normal black letter Normal bright black LETTER Inverse letter black Inverse *bright color letter black Inverse bright white LETTER white
Examples:
- examples1
examples1
Example of command execution:
- examples2
examples2
Example of command execution: