Newer
Older
// class contains DomiSMP theme helper functions
@use 'sass:map';
@use '@angular/material' as mat;

Joze RIHTARSIC
committed
@function get-theme-type($smp-theme ) {
$color-config: mat.m2-get-color-config($smp-theme);

Joze RIHTARSIC
committed
@return map.get($color-config, type);
}
@function get-theme-color($smp-theme, $color: primary, $hue: null, $opacity: null ) {
$color-config: mat.m2-get-color-config($smp-theme);
// Get the required color palette from the color-config.
$color-palette: map.get($color-config, $color);
@if $hue != null {
@return mat.m2-get-color-from-palette($color-palette, $hue, $opacity);
} @else {
// Finally get the desired color with the specified hue.
@return mat.m2-get-color-from-palette($color-palette, $hue);
} @else {
// Finally get the desired color with the specified hue.
@return mat.m2-get-color-from-palette($color-palette);