How can I get the rgb values when accessing the field?

Also it is a little funny that the field outputs in rgb when it is actually hex saved:

$field = $node->field_category_color[LANGUAGE_NONE][0]['rgb'];
// who can I get the outputted HEX value in RGB?

Comments

mikeytown2’s picture

Issue summary: View changes

Something like this?
http://bavotasan.com/2011/convert-hex-color-to-rgb-using-php/
http://stackoverflow.com/questions/15202079/convert-hex-color

  list($r,$g,$b) = array_map('hexdec', str_split(ltrim($colorName, '#'), 2));