diff --git a/src/spaces/hsl.js b/src/spaces/hsl.js index 7e842a9fd..afbb22043 100644 --- a/src/spaces/hsl.js +++ b/src/spaces/hsl.js @@ -68,7 +68,6 @@ export default new ColorSpace({ formats: { "hsl": { - toGamut: true, coords: [" | ", "", ""], }, "hsla": { diff --git a/src/spaces/hsv.js b/src/spaces/hsv.js index 4a733092f..b96c59010 100644 --- a/src/spaces/hsv.js +++ b/src/spaces/hsv.js @@ -54,10 +54,5 @@ export default new ColorSpace({ (l === 0 || l === 1)? 0 : ((v - l) / Math.min(l, 1 - l)) * 100, l * 100 ]; - }, - formats: { - color: { - toGamut: true, - } } }); diff --git a/src/spaces/hwb.js b/src/spaces/hwb.js index 8b47ca2d1..3ec5c14fc 100644 --- a/src/spaces/hwb.js +++ b/src/spaces/hwb.js @@ -52,7 +52,6 @@ export default new ColorSpace({ formats: { "hwb": { - toGamut: true, coords: [" | ", "", ""], } } diff --git a/tests/conversions.html b/tests/conversions.html index 9e5bb1936..395bb3d78 100644 --- a/tests/conversions.html +++ b/tests/conversions.html @@ -36,6 +36,7 @@ let convertToOK = convertTo("oklab"); let convertToOKLCh = convertTo("oklch"); let convertTosrgbLin = convertTo("srgb-linear"); +let convertToHSV = convertTo("hsv"); @@ -176,6 +177,39 @@

sRGB to HWB

+
+

Out of RGB gamut conversions

+ + + + + + + + + + + + + + + + +
color(rec2020 0 0 1) + + 230.639, -29.921, -5.0489
color(rec2020 0 0 1) + + 230.639, 179.655, 37.564
color(rec2020 0 0 1) + + 230.639, 128.483, 105.0489
+
+

sRGB to HSL

diff --git a/tests/parse.html b/tests/parse.html index 080f979a5..6fe783a71 100644 --- a/tests/parse.html +++ b/tests/parse.html @@ -351,8 +351,8 @@

hsl()

- - + +
{"spaceId":"hsl","coords":[NaN,0,0],"alpha":0.5}
hsl(90deg 0% 0% / .5){"spaceId":"hsl","coords":[90,0,0],"alpha":0.5}hsl(230.6 179.7% 37.56% / 1){"spaceId":"hsl","coords":[230.6,179.7,37.56],"alpha":1}
hsl(none, 50%, 50%)