public function get($type = \Pop\Color\Color::STRING, $hash = false, $short = false)
{
$hex = null;
switch ($type) {
case 1:
$hex = array('r' => $this->red, 'g' => $this->green, 'b' => $this->blue);
break;
case 2:
$hex = array($this->red, $this->green, $this->blue);
break;
case 3:
if ($short && null !== $this->shorthand) {
$hex = $hash ? '#' . $this->shorthand : $this->shorthand;
} else {
$hex = $hash ? '#' . $this->hex : $this->hex;
}
break;
}
return $hex;
}