thomasp85 / farver

High Performance Colourspace Manipulation in R
https://farver.data-imaginist.com
Other
125 stars 14 forks source link

rgb values 100 times too high when s == 0 #4

Closed EmilHvitfeldt closed 5 years ago

EmilHvitfeldt commented 5 years ago

now correctly calculates rgb from hsl

farver::convert_colour(matrix(c(0, 0, 1), 1, 3), "hsl", "rgb")
#      [,1]  [,2]  [,3]
# [1,] 2.55 2.55 2.55
farver::convert_colour(matrix(c(0, 0, 50), 1, 3), "hsl", "rgb")
#      [,1]  [,2]  [,3]
# [1,] 127.5 127.5 127.5
farver::convert_colour(matrix(c(0, 0, 100), 1, 3), "hsl", "rgb")
#      [,1]  [,2]  [,3]
# [1,] 255 255 255
thomasp85 commented 5 years ago

Thanks