Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Color Picker

Security covered Under active development 437 sites

Part of the Color ecosystem · 10 projects

This module provides a color picker form field. It allows users to select from a predefined list of hex colors, and their selection is saved as the field's value.

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',
    ];
Drupal 10–11

Ask your assistant about Color Picker

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
9
Tracked since
Oct 2023
Latest release
2 years ago
Releases (12 mo)
0
Maintenance
Dormant

Release Timeline

Releases

Version Type Core PHP Release date
2.0.3 Stable 10–11 Feb 11, 2024
2.0.2 Stable 10–11 Dec 16, 2023
2.0.1 Stable 10 Nov 16, 2023
1.0.6 Stable 8–9 Nov 16, 2023
2.x-dev Dev 10–11 Nov 16, 2023
1.0.5 Stable 8–9 Nov 16, 2023
2.0.0 Stable 10 Nov 16, 2023
1.0.4 Stable 8–10 Nov 16, 2023
1.0.3 Stable 8–10 Oct 7, 2023