§ ¶Fixing the 3D highlight color in Windows 7
One of the things that's been bugging me about Windows 7 is the washed out look of 3D elements in the composited Aero schemes. The main problem is that the 3D face color is far too hot (240, 240, 240), which is easily fixed in the theme color settings to the Classic value of (212, 208, 200). However, attempting to do so reveals another problem:
![[OK button - dim highlight] [OK button - dim highlight]](/blog/images/buttonbad.png)
The highlight color is too dim, (234, 232, 227). It seems that the Window Color and Appearance dialog doesn't let you edit this color directly, but instead computes it (badly) from the 3D color. I was surprised to discover that this same behavior exists in Windows XP; I probably never noticed it because I could always start from the original scheme. That doesn't work if you have to adjust the 3D face color, though.
A bit of digging in the Win32 API reveals that the problematic system color is COLOR_BTNHIGHLIGHT / COLOR_3DHIGHLIGHT, and there is a function SetSysColor() to change it. Unfortunately, while this does fix the colors, it doesn't save them to the Registry. Fortunately, the themes that you save from the Personalization control panel are text files in the AppData\Local\Microsoft\Windows\Themes directory of the user profile, and there is a simple solution:
ButtonHilight=255 255 255
After making this change and reloading the theme, the 3D element contrast is fixed:
![[OK button - fixed highlight] [OK button - fixed highlight]](/blog/images/buttongood.png)
Victory!
The other thing that's been bugging me about the composited themes is the apparent bass-ackward colors for inactive and active windows, where the inactive windows always seem to be brighter than the active window regardless of any fiddling with the color settings... but I haven't found a solution for that yet.
Comments
Comments posted:
What bothers me is the deliberate crippling of the standard Windows theme, in what seems like an attempt to force the gamey, unprofessional Aero themes on everyone. No competently layered design could allow window compositing to care what theme I'm using, and certainly not to work with Aero but not the much simpler classic theme.
Why they're relegating second-class a window theme that they've invested over two decades of polish and refinement into--now there's a question...
By the way, can you set an AuthName (authentication realm) for the comment form? I think that's why FF isn't remembering it.
Glenn - 29 12 10 - 18:05
What I don't get is why don't you use the native (e.g. Aero) controls on Vista/7 systems. Have you ever heard of User Experience?
anonymous - 30 12 10 - 03:10
@anonymous:
Compatibility reasons. Please see:
http://www.virtualdub.org/blog/pivot/ent..Phaeron - 30 12 10 - 08:02
The bug with computing the 3D highlight color from 3D face color was there always — all the way back from Windows 95 when two additional 3D colors were introduced. (In Windows 3.x, there were only face, highlight and shadow, and, IIRC, were independently configurable.)
Yuri Khan - 30 12 10 - 21:09
Mmm, I really don't see the difference between the two .png's.
I'll eat more carrots this year. maybe that helps.
Thijs - 01 01 11 - 04:19
@Phaeron: that was 2007... Windows 9x and 2000 are gone, I think you can safely strip out old compatibility code and support only XP and higher versions.
Licantrop0 - 01 01 11 - 06:57
> that was 2007... Windows 9x and 2000 are gone, I think you can safely strip out old compatibility code and support only XP and higher versions.
In other words, I could modify a lot of currently working code and possibly break lots of things just to enable a different visual look? Sorry, but I need a better reason than that. Again, changing the visual style also affects existing plugins too.
Phaeron - 01 01 11 - 10:33
> In other words, I could modify a lot of currently working code and possibly break lots of things just to enable a different visual look? Sorry, but I need a better reason than that.
Now, that's an answer I like.
jmartinr - 02 01 11 - 09:32
Avery, don't you also find it weird that you cannot change file/folder selection and menu selection color in Windows 7?
I don't understand how Microsoft can claim that they care about accessibility when visually impaired people like me can barely distinguish the "colors" of selected and non-selected items.
Igor Levicki (link) - 03 01 11 - 03:12
I thought I was the only weird one. I spent a week trying to de-Segoe UI Vista's interface and turning off the stupid font smoothing/Cleartype. Turns out there are some dialogs HARD CODED to use that stupid font! (ex: the "Run..." dialog on the classic start menu or via 'Win + R') Give me the classic default Windows 2000 (Tahoma, never cared for XP's default) or 98SE (MS Sans Serif) color scheme any day.
Chris - 03 01 11 - 04:01
I'm still using the classic theme on Windows 7, mainly because it's the only theme where you have full control over the colours - I'm using a somewhat inverted colour scheme (I find it much easier on my eyes - it looks like this:
http://eternallybored.org/imgs/thebat.pn..), and the Classic theme is the only thing that lets me set up this. I'm not happy that I have to give up on desktop composition to be able to use this, but I can't use a computer with too much bright colours for very long.
Speaking of button highlight colours, I recently installed Windows 2000 in VMWare, and when I tried to set my colour scheme there, the highlight colour was wrong - it was much brighter than XP, Vista and 7 compute it, so I instead used a program I wrote a long time ago to copy the colour scheme from Win7 (years ago I wrote 2 programs for tweaking Windows colours - one is a simple command-line utility that can save and restore colour scheme, and another is a replacement for the Appearance dialog which lets you edit each colour individually - though it turns out that this second one crashes if you have anything other than 96 DPI set :).
ender - 03 01 11 - 04:38
@Chris: Before Vista, you were supposed to use the pseudo font MS Shell Dlg in your resource files, on (english) OS this resolves to Tahoma or MS Sans Serif by default. With Vista, you are no longer supposed to use MS Shell Dlg, but hardcoded Segoe UI @ 9pt. So app designers basically have 3 choices:
1: Follow Vista UI guidelines and use Segoe UI (And they expect you to have cleartype on (ugh!))
2: Follow the older guidelines and use MS Shell Dlg
3: Decide at runtime (Either by having two versions of every dialog in the resources, or building dialogs on the fly)
All of this just because Segoe does not look good @ 8pt like the older fonts
WndSks (link) - 04 01 11 - 07:53
Classic theme in Windows 7 not only disables compositing, but it also makes start menu and taskbar butt-ugly so its not an option for me.
Regarding the font, yes, Segoe UI is ugly, but there is another much more important problem -- hardcoded font sizes in some system dialogs which do not allow them to scale on high-DPI displays. It is an accessibility nightmare for visually impaired people.
Igor Levicki (link) - 22 01 11 - 00:24