Closed joecorkerton closed 6 years ago
Seems like I misread the API. rgb
should take floats between 0 and 1 (not ints between 0 and 255, which is how rgb is typically described).
The code is working correctly, but perhaps the documentation could be improved to highlight the fact the inputs should be between 0 and 1. What was the reason for choosing this over ints in range 0 -> 255 as inputs?
Agree, that int values from 0 to 255 are better that floats from 0 to 1
See comment below. I initially thought
rgb
would take values between 0 and 255 (float type signature does not rule this out), as that is the most common rgb spec. Docs do not give any guidance on this. Seems like either more documentation should be added or reconsider the arguments for this api.