Same name and namespace in other branches
- 7.x-2.x color_field.module \color_field_hex2rgb()
- 8.x-1.x color_field.module \color_field_hex2rgb()
Helper: Convert HEX6 to RGB.
Paramètres
$hex.:
Fichier
-
./
color_field.module, line 776
Code
function color_field_hex2rgb($hex = FALSE) {
$r = hexdec(substr($hex, 0, 2));
$g = hexdec(substr($hex, 2, 2));
$b = hexdec(substr($hex, -2));
return compact('r', 'g', 'b');
}