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(); } }
/** * Get hash code * * @return string Hash code */ public function getHashCode() { return md5(($this->visible ? 't' : 'f') . $this->blurRadius . $this->distance . $this->direction . $this->alignment . $this->color->getHashCode() . $this->alpha . __CLASS__); }
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(); } elseif (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'; }