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

Colour schemes: Foreground and background "black" are not the same in the terminal #24961

Open
ghost opened this issue Aug 24, 2024 · 2 comments

Comments

@ghost
Copy link

ghost commented Aug 24, 2024

@oskar-skog raises an interesting observation in #24955

The foreground and background "black" colour are not the same.

From their screenshot:
image

However, this does not happen in Base16 Dark colour scheme:

image

But it does happen in many other colour schemes, including for example, the default one, as well as Monokai:

image

Is this expected behaviour?

@nico
Copy link
Contributor

nico commented Aug 24, 2024

In Terminal.app's built-in "Silver Aerogel", the text is visible too:

image

(In most themes, it isn't.)

So I suppose this isn't a reliable way to draw invisible text.

(In Serenity's Terminal, if we were to implement concealing by setting the foreground color to the background color, we'd set the foreground color to the actual background color, and this wouldn't be an issue. But it's a moot point now that we didn't implement it that way.)

@ghost
Copy link
Author

ghost commented Aug 24, 2024

Then I have to wonder: Why do so many terminal libraries implement concealed text this way?

It appears to me it wouldn't even be a matter of performance: My implementation completely ignores drawing characters, and should be much faster, and yet we see st and iTerm doing concealed text with colours 🤔

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

No branches or pull requests

1 participant