Material Design's 500 colors not enough contrast with white

天大地大妈咪最大 提交于 2019-12-10 12:08:08

问题


I tried Android Studio's Theme Editor today and got some warnings from it.

According to the material design guidelines, I should use 500 as the primary colors but why is that the Theme Editor says that my primary color (Material Light Blue 500) doesn't have enough contrast with my textColorPrimary(#ffffff)? I also think that by not having the correct colors, my app title gets a black color on the recent apps screen which should be white.


回答1:


The text color in Recent apps gets computed automatically from background. The same algorithm is used to generate the warning in theme editor. When you look at the Light Blue 500 color you see Google suggests using black text over it.

You're free to use white text color in your app despite the warning but you can't change the Recent apps screen behavior.



来源:https://stackoverflow.com/questions/33055616/material-designs-500-colors-not-enough-contrast-with-white

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