为什么 Angular Material 使用 alpha 来创建灰色?

Why does Angular Material use alpha to create grey colors?

我注意到在 angular material 中,当他们需要灰色时,他们会选择黑色,然后将其 alpha 调整为更亮。例如,如果您转到此处:https://material.angular.io/components 并检查页面上的任何卡片,您会注意到正文段落的字体颜色为 rgba(0, 0, 0, .54);。有谁知道为什么他们选择通过采用黑色并以这种方式调整 alpha 而不是仅使用十六进制或 rgb 来创建灰色?我唯一能想到的是,它有助于支持温暖和凉爽的主题。

来自https://material.io/guidelines/style/color.html#color-usability

Do: Using opacity instead of shifting colors often creates better contrast and relative luminance. For example, gray text (#727272) becomes hard to read if the background color changes to magenta.

Don't: Shifting to gray instead of decreasing contrast on black often lowers the relative luminance, making typography unreadable.