This commit is contained in:
2025-10-18 21:22:50 +02:00
parent 98fe49368b
commit 99b998402f
2 changed files with 16 additions and 9 deletions

View File

@@ -1,4 +1,4 @@
# snippet to parse args in apply-color scripts
# snippet for apply-color scripts
[ -z "$1" ] && exit 1
palette="$1"
@@ -22,7 +22,8 @@ function color_ansi {
local g=$((16#${colorHex:2:2}))
local b=$((16#${colorHex:4:2}))
echo "\033[38;2;${r};${g};${b}m"
# 24-bit true color ANSI escape code
printf "\033[38;2;%d;%d;%dm" $r $g $b
}