This commit is contained in:
Mylloon 2024-10-06 20:41:05 +02:00
parent a3ed69f858
commit 7f22c025ab
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -19,10 +19,12 @@ function latex-color --description "Get the LaTeX color from HEX code"
end
# Expand 3 hex to 4 hex
# TODO
# Expand 3 hex to 8 hex
if test (string length $hex) -eq 3
set hex $(string join "" $hex 0)
end
# Expand 4 hex to 8 hex
if test (string length $hex) -eq 4
set hex "$(string replace -ar '(.)' '$1$1' $hex)00"
end