3 include_once(
"Services/Style/System/classes/Icons/class.ilSystemStyleIconColor.php");
4 include_once(
"Services/Style/System/classes/Exceptions/class.ilSystemStyleColorException.php");
18 $this->assertEquals(
"id", $color->getId());
19 $this->assertEquals(
"name", $color->getName());
20 $this->assertEquals(
"FF0000", $color->getColor());
21 $this->assertEquals(
"description", $color->getDescription());
28 $color->setId(
"idnew");
29 $color->setName(
"namenew");
30 $color->setColor(
"EE0000");
31 $color->setDescription(
"descriptionnew");
33 $this->assertEquals(
"idnew", $color->getId());
34 $this->assertEquals(
"namenew", $color->getName());
35 $this->assertEquals(
"EE0000", $color->getColor());
36 $this->assertEquals(
"descriptionnew", $color->getDescription());
43 $this->assertEquals(
"ABCDEF", $color->getColor());
50 $this->assertTrue(
false);
59 $this->assertTrue(
false);
68 $this->assertTrue(
false);
102 $this->assertEquals(255, ceil(
$white->getPerceivedBrightness()));
103 $this->assertEquals(0, ceil(
$black->getPerceivedBrightness()));
104 $this->assertEquals(170, ceil($grey->getPerceivedBrightness()));
105 $this->assertEquals(140, ceil(
$red->getPerceivedBrightness()));
106 $this->assertEquals(196, ceil(
$green->getPerceivedBrightness()));
107 $this->assertEquals(87, ceil(
$blue->getPerceivedBrightness()));
static compareColors(ilSystemStyleIconColor $color1, ilSystemStyleIconColor $color2)
Used to sort colors according to their brightness.
testGetPerceivedBrightness()
Class for advanced editing exception handling in ILIAS.
const INVALID_COLOR_EXCEPTION