I am new to Material Design Lite. I want to use a custom color scheme, particularly the primary color and accent color.
I have seen their theme builder tool, but it only offers a few colors.
How can I do that? How can I use custom (primary and accent) colors (which are not included in their theme builder tool) in my site, which uses Material Design Lite?
Themes are defined by numeric values for Hue, Saturation, Brightness and Contrast in that order, following the theme name. The scale for those values is based on the tools that were available at the time that themes were introduced, and do not use plain HSL values.
In Material Design, a primary color refers to a color that appears most frequently in your app. A secondary color refers to a color used to accent key parts of your UI. Using colors from the Material Design palette is optional.
by now there is a way to do this, check out this question (including the fixes in the answer).
In short: (the following lines were taken and fixed from that question, but I didn't test them myself)
scss:
@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 reference
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With