You are here

function ctools_color_gd in Chaos Tool Suite (ctools) 6

Convert a hex triplet into a GD color.

1 call to ctools_color_gd()
ctools_stylizer_image_processor::command_fill in includes/stylizer.inc

File

includes/stylizer.inc, line 1735
Create customized CSS and images from palettes created by user input.

Code

function ctools_color_gd($img, $hex) {
  $c = array_merge(array(
    $img,
  ), ctools_color_unpack($hex));
  return call_user_func_array('imagecolorallocate', $c);
}