danmichaelo/coma
CoMa is a PHP color math library for converting between sRGB, XYZ and Lab color spaces and computing color difference (Delta E) metrics. Includes CIE76 and CIE94, with more planned. Suitable for matching and comparing colors.
Php library to convert between sRGB, XYZ, and Lab color spaces, and calculate various color distance metrics (delta E). Currently CIE76 and CIE94 are implemented, but I plan to implement more.
use Danmichaelo\Coma\ColorDistance,
Danmichaelo\Coma\sRGB;
$color1 = new sRGB(1, 5, 250);
$color2 = new sRGB(0, 0, 208);
$cd = new ColorDistance;
$cie94 = $cd->cie94($color1, $color2);
echo 'The CIE94 ∆E is ' . $cie94 . ' between ' . $color1->toHex() . ' and ' . $color2->toHex() . '.';
How can I help you explore Laravel packages today?