Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use Custom colors with Material Design Lite?

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?

like image 522
Shy Avatar asked Dec 06 '16 07:12

Shy


People also ask

How do you define color theme?

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.

What is primary color in Material Design?

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.


1 Answers

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

like image 120
Hibuki Avatar answered Oct 06 '22 06:10

Hibuki