Something wrong with colors #19942

Closed
opened 2026-01-31 06:58:08 +00:00 by claunia · 5 comments
Owner

Originally created by @237dmitry on GitHub (May 24, 2023).

Windows Terminal version

1.18.1421.0

Windows build number

10.0.22621

Other Software

pwsh, far

Steps to reproduce

Look at screenshots. On the left WT, on the right conhost. In the previous preview all worked as expected.

in Far.exe:
Screenshot 2023-05-24 095709

In pwsh.exe

"`n`e[48;5;23;38;5;208m  `u{e0b6}`e[48;5;208m     `e[48;5;23;38;5;208m`u{e0b4}  `e[0m`n"

Screenshot 2023-05-24 101222

Screenshot 2023-05-24 103143

Expected Behavior

The colors should be identical.

Actual Behavior

The colors in some applications started wrong after last preview update (up to 1.18.1421.0)

Originally created by @237dmitry on GitHub (May 24, 2023). ### Windows Terminal version 1.18.1421.0 ### Windows build number 10.0.22621 ### Other Software pwsh, far ### Steps to reproduce Look at screenshots. On the left WT, on the right conhost. In the previous preview all worked as expected. in Far.exe: ![Screenshot 2023-05-24 095709](https://github.com/microsoft/terminal/assets/78153320/54b7a646-c5bd-421b-bc14-9cca0f21b02c) In pwsh.exe ``` "`n`e[48;5;23;38;5;208m `u{e0b6}`e[48;5;208m `e[48;5;23;38;5;208m`u{e0b4} `e[0m`n" ``` ![Screenshot 2023-05-24 101222](https://github.com/microsoft/terminal/assets/78153320/dae9f0ae-8f41-4741-8090-08fa071990dc) ![Screenshot 2023-05-24 103143](https://github.com/microsoft/terminal/assets/78153320/dfa33349-0c7f-4aa6-a54f-654d05f3ecc3) ### Expected Behavior The colors should be identical. ### Actual Behavior The colors in some applications started wrong after last preview update (up to 1.18.1421.0)
Author
Owner

@zadjii-msft commented on GitHub (May 24, 2023):

I'd guess that this is the "automatically adjust colors" setting - Could you share your settings.json file/?

@zadjii-msft commented on GitHub (May 24, 2023): I'd guess that this is the "automatically adjust colors" setting - Could you share your [settings.json file](https://github.com/microsoft/terminal/wiki/Frequently-Asked-Questions-(FAQ)#where-can-i-find-the-settings-file)/?
Author
Owner

@lhecker commented on GitHub (May 24, 2023):

If it is the color adjustment (it probably is), it's because the new color contrasting function is more aggressive than the old one. You can see why in this comment for instance: https://github.com/microsoft/terminal/pull/15283#issuecomment-1533598464

It's mostly a coincidence that the old code didn't change the color of your powerline glyphs, because we lack a fix to avoid adjusting them, similar to how VS Code avoids it: 7a7f4f0add/src/browser/renderer/shared/RendererUtils.ts (L30-L32)

The menu in the far manager screenshot has a background color of #2a838a which is oklab(0.56 -0.1 0) and a foreground color of #ffffff which is oklab(1 0 0). The distance between the two is sqrt(0.44^2 + 0.1^2 + 0^2) which is 0.45. We currently set a minimum distance of 0.5 here: c589784b54/src/renderer/base/RenderSettings.cpp (L185)

It would be nice to make that configurable.

@lhecker commented on GitHub (May 24, 2023): If it is the color adjustment (it probably is), it's because the new color contrasting function is more aggressive than the old one. You can see why in this comment for instance: https://github.com/microsoft/terminal/pull/15283#issuecomment-1533598464 It's mostly a coincidence that the old code didn't change the color of your powerline glyphs, because we lack a fix to avoid adjusting them, similar to how VS Code avoids it: https://github.com/xtermjs/xterm.js/blob/7a7f4f0add397075e31505e3c3fc237856604cb3/src/browser/renderer/shared/RendererUtils.ts#L30-L32 The menu in the far manager screenshot has a background color of `#2a838a` which is `oklab(0.56 -0.1 0)` and a foreground color of `#ffffff` which is `oklab(1 0 0)`. The distance between the two is `sqrt(0.44^2 + 0.1^2 + 0^2)` which is 0.45. We currently set a minimum distance of 0.5 here: https://github.com/microsoft/terminal/blob/c589784b54d46187289651fa6c04c49fe05826aa/src/renderer/base/RenderSettings.cpp#L185 It would be nice to make that configurable.
Author
Owner

@zadjii-msft commented on GitHub (May 24, 2023):

It would be nice to make that configurable

which we're tracking in #14940

@zadjii-msft commented on GitHub (May 24, 2023): > It would be nice to make that configurable which we're tracking in #14940
Author
Owner

@237dmitry commented on GitHub (May 24, 2023):

Thank you for advice, I changed: "adjustIndistinguishableColors": "never", and colors was returned to normal.

@237dmitry commented on GitHub (May 24, 2023): Thank you for advice, I changed: `"adjustIndistinguishableColors": "never",` and colors was returned to normal.
Author
Owner

@zadjii-msft commented on GitHub (May 24, 2023):

Right on. That answers that!

@zadjii-msft commented on GitHub (May 24, 2023): Right on. That answers that!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#19942