Cannot set custom palette colors through the Windows API #8622
Labels
Needs-Tag-Fix
Doesn't match tag requirements
Needs-Triage
It's a new issue that the core contributor team needs to triage at the next triage meeting
When using the Windows API to set color information, the colors do not get changed. Instead they remain the same as the theme set. (This might conflict with user settings, but it breaks programs that rely on changing colors.)
I'm using PDCurses to set the colors, which I believe uses the Windows API. I haven't looked through the source very deeply, but it seems to call
SetConsoleScreenBufferInfoEx
, or sends aWM_SETCONSOLEINFO
message to the console window if that isn't available.Environment
Steps to reproduce
Compile this C program with PDCurses (available through
vcpkg
):(Warning: this will mess with the colors of CMD!)
Then run the program in both Windows Terminal and CMD. Notice the difference between the colors. One noticeable difference is that you can see the 7 in Windows Terminal, but not in CMD (since the colors are properly set in CMD).
Expected behavior
The colors are set as written in the code.
Actual behavior
The colors are not changed.
Here's a comparison between the two in a real program:
The text was updated successfully, but these errors were encountered: