Open ghivert opened 5 months ago
I think the functions set exposed by the package could be really small and should try to be the more intuitive at first:
Conversions functions
parse(color: String) -> Result(Color, Error)
to_hex(color: Color) -> String
to_rgb(color: Color) -> String
to_rgba(color: Color) -> String
to_hsl(color: Color) -> String
from_rgb(red: Int, green: Int, blue: Int) -> Result(Color, Error)
from_hsl(hue: Int, saturation: Int, lightness: Int) -> Result(Color, Error)
Modificators
darken
lighten
I like that!
I'll finish the hsl -> rgb conversion and return to those naming conventions.
I think the functions set exposed by the package could be really small and should try to be the more intuitive at first:
Conversions functions
parse(color: String) -> Result(Color, Error)
(which can parse rgb, hsl and hex directly)to_hex(color: Color) -> String
to_rgb(color: Color) -> String
to_rgba(color: Color) -> String
to_hsl(color: Color) -> String
from_rgb(red: Int, green: Int, blue: Int) -> Result(Color, Error)
from_hsl(hue: Int, saturation: Int, lightness: Int) -> Result(Color, Error)
Modificators
darken
lighten