Comparing version 4.0.0 to 4.0.1
@@ -5,3 +5,3 @@ export default function rgbHex(red, green, blue, alpha) { | ||
if (typeof red === 'string') { | ||
[red, green, blue, alpha] = red.match(/(0?\.?\d{1,3})%?\b/g).map(component => Number(component)); | ||
[red, green, blue, alpha] = red.match(/(0?\.?\d+)%?\b/g).map(component => Number(component)); | ||
} else if (alpha !== undefined) { | ||
@@ -8,0 +8,0 @@ alpha = Number.parseFloat(alpha); |
{ | ||
"name": "rgb-hex", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"description": "Convert RGB(A) color to HEX", | ||
@@ -19,3 +19,4 @@ "license": "MIT", | ||
"scripts": { | ||
"test": "xo && ava && tsd" | ||
"test": "xo && ava", | ||
"//test": "xo && ava && tsd" | ||
}, | ||
@@ -22,0 +23,0 @@ "files": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3995