protected function isValid()
{
$valid = true;
$hexValues = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f');
$hex = str_split($this->hex);
foreach ($hex as $h) {
if (!in_array($h, $hexValues)) {
$valid = false;
}
}
return $valid;
}