angular / angular/components

feat(theme-generator): Add possibility to force custom color @angular/material:theme-color

未关闭
#30,167 20 条评论 18 个 reaction 已指派 0 人 在 GitHub 查看
area: ng-generate feature P4
主要语言
TypeScript
星标
25k
派生
6.8k
平均合并
1 天 8 小时
30 天内合并 PR
91

描述

### Feature Description

My problem is that I still can't understand how `@angular/material:theme-color` works. In the terminal, I need to provide colors for primary, secondary, and tertiary. For each one, I specify a single color, like #ff9500, because that's what I want.

`What HEX color should be used to generate the M3 theme? It will represent your primary color palette. (ex. #ffffff) **#005dba**
What HEX color should be used represent the secondary color palette? (Leave blank to use generated colors from Material) **#005dba**
What HEX color should be used represent the tertiary color palette? (Leave blank to use generated colors from Material) **#005dba**`

However, when generating the theme, I see that it creates color palettes, but when I try to get just my color, I use **`--mat-sys-primary`.** Unfortunately, it appears significantly darker (#8c5000), and I don't know which variable the color is actually hidden under. I have the impression that due to the low contrast, it is being artificially darkened. However, I selected the option not to generate mixins with high contrast. I would like to be able to use exactly that color without worrying about contrast. Currently, I am forced to manually change all the system token colors because the generated palette still interferes too much with what I want to achieve, taking away the flexibility I need in this case.

### Use Case

It would be great to be able to specify in the terminal that I want exactly the colors I mention, without any interference.

贡献指南

打开贡献指南

调研方向

从 @angular/material:theme-color 生成器及其终端提示开始,然后将请求的颜色与生成的 --mat-sys-primary 值进行比较。当用户可以选择完全使用指定的颜色,而不会被生成的调色板或对比度调整覆盖时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
angular, typescript
领域
cli, design, frontend
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
基本清楚
新手友好度
28/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。