This commit is contained in:
David Ralph
2020-11-05 16:01:31 +00:00
parent f6d8ccf6e7
commit e1510e8277
35 changed files with 127 additions and 239 deletions

View File

@@ -1,4 +1,4 @@
function isValidRGBValue(value) {
const isValidRGBValue = (value) => {
return (typeof (value) === 'number' && Number.isNaN(value) === false && value >= 0 && value <= 255);
}
@@ -11,9 +11,7 @@ export default function setRGBA(red, green, blue, alpha) {
};
if (isValidRGBValue(alpha) === true) color.alpha = alpha | 0;
// RGBToHSL(color.r, color.g, color.b);
return color;
}
}