Skip to main content

color

Return HEX or RGBa color defined under config/colors/_index.scss with an optional alpha channel (opacity).

ParameterTypeDescription
$namestringThe name of the color
$alphanumber or undefinedThe alpha value of the color

Example

assets/styles/config/colors/_index.scss
$first: #000;
$second: #999;
$third: #d5d5d5;
$fourth: #f5f5f5;
$fifth: #fff;
$sixth: #f5f5f5;
$seventh: #f0f0f0;
$error: #f00;
Components/ExampleComponent/_style.scss
.m-example-component {
color: font-color(error); // => #f00
}