Compare brand revisions with CIEDE2000

Measure the perceptual distance between an old brand color and a proposed replacement.

Use the default distance algorithm to turn a visual change into a comparable number:

use PhpColor\Color\Color;

$old = Color::parse('#7c3aed');
$new = Color::parse('#8145ec');

$distance = Color::distance($old, $new);

assert(abs($distance - 2.4262143194799) < 0.000001);
use PhpColor\Color\Color; $old = Color::parse('#7c3aed'); $new = Color::parse('#8145ec'); $distance = Color::distance($old, $new); assert(abs($distance - 2.4262143194799) < 0.000001);

A distance of 0 means identical Lab coordinates. The number is evidence about color difference, not a universal pass threshold; choose tolerances for the material, display, and review process you control.

See color distance or read contrast and distance.