function theme_color

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

1 theme call to theme_color()
system_element_info in drupal/core/modules/system/system.module
Implements hook_element_info().

File

drupal/core/includes/form.inc, line 4305
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_attributes($element, array(
    'form-color',
  ));
  return '<input' . new Attribute($element['#attributes']) . ' />' . drupal_render_children($element);
}