问题
I am making a console application similar to a rudimentary AAlib for a class. I am working with the win32 console. I wish to have more colors to work with. In the properties menu for the console there is a palette, giving 24 bit colors to foreground and background. Is there any way to access this palette in code?
The only thing I can think of is redefining the color palette[n] in HKEY_CURRENT_USER\Console for each call to color a character.
Alternatively if anyone knows a method for printing to window class like a terminal(where each character could have background color, not a fill) that could also work.
来源:https://stackoverflow.com/questions/21343186/c-windows-console-color-palette