Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

terminal-colors

GitHub last commit GitHub stars License Shell

A quick reference for ANSI colors and text formatting in the terminal.


Setup

git clone https://github.com/AFaria20s/terminal-colors.git
cd terminal-colors
bash setup.sh
source ~/.zshrc  # or ~/.bashrc

Then just type:

colors

Manual usage

If you prefer to set it up yourself:

cp colors.sh ~/.colors.sh
echo "alias colors='bash ~/.colors.sh'" >> ~/.zshrc
source ~/.zshrc

What it shows

  • Text formatting — bold, dim, italic, underline, blink, reverse, strikethrough
  • Foreground colors — normal and bright variants
  • Background colors — normal and bright variants

Each entry is rendered with its own escape code, so you see exactly what you get.


256 colors and truecolor

Not in the script since there are hundreds of values, but the syntax is simple:

echo -e "\033[38;5;208m  fg 256  \033[0m"   # 256 fg (0–255)
echo -e "\033[48;5;208m  bg 256  \033[0m"   # 256 bg (0–255)

echo -e "\033[38;2;255;100;0m  fg rgb  \033[0m"   # truecolor fg
echo -e "\033[48;2;255;100;0m  bg rgb  \033[0m"   # truecolor bg

License

MIT

About

ANSI color and formatting reference for the terminal

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages