Color Theme Selection in ConEmu.WinForms
User should be able to select between themes. At least these should be supported IMHO:
- ConEmu default (solarized?)
- System default (might be needed if you want it to look exactly as other consoles, e.g. for running CUIs).
- Light background version (for matching the app UI, to prevent the black terminal window standing out brightly — would fit not-heavily-colored utilities, but with CUIs probably the colors would be very surprising).
@Maximus5: what's the best way to apply a theme programmatically? Writing Registry values into the ConEmu.xml settings file generally works, is it the best way?
Looks like the themes are only hardcoded in the Options.cpp file and not available to be referenced as a whole in settings, is this right?
How to I color the console frame and the status bar into the light theme — I can set char colors with ColorTableNN, but there's a black frame around them, what is the full list of entries to correct?
Why do you try to change ColorTableNN? There are palettes, and you may choose them, for example, with -new_console:P:"<Default Windows scheme>".
As for light background. Are you talking about this?

So this is the default scheme with only the fore and back colors swapped?
What would happen of light yellow in this case? E.g. calling msbuild would emit errors in light red and warnings in light yellow, which gets unreadable if only background is changed to light.
Making a scheme by merely inverting the colors has this problem as well. I experimented a bit with choosing colors, but that's incomplete yet. Luckily, there're only 16 of them.
If the scheme is newly-made and not listed in the Options.cpp, is it possible to choose it on the command line (say, if it's written into the settings xml file, which is also specified on the command line)? That's why I started experimenting with ColorTableNN, in the first place.
Making a scheme by merely inverting the colors has this problem as well.
There is no good solution with schemes. Sure. A lot of console applications looks good with one palette, but awful with another. Example: zsh with <ConEmu> palette.
I have plans to implement "dynamic palettes". ConEmu would change lightness of text, if color distance between fg and bg is too short. The main problem - RGB to Lab colorspace conversion. Haven't found good samples yet.
is it possible to choose it on the command line
-palette
I've implemented the first contraster with HLS, then a colleague upgraded it to use LAB. That stuff has been used in R# for many years right for this goal. In this case I'm not even sure if it has to be dynamic, there're only 256 possible colors involved. Actually, HLS is trivial and it might be a good start.
As for the light palette, I've already played with LAB (borrowed the code from R# to make a quick test). The problem is that our LABer is shifting hues when you're trying to get an impossible color, like high-contrast blue on black — blue is simply not light enough for a good contrast, so it shifts towards pinks a bit.
By "dynamic" I mean "automatic shift of lightness". Sure, it would be done on 256 color table (16fg * 16bg). This "internal palette" is used in virtual console.
And I would not shift lightness a lot - "dark blue" wouldn't be lighter than "light blue"
This already poses a problem because the same color won't be the same over different backgrounds.
Doesn't matter. The idea - make text readable - is worth. For example, cleartype technique, especially in DirectWrite, changes lightness of text.
DirectWrite, whose stuff is that? Is it used by GDI+ engine, or MIL engine, or Winword?
https://en.m.wikipedia.org/wiki/DirectWrite
Looked at that of course, but it's a bit speculative, does not even explain its grid fitting strategies. And hints that XPS won't render thru MIL, that's an interesting point. Never mind, anyway.
There is a request on the ConEmu issue tracker to support DirectWrite. There you may find comparison screenshots...