Ejemplo n.º 1
0
 private static function readColor($color, $background = false)
 {
     if (isset($color["rgb"])) {
         return (string) $color["rgb"];
     } elseif (isset($color["indexed"])) {
         return PHPExcel_Style_Color::indexedColor($color["indexed"] - 7, $background)->getARGB();
     }
 }
Ejemplo n.º 2
0
	private function _readColor($color) {
		if (isset($color["rgb"])) {
			return (string)$color["rgb"];
		} else if (isset($color["indexed"])) {
			return PHPExcel_Style_Color::indexedColor($color["indexed"])->getARGB();
		}
	}
Ejemplo n.º 3
0
 private static function _readColor($color, $background = FALSE)
 {
     if (isset($color["rgb"])) {
         return (string) $color["rgb"];
     } else {
         if (isset($color["indexed"])) {
             return PHPExcel_Style_Color::indexedColor($color["indexed"] - 7, $background)->getARGB();
         } else {
             if (isset($color["theme"])) {
                 if (self::$_theme !== NULL) {
                     $returnColour = self::$_theme->getColourByIndex((int) $color["theme"]);
                     if (isset($color["tint"])) {
                         $tintAdjust = (double) $color["tint"];
                         $returnColour = PHPExcel_Style_Color::changeBrightness($returnColour, $tintAdjust);
                     }
                     return 'FF' . $returnColour;
                 }
             }
         }
     }
     if ($background) {
         return 'FFFFFFFF';
     }
     return 'FF000000';
 }