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

ANSI 24-bit RGB foreground color codes don't display correctly when close to the background color #17082

Closed
nora2605 opened this issue Apr 18, 2024 · 4 comments
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Attention The core contributors need to come back around and look at this ASAP. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting

Comments

@nora2605
Copy link

Windows Terminal version

1.19.10821.0

Windows build number

10.0.26100.1

Other Software

No response

Steps to reproduce

  1. echo an ANSI escape sequence like \u{001b}[38;2;255;255;255m (rgb: 255, 255, 255) for the foreground color and \u{001b}[48;2;0;255;0m (rgb: 0, 255, 0) for the background color (can be put together into one sequence) and some text to go after it
  2. for some specific color values close enough to each other in brightness (?), setting both foreground and background changes the colors. This does not happen when the fore-/background color sequences are alone; but it does happen if there is text between them.
    grafik

Expected Behavior

The colors should be shown accurately when specified like this.
The conhost.exe does this correctly.
grafik

Actual Behavior

The foreground color will be way darker or way brighter than expected depending if the background has reached a calculated brightness threshold.

@nora2605 nora2605 added Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Apr 18, 2024

This comment was marked as off-topic.

@DHowett
Copy link
Member

DHowett commented Apr 18, 2024

Thanks for filing! Are you using the “adjust the lightness of indistinguishable colors” setting? It’s on the profile appearance page.

@DHowett DHowett added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Apr 18, 2024
@nora2605
Copy link
Author

I can't believe I didn't see that option the first time.
Thank you!

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Apr 18, 2024
@DHowett
Copy link
Member

DHowett commented Apr 18, 2024

Sure thing! Thanks for following up :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Attention The core contributors need to come back around and look at this ASAP. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting
Projects
None yet
Development

No branches or pull requests

2 participants