This module extends the Forms API by adding a "color_picker" type field for use in custom forms. The element allows you to specify a list of hex colors that the user can choose from and the selection is stored as the field value.
It's usage is as follows:
$form['bg_colour'] = [
'#type' => 'color_picker',
'#title' => t('Background Color'),
'#description' => t('Select the background color.'),
'#default_value' => '#000000',
'#color_values' => '#000000,#ff0000,#00ff00,#0000ff,#ffffff',
];
Project information
- Project categories: Site structure
428 sites report using this module
- Created by scot.hubbard on , updated
Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.
