ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
BIFF8.php
Go to the documentation of this file.
1<?php
2
4
5class BIFF8
6{
7 protected static $map = [
8 '000000' => 0x08,
9 'FFFFFF' => 0x09,
10 'FF0000' => 0x0A,
11 '00FF00' => 0x0B,
12 '0000FF' => 0x0C,
13 'FFFF00' => 0x0D,
14 'FF00FF' => 0x0E,
15 '00FFFF' => 0x0F,
16 '800000' => 0x10,
17 '008000' => 0x11,
18 '000080' => 0x12,
19 '808000' => 0x13,
20 '800080' => 0x14,
21 '008080' => 0x15,
22 'C0C0C0' => 0x16,
23 '808080' => 0x17,
24 '9999FF' => 0x18,
25 '993366' => 0x19,
26 'FFFFCC' => 0x1A,
27 'CCFFFF' => 0x1B,
28 '660066' => 0x1C,
29 'FF8080' => 0x1D,
30 '0066CC' => 0x1E,
31 'CCCCFF' => 0x1F,
32 // '000080' => 0x20,
33 // 'FF00FF' => 0x21,
34 // 'FFFF00' => 0x22,
35 // '00FFFF' => 0x23,
36 // '800080' => 0x24,
37 // '800000' => 0x25,
38 // '008080' => 0x26,
39 // '0000FF' => 0x27,
40 '00CCFF' => 0x28,
41 // 'CCFFFF' => 0x29,
42 'CCFFCC' => 0x2A,
43 'FFFF99' => 0x2B,
44 '99CCFF' => 0x2C,
45 'FF99CC' => 0x2D,
46 'CC99FF' => 0x2E,
47 'FFCC99' => 0x2F,
48 '3366FF' => 0x30,
49 '33CCCC' => 0x31,
50 '99CC00' => 0x32,
51 'FFCC00' => 0x33,
52 'FF9900' => 0x34,
53 'FF6600' => 0x35,
54 '666699' => 0x36,
55 '969696' => 0x37,
56 '003366' => 0x38,
57 '339966' => 0x39,
58 '003300' => 0x3A,
59 '333300' => 0x3B,
60 '993300' => 0x3C,
61 // '993366' => 0x3D,
62 '333399' => 0x3E,
63 '333333' => 0x3F,
64 ];
65
73 public static function lookup($color)
74 {
75 if (isset(self::$map[$color])) {
76 return ['rgb' => self::$map[$color]];
77 }
78
79 return ['rgb' => '000000'];
80 }
81}
An exception for terminatinating execution or to throw for unit testing.
static lookup($color)
Map color array from BIFF8 built-in color index.
Definition: BIFF8.php:73