mdgriffith / style-elements

Create styles that don't mysteriously break!
http://package.elm-lang.org/packages/mdgriffith/style-elements/latest
BSD 3-Clause "New" or "Revised" License
445 stars 49 forks source link

rgb API is confusing #155

Closed joecorkerton closed 6 years ago

joecorkerton commented 6 years ago

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.

joecorkerton commented 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?

mksmtn commented 5 years ago

Agree, that int values from 0 to 255 are better that floats from 0 to 1