You are here

function theme_imagecacheactions_rgb in ImageCache Actions 7

Same name and namespace in other branches
  1. 8 utility-color.inc \theme_imagecacheactions_rgb()
  2. 6.2 utility-color.inc \theme_imagecacheactions_rgb()
  3. 6 utility.inc \theme_imagecacheactions_rgb()

Displays a chosen color for use in the style summary snippets, by actually rendering the color.

Parameters

array $variables:

Return value

string

4 calls to theme_imagecacheactions_rgb()
theme_coloractions_alpha_summary in coloractions/transparency.inc
Implements theme_hook() for the alpha effect summary.
theme_coloractions_colormultiply_summary in coloractions/imagecache_coloractions.module
Implements theme_hook() for the color multiply effect summary.
theme_coloractions_coloroverlay_summary in coloractions/imagecache_coloractions.module
Implements theme_hook() for the color overlay effect summary.
theme_coloractions_colorshift_summary in coloractions/imagecache_coloractions.module
Implements theme_hook() for the color shift effect summary.
1 theme call to theme_imagecacheactions_rgb()
theme_canvasactions_definecanvas_summary in canvasactions/canvasactions.inc
Implements theme_hook() for the define canvas effect summary.

File

./utility-color.inc, line 106
Utility functions for color widgets.

Code

function theme_imagecacheactions_rgb($variables) {
  if (!empty($variables['RGB']['HEX'])) {
    $hex = ltrim($variables['RGB']['HEX'], '#');
    return " <span style=\"width:2em; border:1px solid white; background-color:#{$hex}\" >&nbsp;#{$hex}&nbsp;</span>";
  }
  return ' ' . t('Transparent');
}