Skip to content

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

License

Notifications You must be signed in to change notification settings

BianoCZ/coma-php

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CoMa – PHP Color Math Library

Latest Stable Version PHPStan Total Downloads Software License

Php library to convert between sRGB, XYZ, and Lab color spaces, and calculate various color distance metrics (delta E).

Currently CIE76, CIE94 and CIEDE2000 are implemented.

use Biano\Coma\ColorDistance;
use Biano\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

No packages published

Languages

  • PHP 100.0%