zellij-org / zellij

A terminal workspace with batteries included
https://zellij.dev
MIT License
20.54k stars 637 forks source link

Theme Hue no longer calulcated #2428

Closed patrickpichler closed 1 year ago

patrickpichler commented 1 year ago

It seems like the theme hue is no longer calculated. This causes light themes such as catppuccin-latte to be nearly impossible to use, as the contrast of some text is too low.

After some investigation I figured out that detect_theme_hue [1] is no longer being called when deserializing themes. This causes all themes to be initialized with the default value of ThemeHue, which is Dark.

[1] https://github.com/zellij-org/zellij/blob/ecd63a100b9d927d78c64cda73bae5ec16cac419/zellij-utils/src/shared.rs#L115

Basic information zellij --version: zellij 0.36.0 stty size: 26 127 uname -av or ver(Windows): Linux patrick-laptop 6.3.1-arch1-1 #1 SMP PREEMPT_DYNAMIC Mon, 01 May 2023 17:42:39 +0000 x86_64 GNU/Linux alacritty --version: alacritty 0.12.0 (5a728195)

Further information Install catppuccin-latte theme, run zellij

patrickpichler commented 1 year ago

After some more debugging and re-adding the theme_hue computation, I noticed that the black and white colors in the palette are mixed up.

patrickpichler commented 1 year ago

Ok the issue was caused by the builtin catppuccin-latte theme overlaying the values defined in the themes folder. From a user perspective this is a bit counter intuitive. It would be nice, if themes from the themes folder have a higher precedence over builtin ones.

patrickpichler commented 1 year ago

As discussed with @imsnif I will close this issue. The problem will be addresses by #2297