Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

315
Views
Angular theme: how to use Material theme color within a custom component style?

Despite hours spent looking for this info, I don't know how to use the Material pre-built theme colors I choose from Angular Material, with my own components.

I was expecting something like that, my-component.component.scss

a {
  color: $primary-color;
}

a .active {
  color: $active-link
}

However, it seems it does not work that way as I cannot find any list of "colors" to be used.

The closer thing I found was to do the following:

@use '~@angular/material' as mat;
$my-palette: mat.define-palette(mat.$indigo-palette);

a {
  color: mat.get-color-from-palette($my-palette, '100-contrast');
}

The catch is I don't want to specify a palette, but I would like to use the default one. Plus I doubt this is the best way to import theme colors...

Any help with dummy example would be really appreciated!

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!