jgm / skylighting

A Haskell syntax highlighting library with tokenizers derived from KDE syntax highlighting descriptions
195 stars 63 forks source link

KDE theme parser fails on ARGB values #178

Closed MangoIV closed 1 year ago

MangoIV commented 1 year ago

in themes that specify colors in ARGB, like the latte theme from catpuccin, the json parser fails.

jgm commented 1 year ago

Can you link to the theme file and say what ARGB is?

MangoIV commented 1 year ago

This is an example line from the Catpuccin ksyntaxhighligting repo latte.theme file https://github.com/catppuccin/ksyntaxhighlighting/blob/5d1496b1f4743676800245ec773dc42460709bee/themes/latte.theme#L988

ARGB seems to be alpha + rgb, so if you want full opaque you prefix with FF and so on.

jgm commented 1 year ago

We could easily have it ignore the first two digits in this case. Adding actual support for opacity would be more involved.