This module calculates the dominant color of the image. The setup when using this module is as follows:
- There will be a vocabulary holding colors that you need to predefine.
- there will be at least one content type holding an image field and a reference to the color taxonomy.

INSTALL:
- Install https://www.drupal.org/project/registry_autoload module.
- Install this module as usual.

CONFIGURE:
1. Create taxonomy term with HEX-color field:
/admin/structure/taxonomy/color
Click Add/Edit, and you can fill here the name of the color and it's HEX code.

2. Then you should go to settings of the module:
/admin/config/media/dominantcolor
Select the appropriate taxonomy term vocabulary here and required field and Undefined term (this is optional).

3. Then go to manage fields of any node type:
Here settings for image field instance:
/admin/structure/types/manage/article/fields/field_image
Here you see "Dominant color" fieldset. If enabled - it will calculate Dominant color, but also you should set "Field for storing calculated dominant color" - of course, you should before create term field associated with vocabulary mention above.

4. So after enabling this module and performing step 1-3, each time a node is added or edited, the dominant color will be calculated and stored into "Field for storing calculated dominant color".

Supporting organizations: 

Project information

Releases