Creating SASS Variables Referencing Angular Material Palettes

Scenario

We want to create a palette variable for one of the color palettes we found in .

node_modules@angular\material\core\theming\_palette.scss

Approach

The palettes can be referenced directly from @angular/material .

@use '@angular/material' as mat;

$my-palette: mat.$indigo-palette;

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ole Ersoy

Ole Ersoy

Founder of Firefly Semantics Corporation