Skip to content

Commit f6537a1

Browse files
timmoyjelbourn
authored andcommitted
docs(theming): update mat-color usage for numeric hue and -contrast modifier (#9977)
1 parent 73bc948 commit f6537a1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

guides/theming-your-components.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,12 @@ You can use the `mat-color` function to extract a specific color from a palette.
6565
// Use mat-color to extract individual colors from a palette as necessary.
6666
// The hue can be one of the standard values (500, A400, etc.), one of the three preconfigured
6767
// hues (default, lighter, darker), or any of the aforementioned prefixed with "-contrast".
68-
// For example a hue of "darker-contrast" gives a light color to contrast with a "darker" hue
68+
// For example a hue of "darker-contrast" gives a light color to contrast with a "darker" hue.
69+
// Note that quotes are needed when using a numeric hue with the "-contrast" modifier.
6970
// Available color palettes: https://www.google.com/design/spec/style/color.html
7071
.candy-carousel {
7172
background-color: mat-color($candy-app-primary);
7273
border-color: mat-color($candy-app-accent, A400);
73-
color: mat-color($candy-app-primary, darker);
74+
color: mat-color($candy-app-primary, '100-contrast');
7475
}
7576
```

0 commit comments

Comments
 (0)