Skip to main content

font-color

Return HEX or RGBa color defined under config/typography/_colors.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;
assets/styles/config/typography/_colors.scss
  @use '../colors' as color;
$first: color.$first;
$second: color.$fourth;
$third: color.$fifth;
Components/ExampleComponent/_style.scss
.m-example-component {
color: font-color(first); // => #000
}