You are here

function imagecache_coloroverlay_form in ImageCache Actions 6.2

Implementation of imagecache_hook_form()

Settings for coloroverlay actions.

Parameters

$action array of settings for this action:

Return value

a form definition

File

coloractions/imagecache_coloractions.module, line 166
Additional actions for imagecache processing.

Code

function imagecache_coloroverlay_form($action) {
  $defaults = array(
    'RGB' => array(
      'HEX' => '#E2DB6A',
    ),
  );
  $action = array_merge($defaults, (array) $action);
  $form = array(
    '#theme' => 'imagecache_rgb_form',
  );
  $form['RGB'] = imagecache_rgb_form($action['RGB']);
  $form['note'] = array(
    '#value' => t("<p>\n    Note that color overlay is a mathematical filter that doesn't always\n    have the expected result.\n    To shift an image precisely TO a target color,\n    desaturate (greyscale) it before colorizing.\n    The hue (color wheel) is the <em>direction</em> the\n    existing colors are shifted. The tone (inner box) is the amount.\n    Keep the tone half-way up the left site of the color box\n    for best results.\n  </p>"),
  );
  return $form;
}