function __construct($obj = NULL) { SetPublicProp::go($this, $obj); $this->colorRGB = ColorUtil::hex2rgb($this->colorHex, $this->opacity); $this->colorRGB = "rgba(" . implode(",", $this->colorRGB) . ")"; }
public function testStringToHex() { $util = new ColorUtil(); $this->assertEquals('#008000', $util->GetHexString('green'), 'Test hex value for color green'); $this->assertEquals('#FFFFFF', $util->GetHexString('white'), 'Test hex value for color white'); }