You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consolidate all color spaces in a single color class that holds the color information.
rgb, rgba and hex all use the same color space. hls uses a different one so would need to be stored differently or we'd lose data.
API sketch:
Color::fromString('rgb(255, 0, 255)');
// Formats return diffrent objects depending on the format$color->rgb()->__toString();
$color->rgb()->red();
$color->hex()->red();
// $color->rgb()->toHls() should also be possible// Changing color spaces requires an explicit conversion (different implementation of `Color`)// For example, you can't get `red` from a `hls` color$color->toHls()->hue();
The text was updated successfully, but these errors were encountered:
Brain dump incoming
Consolidate all color spaces in a single color class that holds the color information.
rgb
,rgba
andhex
all use the same color space.hls
uses a different one so would need to be stored differently or we'd lose data.API sketch:
The text was updated successfully, but these errors were encountered: