Inspired by color.hex (link) and color.css (link) from Chroma.js, I think colour should support more color formats as Gleam is adopted in more web apps.
I propose the creation of the following functions (refer to the two Chroma.js doc links for more info):
pub fn to_hex_string_rgb(Colour) -> String
pub fn to_hex_string_rgba(Colour) -> String
pub fn to_hex_string_argb(Colour) -> String
pub fn to_css_string_rgb(Colour) -> String
pub fn to_css_string_hsl(Colour) -> String
pub fn to_css_string_lab(Colour) -> String
pub fn to_css_string_lch(Colour) -> String
pub fn to_css_string_oklab(Colour) -> String
pub fn to_css_string_oklch(Colour) -> String
As part of this I also propose deprecating to_rgb_hex_string and to_rgba_hex_string. The above naming convention better groups the related functions together so that they're easier to find in documentation.
Inspired by
color.hex(link) andcolor.css(link) from Chroma.js, I thinkcolourshould support more color formats as Gleam is adopted in more web apps.I propose the creation of the following functions (refer to the two Chroma.js doc links for more info):
As part of this I also propose deprecating
to_rgb_hex_stringandto_rgba_hex_string. The above naming convention better groups the related functions together so that they're easier to find in documentation.