834878ea5ee2999e221b36f00d7cde6af60592e9
colors.sh
Write colored text to the terminal easily.
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 blacknc- 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)
License
MIT
Languages
Shell
100%
