Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

danmichaelo/php-coma

Repository files navigation

CoMa – PHP Color Math Library

Build Status Coverage Status Latest Stable Version Total Downloads

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() . '.';

About

Calculate various color distance metrics (delta E) such as CIE76 and CIE94

Resources

License

Stars

Watchers

Forks

Packages

Contributors

Languages

AltStyle によって変換されたページ (->オリジナル) /