jgm / skylighting

A Haskell syntax highlighting library with tokenizers derived from KDE syntax highlighting descriptions
189 stars 61 forks source link

KDE theme parser fails on ARGB values #178

Closed MangoIV closed 8 months ago

MangoIV commented 8 months ago

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

jgm commented 8 months ago

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

MangoIV commented 8 months 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 8 months ago

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