color
color copied to clipboard
A little library to deal with color conversions
I have developed a modification for RGB and RGBA that accepts parameter values for R G B as %, as per spec for these color definitions - so for example...
While this might be fixed by transitioning to use of a common / universal color definition for internal storage (i.e. all colours are instances of a generalised colour definition, converted...
I did this: ``` $colour = "hsla(331,96%,90%,0.76)" $the_colour = @Factory::fromString($colour); ``` This creates a `Spatie\Color\Hsla` object with this value: ``` $the_colour: Spatie\Color\Hsla hue: 331 saturation: 96 lightness: 90 alpha: 0.76...
I'm looking for a library that converts all my colors into the same format and stumbled up on your library. IT looks like a neat start. However, I also need...
Can't do it now since it would be a breaking change. - `Color` - `red`, `green`, `blue`: `int` - `fromString`: `self`
Brain dump incoming 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...
Function signature says `: float` https://github.com/spatie/color/blob/2a3bb4e23434cf051cea5467d2e2d9924dd4969f/src/Contrast.php#L7 but the return value is cast to `int`: https://github.com/spatie/color/blob/2a3bb4e23434cf051cea5467d2e2d9924dd4969f/src/Contrast.php#L27-L31 It could be improved by changing the return cast to `(float)`, but I am not...