angular / angular/components

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

オープン
#30,167 コメント 20 件 リアクション 18 件 担当者 0 名 GitHub で見る
area: ng-generate feature P4
主要言語
TypeScript
スター
25k
フォーク
6.8k
平均マージ
1日 8時間
マージ済み PR(30日)
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
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
28/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。