function getColors(){
		$adf = new ApiDataFetcher(PUPIQ_API_URL);

		try {
			$colors = $adf->get("image_colors/detail",array(
				"url" => $this->getUrl(),
				"auth_token" => $this->getAuthToken(),
			),array(
				"acceptable_error_codes" => array("404","403"),
				"cache" => 60 * 60 * 24 * 30, // 30 days
			));
		}catch(Exception $e){
			trigger_error("Catched Pupiq exception: ".$e->getMessage());
			$colors = array();
		}

		if(!$colors || !array_key_exists("vibrant",$colors)){
			$colors = array(
				"vibrant" => null,
				"light_vibrant" => null,
				"dark_vibrant" => null,
				"muted" => null,
				"light_muted" => null,
				"dark_muted" => null,
			);
		}

		return $colors;
	}
function getColors(){
		$adf = new ApiDataFetcher(PUPIQ_API_URL);

		try {
			$colors = $adf->get("image_colors/detail",array(
				"url" => $this->getUrl(),
				"auth_token" => $this->getAuthToken(),
			),array(
				"acceptable_error_codes" => array("404","403"),
				"cache" => 60 * 60 * 24 * 30, // 30 days
			));
		}catch(Exception $e){
			trigger_error("Catched Pupiq exception: ".$e->getMessage());
			$colors = array();
		}

		if(!$colors || !array_key_exists("vibrant",$colors)){
			$colors = array(
				"vibrant" => null,
				"light_vibrant" => null,
				"dark_vibrant" => null,
				"muted" => null,
				"light_muted" => null,
				"dark_muted" => null,
			);
		}

		return $colors;
	}
function getColors ( ) { $ adf = new ApiDataFetcher ( PUPIQ_API_URL ) ; try { $ colors = $ adf -> get ( "image_colors/detail" , array ( "url" => $ this -> getUrl ( ) , "auth_token" => $ this -> getAuthToken ( ) , ) , array ( "acceptable_error_codes" => array ( "404" , "403" ) , "cache" => 60 * 60 * 24 * 30 , // 30 days ) ) ; } catch ( Exception $ e ) { trigger_error ( "Catched Pupiq exception: " . $ e -> getMessage ( ) ) ; $ colors = array ( ) ; } if ( ! $ colors || ! array_key_exists ( "vibrant" , $ colors ) ) { $ colors = array ( "vibrant" => null , "light_vibrant" => null , "dark_vibrant" => null , "muted" => null , "light_muted" => null , "dark_muted" => null , ) ; } return $ colors ; }
Returns significant colors used in the image

This method is considered as non-critical and informative.
The process doesn't end when an error occurs during getColors() execution.

Correct result is being cached for a long time.

$colors = $pupiq->getColors();
echo $colors["vibrant"]; // e.g. "#F9DB30"

@return array
Returns significant colors used in the image