Roman Ožana 5d014b915c Update colors.sh
Fix typo
2023-04-11 15:22:38 +02:00
2023-04-05 18:06:09 +02:00
2023-04-05 17:57:04 +02:00
2023-04-11 15:22:38 +02:00
2023-04-05 17:50:56 +02:00
2023-04-05 17:57:55 +02:00

colors.sh

Write colored text to the terminal easily.

Color palette

Installation

Download colors.sh and source it in your script or copy/paste the functions and variables into your script.

Usage

source colors.sh

# with colors.sh sourced, you can use the constants
echo "${RED}This is red text${NC}"

# or you can use the functions
echo $(gray "[INFO] " && green "This is green test")

Functions

  • gray - for gray
  • light_gray - for light gray
  • yellow - for yellow
  • light_yellow - for light yellow
  • green - for green
  • light_green - for light green
  • red - for red
  • ligt_red - for ligt red
  • blue - for blue
  • light_blue - for light blue
  • magenta - for magenta
  • light_magenta - for light magenta
  • cyan - for cyan
  • white - for white
  • black - for black
  • bold - for bold
  • underline - for underline
  • blink - for blink text
  • nc - for no colors (reset)

Contants

  • GRAY - for gray
  • LIGHT_GRAY - for light_gray
  • YELLOW - for yellow
  • LIGHT_YELLOW - for light yellow
  • GREEN - for green
  • LIGHT_GREEN - for light green
  • RED - for red
  • LIGHT_RED - for light red
  • BLUE - for blue
  • LIGHT_BLUE - for light blue
  • MAGENTA - for magenta
  • LIGHT_MAGENTA - for light magenta
  • CYAN - for cyan
  • WHITE - for white
  • BLACK - for black
  • BOLD - for bold
  • UNDERLINE - for underline
  • BLINK - for blink
  • NC - for no colors (reset)

License

MIT

Description
Simple colors for your shell scripts
Readme MIT 567 KiB
Languages
Shell 100%