-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
Some colors are swapped in Terminal #571
Comments
Ah see, they actually shouldn't. Windows does colors weird for whatever reason, and does them in BGR order, while the rest of the world does them in RGB order. so, conhost's color table was always in BGR order, and when you were using VT sequences to set colors, you'd always have to translate the indices to their equivalent RGB-ordered indices. Having the color table in RGB order removes a bunch of this logic, and makes our compatibility with other terminals a bit higher :) |
Thanks @zadjii-msft. That makes sense. But it wasn't what was causing my colors to get swapped. Also, it appears to only affect 24 bit ansi colors. So maybe not directly related to the color scheme. I only see some weird behavior when trying output some particular RGB colors. For example this blue color (0,55,218) which outputs as red. If I just change the color slightly (e.g. [0,55, 219]) it becomes blue again: It only appears to happen if I print the colors which are already in the ColorScheme list and have already been used with the standard 16 color ansi codes. Additionally, it seems it only affects those colors which were swapped in the new ordering of the ColorScheme list. So maybe some caching is going wrong. Just a guess. |
Woah okay, that's insane. Yea I can dig in to that. |
I experienced this when I was porting my cmd/powershell theme to the new terminal. Here are expected / actual colors:
|
Unfortunately, the current order is correct according to ANSI, while the order this issue wants to use would break ANSI 4bit indexed colour, which goes:
|
Yes. The order was not the problem. But some colors are rendered incorrectly when using the explicit 24 bit ansi escapes. It seems it only happens when when trying to render the colors from 4 bit list, and then only for colors which swapped place from the old ordering to new correct one. Seems a bit peculiar. |
I never put 2&2 together here, but I think this is /dup #2661. |
Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report! |
The red/blue and as yellow/cyan colors are swapped in the new Terminal when using the Campbell color scheme.
The color order is incorrect in "profiles.json". They should have the same order as in campbell.ini
The text was updated successfully, but these errors were encountered: