colors.sh/colors.sh

48 lines
1.0 KiB
Bash

#!/usr/bin/env bash
# This script is used to define colors for bash scripts
# Git: https://git.a2s.su/iiiypuk/colors.sh
# Author: Alexander Popov
# License: MIT
# Update: 28 Mar 2024
# Usage:
#
# source colors.sh
# echo -e "This is ${RED}red text${NC}"
# Black and white
export BLACK='\033[0;30m'
export WHITE='\033[0;37m'
export GRAY='\033[0;90m'
export NC='\033[0m' # reset color
# Basic colors
export RED='\033[0;31m'
export GREEN='\033[0;32m'
export BLUE='\033[0;34m'
export YELLOW='\033[0;33m'
export MAGENTA='\033[0;35m'
export CYAN='\033[0;36m'
# Bright colors
export BRIGHT_RED='\033[0;91m'
export BRIGHT_GREEN='\033[0;92m'
export BRIGHT_BLUE='\033[0;94m'
export BRIGHT_YELLOW='\033[0;93m'
export BRIGHT_MAGENTA='\033[0;95m'
export BRIGHT_CYAN='\033[0;96m'
# Bold colors
export BOLD_RED='\033[1;31m'
export BOLD_GREEN='\033[1;32m'
export BOLD_BLUE='\033[1;34m'
export BOLD_YELLOW='\033[1;33m'
export BOLD_MAGENTA='\033[1;35m'
export BOLD_CYAN='\033[1;36m'
# Styles
export BOLD='\033[1m'
export UNDERLINE='\033[4m'
export BLINK='\033[5m'