ILIAS
release_8 Revision v8.19
|
Public Member Functions | |
__construct (string $id, string $name, string $color, string $description='') | |
ilSystemStyleIconColor constructor. More... | |
getId () | |
setId (string $id) | |
getColor () | |
setColor (string $color) | |
getName () | |
setName (string $name) | |
getDescription () | |
setDescription (string $description) | |
getDominatAspect () | |
Used to order the colors according to their dominant aspect. More... | |
getRedAspect () | |
Get red aspect from a color in hex format. More... | |
getGreenAspect () | |
Get green aspect from a color in hex format. More... | |
getBlueAspect () | |
Get blue aspect from a color in hex format. More... | |
getPerceivedBrightness () | |
Used to sort the colors according to their brightness. More... | |
Static Public Member Functions | |
static | compareColors (ilSystemStyleIconColor $color1, ilSystemStyleIconColor $color2) |
Used to sort colors according to their brightness. More... | |
Data Fields | |
const | GREY = 0 |
const | RED = 1 |
const | GREEN = 2 |
const | BLUE = 3 |
Protected Attributes | |
string | $id = '' |
Unique ID to identify the color by (currently same as color) More... | |
string | $color = '' |
Value of the color. More... | |
string | $name = '' |
Name of the color in text. More... | |
string | $description = '' |
Description of the color. More... | |
Definition at line 24 of file class.ilSystemStyleIconColor.php.
ilSystemStyleIconColor::__construct | ( | string | $id, |
string | $name, | ||
string | $color, | ||
string | $description = '' |
||
) |
ilSystemStyleIconColor constructor.
Definition at line 54 of file class.ilSystemStyleIconColor.php.
References setColor(), setDescription(), setId(), and setName().
|
static |
Used to sort colors according to their brightness.
Definition at line 177 of file class.ilSystemStyleIconColor.php.
References getPerceivedBrightness().
Referenced by ilSystemStyleIconColorTest\testCompareColors().
ilSystemStyleIconColor::getBlueAspect | ( | ) |
Get blue aspect from a color in hex format.
Definition at line 151 of file class.ilSystemStyleIconColor.php.
References getColor().
Referenced by getDominatAspect(), and getPerceivedBrightness().
ilSystemStyleIconColor::getColor | ( | ) |
Definition at line 72 of file class.ilSystemStyleIconColor.php.
References $color.
Referenced by getBlueAspect(), getGreenAspect(), and getRedAspect().
ilSystemStyleIconColor::getDescription | ( | ) |
Definition at line 101 of file class.ilSystemStyleIconColor.php.
References $description.
ilSystemStyleIconColor::getDominatAspect | ( | ) |
Used to order the colors according to their dominant aspect.
Due to the vast numbers of colors to be displayed to the user, they must be ordered in some fashion, dominant aspect and brightness are possible values.
Definition at line 115 of file class.ilSystemStyleIconColor.php.
References Vendor\Package\$b, getBlueAspect(), getGreenAspect(), and getRedAspect().
ilSystemStyleIconColor::getGreenAspect | ( | ) |
Get green aspect from a color in hex format.
Definition at line 143 of file class.ilSystemStyleIconColor.php.
References getColor().
Referenced by getDominatAspect(), and getPerceivedBrightness().
ilSystemStyleIconColor::getId | ( | ) |
Definition at line 62 of file class.ilSystemStyleIconColor.php.
References $id.
Referenced by ilSystemStyleIconColorSet\addColor().
ilSystemStyleIconColor::getName | ( | ) |
Definition at line 91 of file class.ilSystemStyleIconColor.php.
References $name.
ilSystemStyleIconColor::getPerceivedBrightness | ( | ) |
Used to sort the colors according to their brightness.
Due to the vast numbers of colors to be displayed to the user, they must be ordered in some fashion, dominant aspect and brightness are possible values. See: https://en.wikipedia.org/wiki/YIQ
Definition at line 161 of file class.ilSystemStyleIconColor.php.
References Vendor\Package\$b, getBlueAspect(), getGreenAspect(), and getRedAspect().
Referenced by compareColors().
ilSystemStyleIconColor::getRedAspect | ( | ) |
Get red aspect from a color in hex format.
Definition at line 135 of file class.ilSystemStyleIconColor.php.
References getColor().
Referenced by getDominatAspect(), and getPerceivedBrightness().
ilSystemStyleIconColor::setColor | ( | string | $color | ) |
ilSystemStyleColorException |
Definition at line 80 of file class.ilSystemStyleIconColor.php.
References $color, and ilSystemStyleColorException\INVALID_COLOR_EXCEPTION.
Referenced by __construct().
ilSystemStyleIconColor::setDescription | ( | string | $description | ) |
Definition at line 106 of file class.ilSystemStyleIconColor.php.
References $description.
Referenced by __construct().
ilSystemStyleIconColor::setId | ( | string | $id | ) |
Definition at line 67 of file class.ilSystemStyleIconColor.php.
References $id.
Referenced by __construct().
ilSystemStyleIconColor::setName | ( | string | $name | ) |
Definition at line 96 of file class.ilSystemStyleIconColor.php.
References $name.
Referenced by __construct().
|
protected |
Value of the color.
Definition at line 39 of file class.ilSystemStyleIconColor.php.
Referenced by getColor(), and setColor().
|
protected |
Description of the color.
Definition at line 49 of file class.ilSystemStyleIconColor.php.
Referenced by getDescription(), and setDescription().
|
protected |
Unique ID to identify the color by (currently same as color)
Definition at line 34 of file class.ilSystemStyleIconColor.php.
|
protected |
Name of the color in text.
Definition at line 44 of file class.ilSystemStyleIconColor.php.
const ilSystemStyleIconColor::BLUE = 3 |
Definition at line 29 of file class.ilSystemStyleIconColor.php.
Referenced by ilSystemStyleIconsGUI\preview(), ilSystemStyleIconColorSetTest\testGetColorsSortedAsArray(), and ilSystemStyleIconColorTest\testGetDominantAspect().
const ilSystemStyleIconColor::GREEN = 2 |
Definition at line 28 of file class.ilSystemStyleIconColor.php.
Referenced by ilSystemStyleIconsGUI\preview(), ilSystemStyleIconColorSetTest\testGetColorsSortedAsArray(), and ilSystemStyleIconColorTest\testGetDominantAspect().
const ilSystemStyleIconColor::GREY = 0 |
Definition at line 26 of file class.ilSystemStyleIconColor.php.
Referenced by ilSystemStyleIconsGUI\preview(), ilSystemStyleIconColorSetTest\testGetColorsSortedAsArray(), and ilSystemStyleIconColorTest\testGetDominantAspect().
const ilSystemStyleIconColor::RED = 1 |
Definition at line 27 of file class.ilSystemStyleIconColor.php.
Referenced by ilSystemStyleIconsGUI\preview(), ilSystemStyleIconColorSetTest\testGetColorsSortedAsArray(), and ilSystemStyleIconColorTest\testGetDominantAspect().