The ability to define a small palette of colors (see attached mockup) for a user to select from would be nice (perhaps in Field Settings). These might be colors that fit a site's color scheme, so that the user does not already need to know the precise hex values for them.

CommentFileSizeAuthor
example_color-picker_ui.png31.91 KBLaurenH
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

emilybennet’s picture

This would be totally cool and highly useful for maintaining a color scheme in user content… :D

plopesc’s picture

Hello

How I could include the palette in the jQuery plugin?

I'm reading documentation but I can't find the way to include it.

Thank you

alanom’s picture

Edit: ignore this, I made some assumptions about existing modules. Seems like this feature is pretty rare at the moment. I'm surprised there doesn't seem to be a simple module where you input colours into a text area on defining a field like the option list widget (like #ff0000|Bright red seperated by line breaks) then it gives you those options.
__________________

For setting the colours, you could look at (or, maybe even consider merging with) modules like colorfield which support choosing colour presets, to have another optional widget with presets using a system like color fields' for inputting presets. Then, assuming this feature doesn't already exist as an option in the jQuery plugin's API, you could add some custom javascript that is used in cases where the widget with presets is being used, that appends HTML elements to the color picker element and binds click events to them.

Jaypan’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

It's a good idea, but it's outside the scope of what this module was designed to do. If someone wants to supply a patch, I'll be happy to take a look.