getClosestMatch doesn't work when providing an array of Color objects.
foreach($colors as $key => $color) {
if (false === ($color instanceof Color)) {
$c = new Color($color);
}
$dist = $this->getDistanceLabFrom($c);
should be
foreach($colors as $key => $color) {
if (false === ($color instanceof Color)) {
$color = new Color($color);
}
$dist = $this->getDistanceLabFrom($color);
getClosestMatch doesn't work when providing an array of Color objects.
should be