21 lines
443 B
Bash
21 lines
443 B
Bash
#!/usr/bin/env bash
|
|
# Terminal color and formatting constants.
|
|
# Source this file; do not execute it directly.
|
|
|
|
RED='\033[0;31m'
|
|
GREEN='\033[0;32m'
|
|
YELLOW='\033[1;33m'
|
|
BLUE='\033[0;34m'
|
|
CYAN='\033[0;36m'
|
|
BOLD='\033[1m'
|
|
DIM='\033[2m'
|
|
NC='\033[0m' # No Color / Reset
|
|
|
|
# Print a colored message to stderr
|
|
# Usage: color_echo <color_var> <message>
|
|
color_echo() {
|
|
local color="$1"
|
|
local msg="$2"
|
|
printf "${color}%s${NC}\n" "$msg" >&2
|
|
}
|