开发者

Matching windows system colors: light on dark

I'm trying to make my app a good Windows citizen, so I use matching system colors (see "When selecting system colors, match but don't mix") as much as possible. However, sometimes light text on a dark background (something lik开发者_如何学Pythone COLOR_APPWORKSPACE/clAppWorkSpace) seems most appropriate, but the system doesn't provide this. Do you have any recommendations regarding this?


You could swap two colors. For example, if you can read InfoText colored text on a InfoBackground colored background, you should be able to read InfoBackground colored text on an Info colored background (or apply the concept to Window and WindowText).

Readability might suffer slightly.

Edit:

Sometimes it is okay to use your own colors, as long as they aren't mixed in with system colors (i.e. don't draw your color text on a system color background). If your own color scheme seems appropriate, then use it. Besides, Windows doesn't have a configurable color for every single need.


My solution for now: I set the background color to COLOR_APPWORKSPACE/clAppWorkSpace because I assume it has the "dark background" semantic I want. To get a contrasting text color I just get the HLS representation of the same color and increase its lightness factor.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜