Color change Material Design Lite theme in scss

I installed the lite module for material design through npm, but I want to change it to other colors and preferably with colors that are not included in the Color Pallete Material Design.

I read here on GitHub how to do this .

But this does not work for me, when I try to change the color, I get white / black color.

I have in my main scss

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

And my _colors.scss contains:

$golden: #c6a259;
$brown: #240000;
$color-primary: #c6a259 !default;
$color-primary-dark: #c6a259 !default;
$color-accent: #240000 !default;
$color-primary-contrast: #240000 !default;
$color-accent-contrast: #240000 !default;

The difference you can see in the image below (before and after I changed the values ​​of the color variables) enter image description here

+2
source share
1 answer

Start by looking at the generated CSS.

!default.

RGB: "255, 0, 0"

, .

 $color-primary: "255, 0, 0";
+4

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


All Articles