Skip to content

Commit 62a7f72

Browse files
author
mlarghydracept
committed
hsb colors and map-ing #1826
1 parent 0a7c4c5 commit 62a7f72

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/color/p5.Color.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,11 @@ p5.Color._parseInputs = function() {
563563
return parseInt(color, 10) / 100;
564564
});
565565
}
566+
567+
results = results.map(function(value) {
568+
return Math.max(Math.min(value, 1), 0);
569+
});
570+
566571
if (results.length) {
567572
return color_conversion._hsbaToRGBA(results);
568573
}

0 commit comments

Comments
 (0)