You are here

function coloractions_coloroverlay_form in ImageCache Actions 8

Same name and namespace in other branches
  1. 7 coloractions/imagecache_coloractions.module \coloractions_coloroverlay_form()

Image effect form callback for the color overlay effect.

Parameters

array $data: The current configuration for this image effect.

Return value

array The form definition for this effect.

1 string reference to 'coloractions_coloroverlay_form'
imagecache_coloractions_image_effect_info in coloractions/imagecache_coloractions.module
Implements hook_image_effect_info().

File

coloractions/imagecache_coloractions.module, line 300

Code

function coloractions_coloroverlay_form(array $data) {
  $defaults = array(
    'RGB' => array(
      'HEX' => '#E2DB6A',
    ),
  );
  $data = array_merge($defaults, (array) $data);
  $form = array(
    '#theme' => 'imagecache_rgb_form',
  );
  $form['RGB'] = imagecache_rgb_form($data['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;
}