Esempio n. 1
0
 /** Returns an array containing the two web safe colors closest to the
  *actual color represented by the current ColorChip.
  *@return array An array containing the two ColorChip objects of the closest web safe colors to the original
  *@see RenderWebSafeDither
  *@access public
  */
 function getWebSafeDither()
 {
     $color1 = $this->getNearestWebSafe();
     $color2 = $this->clone();
     $color2->r = ColorChip::getNearestWebSafeComponent($color2->r, CC_WEBSAFE_ALT);
     $color2->g = ColorChip::getNearestWebSafeComponent($color2->g, CC_WEBSAFE_ALT);
     $color2->b = ColorChip::getNearestWebSafeComponent($color2->b, CC_WEBSAFE_ALT);
     $color2->_updateHsv();
     $color2->_updateHex();
     return array($color1, $color2);
 }