aryehraber/statamic-color-extractor
A Statamic addon that extracts a color palette from images, letting you pull dominant colors from assets and use them in templates, CSS, or design accents without manual picking.
aryehraber/statamic-color-extractor is a Statamic add-on that extracts dominant/accent colors from image assets and persists them as asset meta data, enabling data-driven theming (hero overlays, cards, per-record accent colors) without editors manually picking colors. v2.1.0 is an additive minor release: it introduces an artisan command plus an event listener that automatically extract color meta data. This is the single most operationally significant change so far, because it shifts the package from "a helper you call" to "a pipeline that runs on your behalf."
Architecture fit. The package sits naturally in the Statamic asset pipeline: a service provider registers the extraction logic, colors are written into asset meta, and the event listener hooks into asset lifecycle events (upload/save). That is idiomatic Laravel/Statamic — no schema changes, no custom tables, no front-end runtime dependency. It composes cleanly with Antlers/Blade templates and with static caching, provided extraction completes before a page is cached.
Integration feasibility. Low to moderate. composer require plus config publishing, then enable per asset container. The new command gives a backfill path for existing libraries, which removes the largest historical blocker (no way to populate colors on already-uploaded assets). The event listener removes the "editors must re-save assets" friction. Both are opt-in, which is the right default.
Technical risk. The dominant risk is when extraction runs, not whether it works. Image color extraction is CPU- and memory-bound; a synchronous listener on upload means an editor's upload request now includes decode + quantization of a potentially multi-megabyte image. Concrete risks:
max_execution_time / memory_limit failures, and lost uploads if the listener throws.Key questions for the maintainer/team spike:
ShouldQueue configurable?--force re-extraction?Stack fit. Statamic 3/4/5 on Laravel 9–11, PHP 8.1+, with GD or Imagick available in the runtime image. It is a pure add-on — no infrastructure, no external service, no new datastore. The only non-application dependency is the image extension, which should already exist if you're doing any asset transforms.
Migration path. Because there is no prior assessment, treat this as a greenfield adoption with an existing asset library:
Compatibility. v2.0.0 → v2.1.0 is a minor bump with additive behavior; no deprecations or breaking changes are indicated. The practical compatibility question is not the package version but the Statamic major version in your app — verify the composer constraint resolves against your pinned Statamic release before merging. If you are on Statamic 3, confirm the add-on's v2 line still supports it.
Sequencing. Ship in three separable increments so each can be rolled back independently:
Keep the event listener and the template consumption as separate releases. If extraction quality turns out to be poor for a class of imagery, you want to have shipped nothing that depends on it.
Maintenance. Very low ongoing surface: one composer dependency, one config file, no migrations. The cost is concentrated in the initial backfill and in monitoring. Pin to ~2.1.0 and let patch/minor upgrades flow through normal dependency review; treat a future major as a deliberate upgrade event. Keep a short internal note on the extraction field schema so template authors aren't reverse-engineering meta keys.
Support. Community/single-maintainer support with no commercial SLA. Acceptable for a presentation-layer enhancement; not acceptable if per-record color becomes a hard requirement for brand-critical pages. Mitigation: store the derived colors as ordinary asset meta so a replacement extractor can write the same keys and templates keep working — i.e., depend on the contract (meta keys), not the package.
Scaling. Extraction cost scales with asset count × image size, not with traffic — this is a one-time-plus-incremental workload, which is the good kind. Two scaling levers matter:
Downstream, front-end scaling is free: colors are static meta, so they participate in Statamic's static cache normally. Ensure extraction completes before a page is cached, or the first cached render will bake in missing colors.
Failure modes to instrument.
background-color, or pages will look broken in ways nobody attributes to the add-on.Ramp-up. Low for engineers — a half-day to install, read the config, and validate output on a sample; roughly a day to prove the queued listener and backfill in staging. The real enablement work is editorial and design: agree on which containers get colors, what the fallback palette is, and how color is used (accent only vs. full backgrounds with contrast requirements). Budget a short design review on contrast/legibility for text over extracted colors, since that is where "auto-extracted" most often produces unacceptable results.
How can I help you explore Laravel packages today?