Skip to content

Commit 0710543

Browse files
clytrasQix-
authored andcommitted
Fix rgb alpha percentage parsing from int to float
1 parent ab299a7 commit 0710543

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ cs.get.rgb = function (string) {
9090

9191
if (match[4]) {
9292
if (match[5]) {
93-
rgb[3] = parseInt(match[4], 0) * 0.01;
93+
rgb[3] = parseFloat(match[4]) * 0.01;
9494
} else {
9595
rgb[3] = parseFloat(match[4]);
9696
}
@@ -102,7 +102,7 @@ cs.get.rgb = function (string) {
102102

103103
if (match[4]) {
104104
if (match[5]) {
105-
rgb[3] = parseInt(match[4], 0) * 0.01;
105+
rgb[3] = parseFloat(match[4]) * 0.01;
106106
} else {
107107
rgb[3] = parseFloat(match[4]);
108108
}

0 commit comments

Comments
 (0)