-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Colors #58
Comments
Might be because we set In general |
Nothing changes when I set |
Mhm currently the module should break, if you encounter a color from the 256 palette. The issue above might be related to the ansi-colors, where you can define 8 normal colors and 8 high intensity colors. The module currently don't differentiate between them, so this might lead to the differences in the output above. |
So I fixed a lot regarding color handling in 920d847. Does your issue still persist? |
Did you adjust your color configuration according to the changes? There are new variables. |
No, I wasn't setting those variables before, nor I was expecting that I had to set them. Shouldn't they default to the values the theme sets? |
This is what I have in the (ansi-color-names-vector (vector ,normal ,red ,green ,yellow ,blue ,magenta ,cyan ,background)) where: ;; name sRGB Gen RGB 256 16 8
(base03 (if srgb "#002b36" "#042028")) ; (0.0159 0.1265 0.1597)
(base02 (if srgb "#073642" "#0a2832")) ; (0.0394 0.1601 0.1983)
(base01 (if srgb "#586e75" "#465a61")) ; (0.2767 0.3567 0.3830)
(base00 (if srgb "#657b83" "#52676f")) ; (0.3244 0.4072 0.4385)
(base0 (if srgb "#839496" "#708183")) ; (0.4406 0.5096 0.5169)
(base1 (if srgb "#93a1a1" "#81908f")) ; (0.5060 0.5649 0.5636)
(base2 (if srgb "#eee8d5" "#e9e2cb")) ; (0.9161 0.8900 0.7978)
(base3 (if srgb "#fdf6e3" "#fcf4dc")) ; (0.9894 0.9579 0.8641)
(yellow (if srgb "#b58900" "#a57705")) ; (0.6475 0.4675 0.0235)
(orange (if srgb "#cb4b16" "#bd3612")) ; (0.7418 0.2133 0.0735)
(red (if srgb "#dc322f" "#c60007")) ; (0.7770 0.0000 0.0290)
(magenta (if srgb "#d33682" "#c61b6e")) ; (0.7774 0.1080 0.4352)
(violet (if srgb "#6c71c4" "#5859b7")) ; (0.3479 0.3514 0.7179)
(blue (if srgb "#268bd2" "#2075c7")) ; (0.1275 0.4627 0.7823)
(cyan (if srgb "#2aa198" "#259185")) ; (0.1468 0.5708 0.5250)
(green (if srgb "#859900" "#728a05")) ; (0.4498 0.5412 0.0202)
(foregrounds (list base1 base0 base00 base01))
(backgrounds (list base03 base02)) And I believe it is also relevant to point out that (background (nth 0 backgrounds))
(normal (nth 1 foregrounds)) You can have a look at the whole file here. |
TBH I'm greatly confused after moving to 'ansi-color-names-vector - seems like custom backgrounds aren't supported anymore? |
I've been attempting to fix the colors on my theme as well. Some of them don't appear to be getting picked up. Also, setting the faces, mentioned on the README, doesn't seem to have any affect whatsoever. This is how htop should be rendering the colors, when run within gnome-terminal: This is how htop renders the colors within vterm inside Emacs: The extra colors that would normally be used to indicate the CPU and RAM usage are being picked up as black, rather than gray (it might be hard to initially tell what's missing from the second photo). It's definitely not a deal breaker, but it's not working correctly. Changing the This is currently what I have:
Edit: Also, i happened to open up emacs inside of terminal, and ran |
My comments in #82 still apply. It's a massive improvement, but there are still minor problems, the biggest one being that autosuggestions provided by my shell are not readable as they are rendered with the wrong color. However, I want to stress that #82 made the difference for me, effectively making the package usable as a daily driver. What is left to be fixed are smaller details |
Could you please post the settings for your terminal, where the colors are working as expected? Thanks! |
I am attaching my Xresources, which powers my xterm. Alternatively, I use I use the |
So if you ran this code: (set-face-attribute 'vterm-color-default nil :foreground "#839496" :background "#002b36")
(set-face-attribute 'vterm-color-black nil :foreground "#073642" :background "#002b36")
(set-face-attribute 'vterm-color-red nil :foreground "#dc322f" :background "#cb4b16")
(set-face-attribute 'vterm-color-green nil :foreground "#859900" :background "#586e75")
(set-face-attribute 'vterm-color-yellow nil :foreground "#b58900" :background "#657b83")
(set-face-attribute 'vterm-color-blue nil :foreground "#268bd2" :background "#839496")
(set-face-attribute 'vterm-color-magenta nil :foreground "#d33682" :background "#6c71c4")
(set-face-attribute 'vterm-color-cyan nil :foreground "#2aa198" :background "#93a1a1")
(set-face-attribute 'vterm-color-white nil :foreground "#eee8d5" :background "#fdf6e3") the colors are still not correct? |
Exactly, the colors are still not correct. I mean, the problem with the autosuggestion is still there. |
How do you get those autosuggestions? With |
I use Thanks for looking into this |
Okay by default it chooses the black light variant for the autosuggestion, see https://github.com/zsh-users/zsh-autosuggestions/blob/43f3bc4010b2c697d2252fdd8b36a577ea125881/src/config.zsh#L10. So this is equivalent the |
I set it to 10 and it looks beautiful. |
Could you confirm that |
I am using this page as reference: https://coderwall.com/p/pb1uzq/z-shell-colors To be compared with: I think that there is still something off in the first 8 colors. For instance, color 0 and color 16 looks the same in the correct screenshot (the second), but not on mine. |
this should be the problem of solarized theme the default solarized theme for iterm2 has same problem |
That's interesting. Hence, I think that this issue can be closed! |
Thanks for teaching me about this. The variable (set-face-attribute 'vterm-color-black nil :foreground "#000000" :background "#000000") |
The following screenshot is how
ansi-term
(top left) witheterm-256colors
,vterm
(top right) andxterm
look like on my machine.Also comparing other programs, e.g.
htop
, it seems thatvterm
produces output only with (probably) 8 colors.However,
tput colors
reports the number 256, and also other scripts to print the complete palette successfully show all the colors.(I am using
zsh
, if it's relevant)Why is that?
The text was updated successfully, but these errors were encountered: