Content-Length: 219297 | pFad | http://github.com/Qix-/color-string/commit/071054385db7b3d772214e40f8683e51d1725299

1D Fix rgb alpha percentage parsing from int to float · Qix-/color-string@0710543 · GitHub
Skip to content

Commit

Permalink
Fix rgb alpha percentage parsing from int to float
Browse files Browse the repository at this point in the history
  • Loading branch information
clytras authored and Qix- committed Nov 30, 2021
1 parent ab299a7 commit 0710543
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ cs.get.rgb = function (string) {

if (match[4]) {
if (match[5]) {
rgb[3] = parseInt(match[4], 0) * 0.01;
rgb[3] = parseFloat(match[4]) * 0.01;
} else {
rgb[3] = parseFloat(match[4]);
}
Expand All @@ -102,7 +102,7 @@ cs.get.rgb = function (string) {

if (match[4]) {
if (match[5]) {
rgb[3] = parseInt(match[4], 0) * 0.01;
rgb[3] = parseFloat(match[4]) * 0.01;
} else {
rgb[3] = parseFloat(match[4]);
}
Expand Down

0 comments on commit 0710543

Please sign in to comment.








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/Qix-/color-string/commit/071054385db7b3d772214e40f8683e51d1725299

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy