purescript-contrib/purescript-colors

`toHexString` and alpha channel

nsaunders opened this issue · 0 comments

Currently the toHexString function does not represent the alpha channel in its return value. I'm sure that made sense at the time, but #rrggbbaa color notation has reasonably widespread support these days. I propose that we update toHexString accordingly to include the alpha channel if specified.

Benefits:

  1. Hex strings are more compact than HSLA or RGBA.
  2. No loss of information