function imagecache_colorshift_form in ImageCache Actions 6.2
Same name and namespace in other branches
- 5.3 imagecache_coloractions.module \imagecache_colorshift_form()
- 5.2 imagecache_coloractions.module \imagecache_colorshift_form()
- 6 imagecache_coloractions.module \imagecache_colorshift_form()
Implementation of imagecache_hook_form()
Settings for colorshift actions.
Parameters
$action array of settings for this action:
Return value
a form definition
File
- coloractions/
imagecache_coloractions.module, line 94 - Additional actions for imagecache processing.
Code
function imagecache_colorshift_form($action) {
$defaults = array(
'RGB' => array(
'HEX' => '#FF0000',
),
);
$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 colorshift 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;
}