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

Unicode Full Block (U+2588) missing color #3074

Open
pmmmwh opened this issue Dec 22, 2024 · 8 comments
Open

Unicode Full Block (U+2588) missing color #3074

pmmmwh opened this issue Dec 22, 2024 · 8 comments
Labels

Comments

@pmmmwh
Copy link

pmmmwh commented Dec 22, 2024

Issue

Unicode Full Block (U+2588) always renders as black, regardless if colors are set, when minimum-contrast is not 1 (default).

I think this might be related to #2117 - all the other Unicode block glyphs work fine.

Steps to reproduce

Set minimum-contrast to something higher than 1 (e.g. 1.1 / 3 as suggested in the comment in the config file).

Both of these two commands prints the character in black - not as the black set in palette 0, but just pitch black regardless.
The characters render properly when it's highlighted.

printf "\u2588\n"
printf "\033[0;37m\u2588\n"
Image

Expected behavior

First command should print the character in whatever theme's foreground color is, and second should print the block in palette color 7 (which is usually white).

@jcollie
Copy link
Collaborator

jcollie commented Dec 22, 2024

What do you have set as palette=7 in your theme/config? \033[0;37m is not "set the color to white", it's "set the color to palette color 7" which happens to be white in a "standard" palette.

@pmmmwh
Copy link
Author

pmmmwh commented Dec 22, 2024

What do you have set as palette=7 in your theme/config? \033[0;37m is not "set the color to white", it's "set the color to palette color 7" which happens to be white in a "standard" palette.

Good point! My palette 7 in the screenshot is set to #FFFFFF.

Upon further investigation, this seems to be an issue when minimum-contrast is set - as long as it's not 1. I've updated the issue description as I think this is still an issue - a setting that's supposed to make text more readable is making text harder to read.

@jcollie
Copy link
Collaborator

jcollie commented Dec 22, 2024

Oh, yeah minumum-contrast really messes with colors in unexpected ways. Enough that I think we should consider removing the setting. I'm sure that if you search GH and Discord you'll find dozens of instances where people report bugs that end up being minimum-contrast issues. I think that there's going to be a flood of similar bug reports once Ghostty goes public.

@pmmmwh
Copy link
Author

pmmmwh commented Dec 22, 2024

What's weird about this is that playing with contrast works well for all other block glyphs and U+2588 is the only one that instantly break. I guess one way to address this is to also special case box / block glyphs similar to powerline glyphs?

I think that there's going to be a flood of similar bug reports once Ghostty goes public.

For sure - I think this one would hit quite a few people, given how block glyphs are often used with powerline + stuff that prints QR Codes into the terminal, for example.

@qwerasd205
Copy link
Collaborator

This is a regression I think- we had this problem before. It's an interaction between the padding color extend and the minimum contrast. Right now, hackishly, the padding color extend sets the bg of full block cells to the fg color, so that they can be extended as expected, but they're supposed to be exempt from minimum contrast because they're "powerline-like" symbols, but I guess for some reason they're not being exempted.

@mitchellh
Copy link
Contributor

Would be helpful to see if this happens on both OpenGL and Metal renderers. Min contract is a renderer concern so may only apply to one.

@fionn
Copy link

fionn commented Dec 28, 2024

I could reproduce this on Linux, so it's not a Metal-only issue.

@cwrau
Copy link

cwrau commented Jan 29, 2025

Might this be similar?

The following prompt:

╭─  
├─    m
├─   /ho
╰─ λ vi

renders like this:

Image

See the > glyphs in the first line and before the vi

gnome-terminal renders it like this:

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants