Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Release: Opensolr Search 4.5.0 Minor update available for module opensolr_search (4.5.0). Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Usage Milestone: Simplify Module simplify crossed 10,000 active installs. Usage Milestone: Views Reference Filter Module entityreference_filter crossed 10,000 active installs. Usage Milestone: Dropdown Language Module dropdown_language crossed 10,000 active installs. Usage Milestone: Paragraphs Browser Module paragraphs_browser crossed 10,000 active installs. Usage Milestone: OpenAPI Module openapi crossed 10,000 active installs. Usage Milestone: Decoupled Router Module decoupled_router crossed 10,000 active installs. Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

This module provides an AI tool to extract dominant colors from images using a local PHP library. It saves on AI token usage by handling color extraction directly. It can also automate updating text fields with extracted colors when content is saved.

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.

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
6
Tracked since
Nov 2025
Latest release
9 months ago
Releases (12 mo)
6 ▲ from 0
Maintenance
Slowing

Release Timeline

Releases

Version Type Core Release date
1.0.0-alpha5 Pre-release 10–11 Nov 25, 2025
1.0.0-alpha4 Pre-release 10–11 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 10–11 Nov 19, 2025