mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-12-12 19:18:28 +02:00
bug fix: normalize colors
This commit is contained in:
parent
1ac9c771f7
commit
e85a07aad9
@ -387,9 +387,9 @@ _p9k_get_icon() {
|
|||||||
|
|
||||||
_p9k_translate_color() {
|
_p9k_translate_color() {
|
||||||
if [[ $1 == <-> ]]; then # decimal color code: 255
|
if [[ $1 == <-> ]]; then # decimal color code: 255
|
||||||
_p9k_ret=$1
|
_p9k_ret=${(l.3..0.)1}
|
||||||
elif [[ $1 == '#'[[:xdigit:]]## ]]; then # hexademical color code: #ffffff
|
elif [[ $1 == '#'[[:xdigit:]]## ]]; then # hexademical color code: #ffffff
|
||||||
_p9k_ret=$1
|
_p9k_ret=${(L)1}
|
||||||
else # named color: red
|
else # named color: red
|
||||||
# Strip prifixes if there are any.
|
# Strip prifixes if there are any.
|
||||||
_p9k_ret=$__p9k_colors[${${${1#bg-}#fg-}#br}]
|
_p9k_ret=$__p9k_colors[${${${1#bg-}#fg-}#br}]
|
||||||
|
Loading…
Reference in New Issue
Block a user