You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The souce code in Converting sRGB Colors to HSL (or file css-color-4/rgbToHsl.js) produced hue as NaN when max equals to min. it should be 0 in this case.
The text was updated successfully, but these errors were encountered:
Yes, this is as expected. The hue is powerless, which is represented in CSS with the keyword none and in code with the value NaN.
For example, in hsl(), the hue component is powerless when the saturation component is 0%; a 0% saturation indicates a grayscale color, which has no hue at all, so 0deg and 180deg, or any other angle, will give the exact same result.
The souce code in Converting sRGB Colors to HSL (or file css-color-4/rgbToHsl.js) produced
hue
asNaN
whenmax
equals tomin
. it should be 0 in this case.The text was updated successfully, but these errors were encountered: