Simple colors for your bash scripts
Go to file
Roman Ožana b78b368913 Colors
2023-10-31 15:54:11 +01:00
example Colors 2023-10-31 15:54:11 +01:00
colors.png Colors 2023-04-05 17:57:04 +02:00
colors.sh Colors 2023-10-31 15:54:11 +01:00
LICENSE First commit 2023-04-05 17:50:56 +02:00
readme.md Remove functions 2023-10-30 15:51:36 +01: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.

curl -O https://raw.githubusercontent.com/OzzyCzech/colors.sh/master/colors.sh

Usage

source colors.sh

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

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