Drupal is a registered trademark of Dries Buytaert
cms 2.1.3 Update released for Drupal core (2.1.3)! drupal 10.5.11 Update released for Drupal core (10.5.11)! drupal 11.3.11 Update released for Drupal core (11.3.11)! drupal 11.2.13 Update released for Drupal core (11.2.13)! drupal 10.6.10 Update released for Drupal core (10.6.10)! cms 2.1.2 Update released for Drupal core (2.1.2)! drupal 11.1.10 Update released for Drupal core (11.1.10)! drupal 10.5.10 Update released for Drupal core (10.5.10)! drupal 10.4.10 Update released for Drupal core (10.4.10)! drupal 11.2.12 Update released for Drupal core (11.2.12)! drupal 11.3.10 Update released for Drupal core (11.3.10)! drupal 10.6.9 Update released for Drupal core (10.6.9)! drupal 10.6.8 Update released for Drupal core (10.6.8)! drupal 11.3.9 Update released for Drupal core (11.3.9)! drupal 11.3.8 Update released for Drupal core (11.3.8)! drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)!

About

Generic Colors is an AI Agent Tool for retrieving predominant colors from images using a local PHP library.
By using this tool you can save on tokens sent to the LLM if the task is just to retrieve predominant colors from images.

Installation and usage

The module needs the composer package `ksubileau/color-thief-php`.

Install as a Drupal module and head to the agents explorer page to test it.
Locate the tool in the dropdown, enter a file id or a media id and see the result.

Then it can be added as a Tool in any Drupal AI Agent.

Example response

dominant_color: '#bdada9'
colors:
- { color: '#c4aab7', percentage: 21.53 }
- { color: '#6edecd', percentage: 18.32 }
- { color: '#b9cb77', percentage: 14.55 }
- { color: '#d63280', percentage: 12.77 }
- { color: '#49d1da', percentage: 8.38 }
- { color: '#d967b4', percentage: 8.33 }
- { color: '#8ec3bf', percentage: 8.13 }
- { color: '#d51132', percentage: 3.67 }
- { color: '#dc31d3', percentage: 3.46 }
- { color: '#c4a952', percentage: 0.86 }

Use as an AI Automator

This module comes bundled with an automator which can be attached to
a multivalue text field. When a node is saved, the automator will call
the Generic Colors Tool with the configured image field and update the
node field with the colors received. Note that the Automator will have
to be manually added to the custom field. See attached image for field configuration.

Activity

Total releases
6
First release
Nov 2025
Latest release
6 months ago
Release cadence
1 day
Stability
0% stable

Release Timeline

Releases

Version Type Release date
1.0.0-alpha5 Pre-release Nov 25, 2025
1.0.0-alpha4 Pre-release Nov 24, 2025
1.0.0-alpha3 Pre-release Nov 24, 2025
1.0.0-alpha2 Pre-release Nov 24, 2025
1.0.0-alpha1 Pre-release Nov 19, 2025
1.0.x-dev Dev Nov 19, 2025