$app-primary: mat-palette($mat-grey, 500, 50, 900);
In html element, I should be able to use hues defined in my palette (above)
something like
color="primary mat-hue-2".
I am able just to use color="primary", there is no way of using hues from defined palette/material design swatches.
If we can get something similar of what angular material have:
<p md-colors="{background: 'purple-600'}>
all the material design color swatches can be used directly through "md-color" attribute.
Angular: 4.0.2
Material: 2.0.0-beta.3
@jelbourn is this a feature we want to add?
For now this isn't something that we're going to support because it would balloon the theming styles by a bit. When eventually we're able to use css variables it's something we'll revisit.
Make sense.
@jelbourn I'm just confuse on having multiple hues in theme (e.g. 500, 50, 900)
$app-primary: mat-palette($mat-grey, 500, 50, 900);
What's these exactly defined for?
@ajaysattikar in some places (possibly just progress bars - see #4088), they are used as the lighter and darker hues for components. Otherwise, you can consume those colors while theming your own components:
@import 'my-theme-partial'
$primary: map-get($theme, primary);
.light-bg {
background-color: mat-color($primary, lighter);
}
.dark-bg {
background-color: mat-color($primary, darker);
}
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
@ajaysattikar in some places (possibly just progress bars - see #4088), they are used as the
lighteranddarkerhues for components. Otherwise, you can consume those colors while theming your own components: