elm-color
elm-color copied to clipboard
Should fromHex return a Maybe/Result, or just a value?
Currently, fromHex
is fromHex : String -> Color
, meant for convenience in getting colors specified in hex into Elm, and returns rgb 0 0 0
if the hex string is invalid. Should it instead return a Maybe
or Result
so it can clearly indicate when a parse error occurs? Or should both functions be provided?
Questions:
- [ ] How is
fromHex
commonly used? - [ ] Should
fromHex
be removed from the 1.0.0 release until more info can be obtained?