Skip to content

Support terminals with light background#23

Merged
rgwood merged 1 commit intorgwood:masterfrom
mkhl:light-background
Sep 14, 2024
Merged

Support terminals with light background#23
rgwood merged 1 commit intorgwood:masterfrom
mkhl:light-background

Conversation

@mkhl
Copy link
Copy Markdown
Contributor

@mkhl mkhl commented Sep 13, 2024

In terminals with a light background, white text is very hard or even impossible to read.
This revision changes white text to "reset", which is a pseudo-color that resets to the default colors.

An alternative approach could be to use https://github.com/Canop/terminal-light to check the terminal background luma and determine a suitable default text color from that,
but since we're not styling the terminal background the reset approach seemed more straightforward.

In terminals with a light background, white text is very hard or even impossible to read.
This revision changes white text to "reset", which is a pseudo-color that resets to the default colors.

An alternative approach could be to use https://github.com/Canop/terminal-light to check the terminal background luma and determine a suitable default text color from that,
but since we're not styling the terminal background the reset approach seemed more straightforward.
@rgwood
Copy link
Copy Markdown
Owner

rgwood commented Sep 13, 2024

Thanks for the contribution! This sounds good, I’ll review the PR when I have time this weekend.

Copy link
Copy Markdown
Owner

@rgwood rgwood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the fix!

@rgwood rgwood merged commit db89a70 into rgwood:master Sep 14, 2024
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

Successfully merging this pull request may close these issues.

2 participants