CSS variable color
Last updated
Last updated
Each hex color is in form defined by the mixin, split into four CSS variables, where suffix h
indicates hue, s
saturation, l
lightness and a
alpha.
The single CSS color is defined as follows.
The SCSS variable is to make CSS variable unique, $name
is the color name and $color
is the hex color to obtain hue, saturation, lightness and alpha.
For example, the primary-color
is built from the CSS variables based on hex #5755d9
.
It is core color and it's defined in the file.
Each color that is based on settable color is defined by the mixin , and it's also split into four CSS variables, which values refer by using CSS function to settable colors CSS property names, where suffix h
indicates hue, s
saturation, l
lightness and a
alpha.
For example secondary-color
that based on primary-color
is defined in both and elements and built from the CSS variables as follows.
CSS variables that are based on others are also defined in both and elements, and secondary-color
is also in the file.