diff options
author | Anton Luka Šijanec <anton@sijanec.eu> | 2024-05-27 13:08:29 +0200 |
---|---|---|
committer | Anton Luka Šijanec <anton@sijanec.eu> | 2024-05-27 13:08:29 +0200 |
commit | 75160b12821f7f4299cce7f0b69c83c1502ae071 (patch) | |
tree | 27e25e4ccaef45f0c58b22831164050d1af1d4db /vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/Color/BuiltIn.php | |
parent | prvi-commit (diff) | |
download | 1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar 1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.gz 1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.bz2 1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.lz 1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.xz 1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.zst 1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.zip |
Diffstat (limited to '')
-rw-r--r-- | vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/Color/BuiltIn.php | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/Color/BuiltIn.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/Color/BuiltIn.php new file mode 100644 index 0000000..2658f0e --- /dev/null +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/Color/BuiltIn.php @@ -0,0 +1,35 @@ +<?php
+
+namespace PhpOffice\PhpSpreadsheet\Reader\Xls\Color;
+
+class BuiltIn
+{
+ protected static $map = [
+ 0x00 => '000000',
+ 0x01 => 'FFFFFF',
+ 0x02 => 'FF0000',
+ 0x03 => '00FF00',
+ 0x04 => '0000FF',
+ 0x05 => 'FFFF00',
+ 0x06 => 'FF00FF',
+ 0x07 => '00FFFF',
+ 0x40 => '000000', // system window text color
+ 0x41 => 'FFFFFF', // system window background color
+ ];
+
+ /**
+ * Map built-in color to RGB value.
+ *
+ * @param int $color Indexed color
+ *
+ * @return array
+ */
+ public static function lookup($color)
+ {
+ if (isset(self::$map[$color])) {
+ return ['rgb' => self::$map[$color]];
+ }
+
+ return ['rgb' => '000000'];
+ }
+}
|