简体   繁体   中英

Change default gray palette dark mode color in Angular Material

is there any way to change the default gray palette in angular material?

按钮组件

I want to change the entire dark mode gray color in the material to a custom color, for example, Slate color in Tailwindcss

板岩调色板

I'm trying to figure it out in the material codebase but can't find it yet.

Thanks.

To customize your own theme, you will need to follow these steps from Angular Material official site .

If you run into any problem, please let me know.

Looks like we needed to override the background and foreground variables. I managed to achieve it using this example

Currently, there is no simple built-in way to change the background and foreground color.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM