Make RGB(::Integer,::Integer,::Integer) make sense. #53
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Is there anything I'm missing, or does
not make any sense because, according to the comments in
RGB
, ther
,g
andb
values are within [0,1] and thus this line only permits to construct fully saturated colors?This PR at least makes
RGB(0xa4,0x39,0x1f)
do what one'd expect, though the result ofRGB(164,57,31)
would still be unexpected. We could just always divide by255
to make the latter one work, but that'd make handling 48 or 96 bit colors wrong. I'm in favor of 255 for the "least surprise."