Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Generic colors

No security coverage Under active development

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.

Ask your assistant about Generic colors

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

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
10 months ago
Releases (12 mo)
6 ▲ from 0
Maintenance
Slowing

Release Timeline

Releases

Version Type Core PHP 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