Skip to content
This repository has been archived by the owner on Mar 8, 2022. It is now read-only.
/ php-colordiff Public archive

Provides functions to convert and compare colors.

License

Notifications You must be signed in to change notification settings

mattacosta/php-colordiff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

php-colordiff

Implements utility functions to compute the difference between colors and to convert between different color models, such as RGB and CIELAB.

For more information on delta E functions, see Color difference.

Example

$color1 = ['r' => 255, 'g' => 0, 'b' => 255];  // Magenta
$color2 = ['r' => 220, 'g' => 20, 'b' => 60];  // Crimson

$color1 = ColorDiff::xyz2cielab(ColorDiff::rgb2xyz($color1));
$color2 = ColorDiff::xyz2cielab(ColorDiff::rgb2xyz($color2));
$difference = ColorDiff::deltaE2000($color1, $color2);

About

Provides functions to convert and compare colors.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages