protected function colorEntropy(\Imagick $image)
    {
        $histogram = $image->getImageHistogram();
        $newHistogram = array();

        // Translates a color histogram into a bw histogram
        $colors = count($histogram);
        for ($idx = 0; $idx < $colors; $idx++) {
            $colors = $histogram[$idx]->getColor();
            $grey = $this->rgb2bw($colors['r'], $colors['g'], $colors['b']);
            if (!isset($newHistogram[$grey])) {
                $newHistogram[$grey] = $histogram[$idx]->getColorCount();
            } else {
                $newHistogram[$grey] += $histogram[$idx]->getColorCount();
            }
        }

        return $this->getEntropy($newHistogram, $this->area($image));
    }