3 include_once(
"Services/Style/System/classes/Icons/class.ilSystemStyleIconColor.php");
4 include_once(
"Services/Style/System/classes/Exceptions/class.ilSystemStyleColorException.php");
17 $this->assertEquals(
"id",$color->getId());
18 $this->assertEquals(
"name",$color->getName());
19 $this->assertEquals(
"FF0000",$color->getColor());
20 $this->assertEquals(
"description",$color->getDescription());
26 $color->setId(
"idnew");
27 $color->setName(
"namenew");
28 $color->setColor(
"EE0000");
29 $color->setDescription(
"descriptionnew");
31 $this->assertEquals(
"idnew",$color->getId());
32 $this->assertEquals(
"namenew",$color->getName());
33 $this->assertEquals(
"EE0000",$color->getColor());
34 $this->assertEquals(
"descriptionnew",$color->getDescription());
40 $this->assertEquals(
"ABCDEF",$color->getColor());
46 $this->assertTrue(
false);
54 $this->assertTrue(
false);
62 $this->assertTrue(
false);
94 $this->assertEquals(255,ceil (
$white->getPerceivedBrightness()));
95 $this->assertEquals(0,ceil (
$black->getPerceivedBrightness()));
96 $this->assertEquals(170,ceil ($grey->getPerceivedBrightness()));
97 $this->assertEquals(140,ceil (
$red->getPerceivedBrightness()));
98 $this->assertEquals(196,ceil (
$green->getPerceivedBrightness()));
99 $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