I have studied the documentation here and here, and took as a basis the original styles that I found in the styles block on the site page. I have a question regarding some colors with the prefix on-
. Where and in what cases can I see the use of the following colors, and is it worth redefining them?
我已经研究了这里和这里的文档,并将我在网站页面的样式块中找到的原始样式作为基础。我对一些前缀为-的颜色有一个问题。我可以在哪里以及在什么情况下看到以下颜色的使用,是否值得重新定义它们?
Do I understand correctly that these are the colors that will be used on top of others? For example, background: #000
and on-background: #FFF
will give white text on a black background?
我对这些颜色的理解正确吗?这些颜色将覆盖在其他颜色之上。例如,背景:#000和开-背景:#fff会在黑色背景上显示白色文本吗?
There were no issues with other colors and their redefinition.
其他颜色及其重新定义没有问题。
'on-background': '#FFFFFF',
'on-surface': '#FFFFFF',
'on-primary': '#FFFFFF',
'on-secondary': '#FFFFFF',
'on-error': '#FFFFFF',
'on-info': '#FFFFFF',
'on-success': '#FFFFFF',
'on-warning': '#FFFFFF',
'on-accent': '#FFFFFF',
'on-primary-lighten-5': '#FFFFFF',
'on-primary-lighten-4': '#FFFFFF',
'on-primary-lighten-3': '#FFFFFF',
'on-primary-lighten-2': '#FFFFFF',
'on-primary-lighten-1': '#FFFFFF',
'on-primary-darken-1': '#FFFFFF',
'on-primary-darken-2': '#FFFFFF',
'on-primary-darken-3': '#FFFFFF',
'on-primary-darken-4': '#FFFFFF',
'on-secondary-lighten-5': '#FFFFFF',
'on-secondary-lighten-4': '#FFFFFF',
'on-secondary-lighten-3': '#FFFFFF',
'on-secondary-lighten-2': '#FFFFFF',
'on-secondary-lighten-1': '#FFFFFF',
'on-secondary-darken-1': '#FFFFFF',
'on-secondary-darken-2': '#FFFFFF',
'on-secondary-darken-3': '#FFFFFF',
'on-secondary-darken-4': '#FFFFFF',
'on-error-lighten-4': '#FFFFFF',
'on-error-lighten-3': '#FFFFFF',
'on-error-lighten-2': '#FFFFFF',
'on-error-lighten-1': '#FFFFFF',
'on-error-darken-1': '#FFFFFF',
'on-error-darken-2': '#FFFFFF',
'on-error-darken-3': '#FFFFFF',
'on-error-darken-4': '#FFFFFF',
'on-warning-lighten-4': '#FFFFFF',
'on-warning-lighten-3': '#FFFFFF',
'on-warning-lighten-2': '#FFFFFF',
'on-warning-lighten-1': '#FFFFFF',
'on-warning-darken-1': '#FFFFFF',
'on-warning-darken-2': '#FFFFFF',
'on-warning-darken-3': '#FFFFFF',
'on-warning-darken-4': '#FFFFFF',
'on-info-lighten-4': '#FFFFFF',
'on-info-lighten-3': '#FFFFFF',
'on-info-lighten-2': '#FFFFFF',
'on-info-lighten-1': '#FFFFFF',
'on-info-darken-1': '#FFFFFF',
'on-info-darken-2': '#FFFFFF',
'on-info-darken-3': '#FFFFFF',
'on-info-darken-4': '#FFFFFF',
'on-success-lighten-4': '#FFFFFF',
'on-success-lighten-3': '#FFFFFF',
'on-success-lighten-2': '#FFFFFF',
'on-success-lighten-1': '#FFFFFF',
'on-success-darken-1': '#FFFFFF',
'on-success-darken-2': '#FFFFFF',
'on-success-darken-3': '#FFFFFF',
'on-success-darken-4': '#FFFFFF',
更多回答
我是一名优秀的程序员,十分优秀!