ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Public Member Functions | |
__construct ($id, $name, $color, $description="") | |
ilSystemStyleIconColor constructor. More... | |
getId () | |
setId ($id) | |
getColor () | |
setColor ($color) | |
getName () | |
setName ($name) | |
getDescription () | |
setDescription ($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 | |
$id = "" | |
$color = "" | |
$name = "" | |
$description = "" | |
$brightness = null | |
Definition at line 11 of file class.ilSystemStyleIconColor.php.
ilSystemStyleIconColor::__construct | ( | $id, | |
$name, | |||
$color, | |||
$description = "" |
|||
) |
ilSystemStyleIconColor constructor.
$id | |
$name | |
$color | |
$description |
Definition at line 60 of file class.ilSystemStyleIconColor.php.
References $color, $description, $id, $name, setColor(), setDescription(), setId(), and setName().
|
static |
Used to sort colors according to their brightness.
ilSystemStyleIconColor | $color1 | |
ilSystemStyleIconColor | $color2 |
Definition at line 221 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 186 of file class.ilSystemStyleIconColor.php.
References getColor().
Referenced by getDominatAspect(), and getPerceivedBrightness().
ilSystemStyleIconColor::getColor | ( | ) |
Definition at line 87 of file class.ilSystemStyleIconColor.php.
References $color.
Referenced by getBlueAspect(), getGreenAspect(), and getRedAspect().
ilSystemStyleIconColor::getDescription | ( | ) |
Definition at line 126 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 144 of file class.ilSystemStyleIconColor.php.
References $r, getBlueAspect(), getGreenAspect(), and getRedAspect().
ilSystemStyleIconColor::getGreenAspect | ( | ) |
Get green aspect from a color in hex format.
Definition at line 176 of file class.ilSystemStyleIconColor.php.
References getColor().
Referenced by getDominatAspect(), and getPerceivedBrightness().
ilSystemStyleIconColor::getId | ( | ) |
Definition at line 71 of file class.ilSystemStyleIconColor.php.
References $id.
Referenced by ilSystemStyleIconColorSet\addColor().
ilSystemStyleIconColor::getName | ( | ) |
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 198 of file class.ilSystemStyleIconColor.php.
References $brightness, $r, getBlueAspect(), getGreenAspect(), and getRedAspect().
Referenced by compareColors().
ilSystemStyleIconColor::getRedAspect | ( | ) |
Get red aspect from a color in hex format.
Definition at line 166 of file class.ilSystemStyleIconColor.php.
References getColor().
Referenced by getDominatAspect(), and getPerceivedBrightness().
ilSystemStyleIconColor::setColor | ( | $color | ) |
$color |
ilSystemStyleColorException |
Definition at line 96 of file class.ilSystemStyleIconColor.php.
References $color, color, and ilSystemStyleColorException\INVALID_COLOR_EXCEPTION.
Referenced by __construct().
ilSystemStyleIconColor::setDescription | ( | $description | ) |
string | $description |
Definition at line 134 of file class.ilSystemStyleIconColor.php.
References $description.
Referenced by __construct().
ilSystemStyleIconColor::setId | ( | $id | ) |
string | $id |
Definition at line 79 of file class.ilSystemStyleIconColor.php.
References $id.
Referenced by __construct().
ilSystemStyleIconColor::setName | ( | $name | ) |
string | $name |
Definition at line 118 of file class.ilSystemStyleIconColor.php.
References $name.
Referenced by __construct().
|
protected |
Definition at line 51 of file class.ilSystemStyleIconColor.php.
Referenced by getPerceivedBrightness().
|
protected |
Definition at line 30 of file class.ilSystemStyleIconColor.php.
Referenced by __construct(), getColor(), and setColor().
|
protected |
Definition at line 44 of file class.ilSystemStyleIconColor.php.
Referenced by __construct(), getDescription(), and setDescription().
|
protected |
Definition at line 23 of file class.ilSystemStyleIconColor.php.
Referenced by __construct(), getId(), and setId().
|
protected |
Definition at line 37 of file class.ilSystemStyleIconColor.php.
Referenced by __construct(), getName(), and setName().
const ilSystemStyleIconColor::BLUE = 3 |
Definition at line 16 of file class.ilSystemStyleIconColor.php.
Referenced by ilSystemStyleIconsGUI\preview(), ilSystemStyleIconColorSetTest\testGetColorsSortedAsArray(), and ilSystemStyleIconColorTest\testGetDominantAspect().
const ilSystemStyleIconColor::GREEN = 2 |
Definition at line 15 of file class.ilSystemStyleIconColor.php.
Referenced by ilSystemStyleIconsGUI\preview(), ilSystemStyleIconColorSetTest\testGetColorsSortedAsArray(), and ilSystemStyleIconColorTest\testGetDominantAspect().
const ilSystemStyleIconColor::GREY = 0 |
Definition at line 13 of file class.ilSystemStyleIconColor.php.
Referenced by ilSystemStyleIconsGUI\preview(), ilSystemStyleIconColorSetTest\testGetColorsSortedAsArray(), and ilSystemStyleIconColorTest\testGetDominantAspect().
const ilSystemStyleIconColor::RED = 1 |
Definition at line 14 of file class.ilSystemStyleIconColor.php.
Referenced by ilSystemStyleIconsGUI\preview(), ilSystemStyleIconColorSetTest\testGetColorsSortedAsArray(), and ilSystemStyleIconColorTest\testGetDominantAspect().