Skip to content
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

Some colors don't support background colors #25

Open
ridiculousfish opened this issue Jun 1, 2012 · 3 comments
Open

Some colors don't support background colors #25

ridiculousfish opened this issue Jun 1, 2012 · 3 comments

Comments

@ridiculousfish
Copy link
Member

set fish_color_autosuggestion 000000 --background FFFFFF

This should show a white background color with autosuggestions, but does not.

@floam
Copy link
Member

floam commented Jul 5, 2016

Also cannot set foreground colors for selected pager items, which is annoying as often the contrast of the colors involved causes terrible readability and need to be changed.

@floam floam added the bug Something that's not working as intended label Jul 5, 2016
@krader1961 krader1961 added enhancement and removed bug Something that's not working as intended labels Feb 11, 2017
@zanchey
Copy link
Member

zanchey commented Apr 26, 2020

As noted in #6939, fish_color_comment is also affected.

@shlemas
Copy link
Contributor

shlemas commented Nov 27, 2020

I recently wanted to play with making a terminal/fish theme based on flatwhite which is a bit of an odd theme in that it does more with background colors instead of foreground colors, and I ran into this as well. fish_color_command has the same issue, maybe all of these. I believe I traced the cause to this line which hardcodes the background color to rgb_color_t::normal():

outp.set_color(rv.resolve_spec(color, false, vars), rgb_color_t::normal());

I naively changed the second parameter to the following, making the call consistent with another usage I'd seen in the codebase:

rv.resolve_spec(color, true, vars)

The second argument (Boolean) is what causes it to parse out the --background portion of the color spec or not. That ultimately happens in the parse_color function:

rgb_color_t parse_color(const env_var_t &var, bool is_background) {

But nothing changed. It seemingly was still unable to resolve the color I was specifying. That's all I've done so far, no actual debugging or deeper digging yet. I assume the background color is hardcoded to rgb_color_t::normal() for a reason.

@faho faho changed the title autosuggestions don't support background colors? Some colors don't support background colors Jun 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants