Drupal is a registered trademark of Dries Buytaert
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)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). eca 3.1.1 Minor update available for module eca (3.1.1). layout_paragraphs 2.1.3 Minor update available for module layout_paragraphs (2.1.3). ai 1.3.3 Minor update available for module ai (1.3.3). ai 1.2.14 Minor update available for module ai (1.2.14). node_revision_delete 2.0.3 Minor update available for module node_revision_delete (2.0.3). moderated_content_bulk_publish 2.0.52 Minor update available for module moderated_content_bulk_publish (2.0.52). klaro 3.0.10 Minor update available for module klaro (3.0.10). klaro 3.0.9 Minor update available for module klaro (3.0.9). layout_paragraphs 2.1.2 Minor update available for module layout_paragraphs (2.1.2). geofield_map 11.1.8 Minor update available for module geofield_map (11.1.8).

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
4 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