Skip to content

Commit

Permalink
Merge pull request #3390 from IgniteUI/stable-grid-styles-master
Browse files Browse the repository at this point in the history
fix(themes): igx-contrast-color returns wrong color for rgba values
  • Loading branch information
kdinev authored Dec 11, 2018
2 parents c6f165e + e54bdf0 commit 15765b9
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,14 @@
/// @param {Map} $palette - The source palette map.
/// @param {string} $color - The target color from the color palette.
/// @param {number|variant} $variant - The target color shade from the color palette.
/// @requires igx-color
/// @requires text-contrast
/// @requires hexrgba
/// @returns {Color} [#fff] - Returns white if now palette, color and/or variant matches found.
@function igx-contrast-color($palette, $color, $variant: 500) {
$_color: igx-color($palette, $color, $variant);
@if $_color {
@return text-contrast($_color);
@return text-contrast(hexrgba($_color));
}
@return #fff;
}
Expand Down

0 comments on commit 15765b9

Please sign in to comment.