Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
mikeytown2 CreditAttribution: mikeytown2 commentedSomething like this?
http://bavotasan.com/2011/convert-hex-color-to-rgb-using-php/
http://stackoverflow.com/questions/15202079/convert-hex-color