请注意:本页内容发布于 1890 天前,内容可能已经过时,请注意甄别。
原文链接:https://devblogs.microsoft.com/oldnewthing/20040708-00/?p=38513
A commenter asks why icon label have “those ugly color boxes” when there is a background image.
有位访客在评论中提问为什么当设置了背景图片时,图标标签下面会有『难看的色块』。
The answer: Because the alternative would be worse.
答:因为不这样的话更难看。
Imagine if there were no solid background between the text and the background image. You would end up with text against an unpredictable background, which doesn’t help readability.
试想,如果在文本和背景图片之间没有纯色背景衬托的话,结果就变成文本压在了无法预测的背景图片上的情况,对可读性并无益处。
Take the default background for Windows XP: There are some places that are very light and other places that are very dark. No matter what color you pick for the icon text, it will look bad in one or the other place. If you decide to use white, then the text becomes unreadable in the clouds. If you decide to use black, then the text becomes unreadable in the shadows.
以 Windows XP 的默认背景(译注:Bliss,即经典的蓝天白云绿草地)为例:图片上的某些部分特别亮,有些则特别暗。不论你选择哪种(单一)颜色作为图标标签文字的颜色,都可能在一处或者另一处看上去很难看。用白色,那么在白云部分文字就很难看清,而用黑色的话,在阴影部分又看不见了。
You lose either way.
怎么样都是输。
The solution is to intercede a contrasting color to ensure that the text is readable. If your video card is powerful enough, the contrasting color is used only just around the strokes of text themselves, which lends a shadow-effect. If shadows are not enabled, then a solid block of contrast is used.
解决方案是引入高对比度的颜色从中斡旋,以确保文本的高可读性。如果你的显卡性能足够强,这个高对比度的颜色只会在文字的边缘轻轻一描,形成一种阴影效果。而如果阴影效果没有启用的话,那么就会在文字下方描绘一个纯色色块。
(And for those of you who say, “Use white in the dark places and black in the light places,” what if there is a section of the wallpaper that has a dark area right next to a light area, and the text covers both?)
(至于那些准备说『在深色区域用白色,在浅色区域用深色』的那些人,如果(用户的)壁纸上正好有一块深浅相间的区域,而图标标签的文本正好横亘其上呢?)
远嚣 Comment