Add a new color field type

Created on 20 August 2012, almost 13 years ago
Updated 30 January 2023, over 2 years ago

Now that we have #1445224: Add new HTML5 FAPI element: color landed for FAPI, we should really add the ability to have a color field type. It should probably have one column 'color' of type SQL varchar(7), and a field widget using the new HTML5 FAPI type, and a default formatter of just 'plain text' that outputs the raw value.

Based on #1675000: Allow selecting an alpha channel for the color FAPI element we may add support for an 'alpha' column via a field setting (since it changes the field schema).

Feature request
Status

Needs work

Version

10.1

Component

field system

Created by

🇺🇸United States dave reid Nebraska USA

Live updates comments and jobs are added and updated live.
  • html5

    Implements and supports the use of HTML5.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • The Needs Review Queue Bot tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

    Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.

    Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

  • 🇬🇧United Kingdom catch

    There are about 30,000 Drupal 8+ sites using https://www.drupal.org/project/color_field , which is a fair amount, but I'm not sure it's enough to justify adding the field type to core. We're already considering moving telephone to contrib since that isn't widely used. Moving this to the core ideas queue for new feature evaluation.

  • 🇬🇧United Kingdom catch

    Moving this to Drupal CMS - if this field was in heavy use in Drupal CMS or experience builder, then it could end up being a core candidate, but if not, I think it is fine for it to live in contrib.

  • 🇦🇺Australia pameeela

    We have no need for it now, so I don't see any reason to keep this open. Generally our approach is to add a module as the need arises, so if in future we need it, we will add it.

  • pere orga Catalonia

    Let's go back to Drupal core then.

    Also, note that https://www.drupal.org/project/color_field module has currently 53,021 reported installs, which as of now it is more than what Drupal CMS has. So there is at least some "need".

  • 🇬🇧United Kingdom catch

    For core evaluation this first needs an issue summary update for what exactly is being proposed for addition for core, who is planning to do the work, whether it would start as an experimental module etc., and then once that's available it will need product manager review.

  • pere orga Catalonia

    Removing "Needs product manager review" tag, as I understand the stated steps need to happen first

Production build 0.71.5 2024