echo_rgb better color compatability
This commit is contained in:
parent
d7027a2d28
commit
f6fe8786c3
@ -93,10 +93,10 @@ echo_rgb() {
|
|||||||
if [ -n "${5}" ]; then
|
if [ -n "${5}" ]; then
|
||||||
[[ -z "${6}" ]] && echo "A value must be passed for bg_green" && return 1
|
[[ -z "${6}" ]] && echo "A value must be passed for bg_green" && return 1
|
||||||
[[ -z "${7}" ]] && echo "A value must be passed for bg_blue" && return 1
|
[[ -z "${7}" ]] && echo "A value must be passed for bg_blue" && return 1
|
||||||
printf "\033[38;2;%s;%s;%s;48;2;%s;%s;%sm%s\e[m\n" \
|
printf "\033[38;2;%s;%s;%s;48;2;%s;%s;%sm%s\033[m\n" \
|
||||||
"${red}" "${green}" "${blue}" "${bg_red}" "${bg_green}" "${bg_blue}" "${input}"
|
"${red}" "${green}" "${blue}" "${bg_red}" "${bg_green}" "${bg_blue}" "${input}"
|
||||||
else
|
else
|
||||||
printf "\033[0;38;2;%s;%s;%sm%s\e[m\n" "${red}" "${green}" "${blue}" "${input}"
|
printf "\033[0;38;2;%s;%s;%sm%s\033[m\n" "${red}" "${green}" "${blue}" "${input}"
|
||||||
fi
|
fi
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user