I just started using the colorspace package, and converting between RGB and
HLS is not working as I expect. In particular, converting RGB(0,0,0) to HLS
then back to RGB seems broken:
#> as(as(RGB(0, 0, 0), "HLS"), "RGB")
R G B
[1,] 1 1 0
That is, converting black to HLS then back again produces yellow!
Other values I've tried work as expected (i.e., I get the same RGB value out
as I put in).
Is this a bug in the code, or in my understanding of colour conversions?
Kind Regards,
Mike
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.