function _color_gd
Same name in other branches
- 7.x modules/color/color.module \_color_gd()
- 9 core/modules/color/color.module \_color_gd()
Converts a hex triplet into a GD color.
1 call to _color_gd()
- _color_render_images in core/
modules/ color/ color.module - Renders images that match a given palette.
File
-
core/
modules/ color/ color.module, line 744
Code
function _color_gd($img, $hex) {
$c = array_merge([
$img,
], _color_unpack($hex));
return call_user_func_array('imagecolorallocate', $c);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.