How to use custom colors using Material Design Lite?

I am new to Material Design Lite. I want to use a custom color scheme, especially the primary color and accent color.

I saw their theme creation tool , but it offers several colors.

How can i do this? How can I use custom (primary and accent) colors (which are not included in their object creation tool) on my website that uses Material Design Lite?

+4
source share
2 answers

I believe that there is no ready-made way for this.

, , , _color_definitions.scss, , ,

$palette-red:
"255,235,238"
"255,205,210"
"239,154,154"
"229,115,115"
"239,83,80"
"244,67,54"
"229,57,53"
"211,47,47"
"198,40,40"
"183,28,28"
"255,138,128"
"255,82,82"
"255,23,68"
"213,0,0";

sass .

+2

, ( ).

: ( , )

:

@import 'colors';
@import '../../../node_modules/material-design-lite/src/material-design-lite'; `

_colors.scss:

$color-primary: "255, 0, 0";
$color-accent: "0, 0, 255";

Github

0

Source: https://habr.com/ru/post/1662924/


All Articles