mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-05-28 13:03:12 +00:00
hsla is dropping the a when converting to rgb
This commit is contained in:
@@ -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*)?\)$/;
|
||||
|
||||
Reference in New Issue
Block a user