1 form.inc theme_color($variables)

Returns HTML for a color form element.

Parameters

$variables: An associative array containing:

  • element: An associative array containing the properties of the element. Properties used: #title, #value, #description, #attributes.

Related topics

File

core/includes/form.inc, line 4584
Functions for form and batch generation and processing.

Code

function theme_color($variables) {
  $element = $variables['element'];
  $element['#attributes']['type'] = 'color';
  element_set_attributes($element, array('id', 'name', 'value'));
  _form_set_class($element, array('form-color'));

  return '<input' . backdrop_attributes($element['#attributes']) . ' />' . backdrop_render_children($element);
}