Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upAssign neutral colors a hue of 0° when converting to HSL #587
+10
−7
Conversation
klaftertief
changed the title from
Assign neutral colors a hue of 0°
to
Assign neutral colors a hue of 0° when converting to HSL
May 4, 2016
zwilias
referenced this pull request
Aug 10, 2017
Closed
Color.toHsl (Color.rgb 255 255 255) returns to NaN #895
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
klaftertief commentedMay 4, 2016
Converting a neutral color e.g. black (in RGB representation) to a HSL representation yields a hue value of
NaN(because of calling%onInfinity.This can be avoided by special casing a chroma of
0and assigning it a hue of0.