Pad colors with zeroes
This commit is contained in:
parent
e970a021c8
commit
39fe5217c6
1 changed files with 2 additions and 1 deletions
|
@ -314,7 +314,8 @@ function foregroundColor() {
|
||||||
function getColorCode() {
|
function getColorCode() {
|
||||||
# Early exit: Check if given value is already numerical
|
# Early exit: Check if given value is already numerical
|
||||||
if [[ "$1" = <-> ]]; then
|
if [[ "$1" = <-> ]]; then
|
||||||
echo -n "$1"
|
# Pad color with zeroes
|
||||||
|
echo -n "${(l:3::0:)1}"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue