danth / stylix

System-wide colorscheming and typography for NixOS
https://stylix.danth.me/
MIT License
902 stars 105 forks source link

Terminal Colors Issue #451

Closed UnknownHiker closed 11 hours ago

UnknownHiker commented 6 days ago

When typing a variable e.g. $HOME, the color is almost same like background, no matter which theme i use. Only when the Variable is fully typed and gets recognized, it will turn red. Tried a light or dark variation of catppucccin base16. Also having the same issue in nvim-neotree, when opening the popup to create a new file. Cant read the heading in the popup there.

Id like to understand which base color gets assigned to which of those, so i know which one i could change to get a better result.

Screenshot_20240625_001048 Screenshot_20240625_001355

This is what ends up in kitty configuration:

background #24273a
foreground #cad3f5
selection_background #cad3f5
selection_foreground #24273a
url_color #939ab7
cursor #cad3f5
active_border_color #8087a2
inactive_border_color #1e2030
active_tab_background #24273a
active_tab_foreground #cad3f5
inactive_tab_background #1e2030
inactive_tab_foreground #939ab7
tab_bar_background #1e2030

# normal
color0 #24273a
color1 #ed8796
color2 #a6da95
color3 #eed49f
color4 #8aadf4
color5 #c6a0f6
color6 #8bd5ca
color7 #cad3f5

# bright
color8 #8087a2
color9 #f5a97f
color10 #1e2030
color11 #6e738d
color12 #939ab7
color13 #f4dbd6
color14 #f0c6c6
color15 #b7bdf8

And here what i specified in Stylix

 stylix.base16Scheme = {
    base00 = "24273a"; # base
    base01 = "1e2030"; # mantle
    base02 = "363a4f"; # surface0
    base03 = "494d64"; # surface1
    base04 = "5b6078"; # surface2
    base05 = "cad3f5"; # text
    base06 = "f4dbd6"; # rosewater
    base07 = "b7bdf8"; # lavender
    base08 = "ed8796"; # red
    base09 = "f5a97f"; # peach
    base0A = "eed49f"; # yellow
    base0B = "a6da95"; # green
    base0C = "8bd5ca"; # teal
    base0D = "8aadf4"; # blue
    base0E = "c6a0f6"; # mauve
    base0F = "f0c6c6"; # flamingo
  };

So it seems there are some colors which i havent specified, so there might be some issue on applying the colors?

trueNAHO commented 4 days ago

Cant read the heading in the popup there.

In the future, https://github.com/danth/stylix/issues/249 should resolve such inconsistencies.

Id like to understand which base color gets assigned to which of those, so i know which one i could change to get a better result.

The theme is generated based on https://github.com/kdrag0n/base16-kitty:

https://github.com/danth/stylix/blob/7cdbd128172d7c4ec63f5073d49da5d0e7d6396c/modules/kitty/hm.nix#L13-L20

UnknownHiker commented 4 days ago

@trueNAHO Sounds good, going to try using the 256-Option for kitty as a workaround for now :)

UnknownHiker commented 4 days ago

For some reason enabling stylix.targets.kitty.variant256Colors = true; within home-manager doesnt change anything....

danth commented 4 days ago

This may be related to the specific program you're running in addition to the terminal itself, since programs can choose their own default colors which may not necessarily match the theme

niksingh710 commented 22 hours ago

stylix colors the terminal application. That requires an application restart to get the colors.

Whereas other programs like pywal used to generate a sequence file, where we do cat ~/file/path/of/sequence and it changes the terminal color.

e.g of sequence

UnknownHiker commented 11 hours ago

I tried installing the usual Catppuccin Theme for Kitty and disabled Stylix for kitty however. Variables are still quite dark but readable. But the Popup in Neotree is still too dark, but i guess that means its not caused by Stylix in that case, so id close this. Thanks for your input, everyone :)