"set color" allows HSL

hsl(a,b,c)
This commit is contained in:
O-01-67 2022-09-01 12:35:23 -04:00 committed by GitHub
parent af09a65b38
commit 367ef18381
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -105,8 +105,8 @@ function funniPrompt() {
}
};
if(property === "color") {
if(!value.startsWith("rgb(") || value.split(",").length !== 3) {
alert("Color must be in the form \"rgb(red,green,blue)\"!");
if(!value.startsWith("rgb(") || !value.startsWith("hsl(") || value.split(",").length !== 3) {
alert("Color must be in the form \"rgb(red,green,blue)\" or \"hsl(hue,saturation,lightness)\"!");
break;
}
var checkedColorObject = rgbStringToUnvalidatedObject(value);