From 1dcf1b3f51540e15b9c032e2152e272cd073532e Mon Sep 17 00:00:00 2001 From: Simeon Simeonoff Date: Mon, 10 Dec 2018 18:52:56 +0200 Subject: [PATCH] fix(themes): igx-contrast-color returns wrong color for rgba Closes #3384 --- .../src/lib/core/styles/base/utilities/_functions.scss | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/projects/igniteui-angular/src/lib/core/styles/base/utilities/_functions.scss b/projects/igniteui-angular/src/lib/core/styles/base/utilities/_functions.scss index 78576d153e6..a2dd29cc2ff 100644 --- a/projects/igniteui-angular/src/lib/core/styles/base/utilities/_functions.scss +++ b/projects/igniteui-angular/src/lib/core/styles/base/utilities/_functions.scss @@ -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; }