匹配 Windows 系统颜色:浅色深色
我试图让我的应用程序成为良好的 Windows 公民,因此我使用匹配的系统颜色(请参阅 “选择系统颜色时,尽可能匹配但不要混合”)。但是,有时深色背景上的浅色文本(例如 COLOR_APPWORKSPACE/clAppWorkSpace)似乎最合适,但系统不提供此功能。您对此有什么建议吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
你可以交换两种颜色。例如,如果您可以在 InfoBackground 彩色背景上阅读 InfoText 彩色文本,那么您应该能够在 Info 彩色背景上阅读 InfoBackground 彩色文本(或将该概念应用于 Window 和 WindowText)。
可读性可能会略有下降。
编辑:
有时可以使用您自己的颜色,只要它们不与系统颜色混合即可(即不要在系统颜色背景上绘制颜色文本)。如果您自己的配色方案看起来合适,请使用它。此外,Windows 并没有可满足每种需求的可配置颜色。
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.
我现在的解决方案:我将背景颜色设置为 COLOR_APPWORKSPACE/clAppWorkSpace 因为我认为它具有我想要的“深色背景”语义。为了获得对比文本颜色,我只需获取相同颜色的 HLS 表示并增加其亮度因素。
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.