Matching windows system colors: light on dark

别等时光非礼了梦想. 提交于 2019-12-13 00:30:01

问题


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 like COLOR_APPWORKSPACE/clAppWorkSpace) seems most appropriate, but the system doesn't provide this. Do you have any recommendations regarding this?


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/1559417/matching-windows-system-colors-light-on-dark

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!