/** * Convert palette to array of hex colors * * @param $palette * @return array */ private function _paletteToHex($palette) { $r = array(); foreach ($palette as $paletteColor) { array_push($r, Imager_ColorService::rgb2hex($paletteColor)); } return $r; }