Skip to content

Commit acd9233

Browse files
authored
Merge pull request #123 from dflor003/feature/FixColorUtilOpacity
Respect opacity in color utils
2 parents 8b096e6 + 34b46b1 commit acd9233

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

projects/material-css-vars/src/lib/_public-util.scss

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,13 @@
2929
}
3030
}
3131

32-
@return map_get($palette_, $hue);
32+
$color: map_get($palette_, $hue);
3333

34+
@if (type-of($opacity) == number) {
35+
@return rgba($color, $opacity);
36+
} @else {
37+
@return rgb($color);
38+
}
3439
}
3540

3641
@function mat-css-color-primary($hue: 500, $opacity: null) {

0 commit comments

Comments
 (0)