Esempio n. 1
0
 /**
  * build the epocLevel Array automatically by calculating an array of colors
  *
  * @param string $latestColor   color of latest epocLevel (usually dark)
  * @param string $earliestColor color of earliest epocLevel (usually light)
  * @param int    $thresholds    number of levels to generate colors for
  *
  * @return array epocLevel
  *
  * @since Method available since Release 0.2.0
  */
 private function _generateEpocLevel($latestColor, $earliestColor, $thresholds)
 {
     include_once 'Image/Color.php';
     $imageColor = new Image_Color();
     $imageColor->setWebSafe(false);
     $imageColor->setColors($latestColor, $earliestColor);
     $epocLevel = array();
     foreach ($imageColor->getRange($thresholds) as $key => $color) {
         $epocLevel[]['epocLevel' . $key] = array('link' => $color, 'visited' => $color);
     }
     return array_reverse($epocLevel);
 }