ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
BuiltIn.php
Go to the documentation of this file.
1<?php
2
4
5class BuiltIn
6{
7 protected static $map = [
8 0x00 => '000000',
9 0x01 => 'FFFFFF',
10 0x02 => 'FF0000',
11 0x03 => '00FF00',
12 0x04 => '0000FF',
13 0x05 => 'FFFF00',
14 0x06 => 'FF00FF',
15 0x07 => '00FFFF',
16 0x40 => '000000', // system window text color
17 0x41 => 'FFFFFF', // system window background color
18 ];
19
27 public static function lookup($color)
28 {
29 if (isset(self::$map[$color])) {
30 return ['rgb' => self::$map[$color]];
31 }
32
33 return ['rgb' => '000000'];
34 }
35}
An exception for terminatinating execution or to throw for unit testing.
static lookup($color)
Map built-in color to RGB value.
Definition: BuiltIn.php:27