Skip to content

Commit

Permalink
Updating to pass test case
Browse files Browse the repository at this point in the history
  • Loading branch information
themojache committed Apr 19, 2024
1 parent a04c07e commit 4d65eb0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/parsers.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,9 @@ exports.parseColor = function parseColor(val) {
output = output.map((_, i) => parseInt(hex.substr(i * 2, 2), 16));
if (hex.length === 8) {
alpha = Number((parseInt(hex.substr(6, 2), 16) / 255).toFixed(3));
if (alpha !== 1) {
output.push(alpha);
}
//if (alpha !== 1) {
output.push(alpha);
//}
}
return (output.length == 4 ? 'rgba(' : 'rgb(') + output.join(', ') + ')';
}
Expand Down

0 comments on commit 4d65eb0

Please sign in to comment.