microsoft / microsoft/terminal
GetConsoleScreenBufferInfoEx doesn't return the actual palette
- Dominant language
- C++
- Stars
- 105k
- Forks
- 9.6k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 29
Description
### Windows Terminal version (or Windows build number)
1.9.1523.0
### Other Software
_No response_
### Steps to reproduce
1. Compile the following code:
```C++
#include
#include
#include
int main()
{
CONSOLE_SCREEN_BUFFER_INFOEX Info{ sizeof(Info) };
if (!GetConsoleScreenBufferInfoEx(GetStdHandle(STD_OUTPUT_HANDLE), &Info))
return 1;
for (const auto& i: Info.ColorTable)
{
std::cout << std::hex << std::setw(8) << std::setfill('0') << i << '\n';
}
std::cout.flush();
}
```
2. Set WT palette to "Vintage" in settings
3. Run the compiled code
### Expected Behavior
The same colour codes as in the corresponding section of `C:\Program Files\WindowsApps\Microsoft.WindowsTerminalPreview_1.9.1523.0_x64__8wekyb3d8bbwe\defaults.json`:
```
000000
800000
008000
808000
000080
800080
008080
C0C0C0
808080
FF0000
00FF00
FFFF00
0000FF
FF00FF
00FFFF
FFFFFF
```
### Actual Behavior
It looks like the default Windows 10 palette is returned instead:
```
000c0c0c
00da3700
000ea113
00dd963a
001f0fc5
00981788
00009cc1
00cccccc
00767676
00ff783b
000cc616
00d6d661
005648e7
009e00b4
00a5f1f9
00f2f2f2
```
Contributor guide
Research direction
Start with the C++ reproduction using GetConsoleScreenBufferInfoEx and compare its ColorTable output with the Vintage palette in defaults.json. Investigate how Windows Terminal applies the selected palette and how the console API exposes it. Done means the API returns the configured Vintage colour codes rather than the default Windows 10 palette.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100