Simple colors for your bash scripts
example | ||
colors.png | ||
colors.sh | ||
LICENSE | ||
readme.md |
colors.sh
Write colored text to the terminal easily.
![Color palette](colors.png)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 graylight_gray
- for light grayyellow
- for yellowlight_yellow
- for light yellowgreen
- for greenlight_green
- for light greenred
- for redligt_red
- for ligt redblue
- for bluelight_blue
- for light bluemagenta
- for magentalight_magenta
- for light magentacyan
- for cyanwhite
- for whiteblack
- for blackbold
- for boldunderline
- for underlineblink
- for blink textnc
- for no colors (reset)
Contants
GRAY
- for grayLIGHT_GRAY
- for light_grayYELLOW
- for yellowLIGHT_YELLOW
- for light yellowGREEN
- for greenLIGHT_GREEN
- for light greenRED
- for redLIGHT_RED
- for light redBLUE
- for blueLIGHT_BLUE
- for light blueMAGENTA
- for magentaLIGHT_MAGENTA
- for light magentaCYAN
- for cyanWHITE
- for whiteBLACK
- for blackBOLD
- for boldUNDERLINE
- for underlineBLINK
- for blinkNC
- for no colors (reset)