hsla is dropping the a when converting to rgb

This commit is contained in:
Ryan Huber
2019-07-29 10:51:54 -04:00
committed by Mikael Sand
parent 6656cb4959
commit 645b5220d4
+1 -1
View File
@@ -371,7 +371,7 @@ function rgbFromHslString(string) {
const l = clamp(parseFloat(match[3]), 0, 100);
const a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1);
return hslToRgb([h, s, l, a]);
return [...hslToRgb([h, s, l, a]), a];
}
const hwbRegEx = /^hwb\(\s*([+-]?\d*[.]?\d+)(?:deg)?\s*,\s*([+-]?[\d.]+)%\s*,\s*([+-]?[\d.]+)%\s*(?:,\s*([+-]?[\d.]+)\s*)?\)$/;