# thephpleague/color-extractor

Extract colors from an image like a human would do.

Repository: https://github.com/thephpleague/color-extractor
Canonical: https://ross.abutalabs.com/products/color-extractor
Language: PHP
License: MIT
License Family: permissive
Last push: 2026-08-24T15:58:00+00:00

## Health v2 (maintenance only)
Score: 88/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 66, longevity 100
- inputs: {"age_days": 4793, "days_push": 9, "days_rel": 12, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1323, forks 155 (observed 2026-08-28T04:04:22.196844+00:00)

## What it is
A PHP library that extracts the most representative colors from an image, building a color palette sorted by pixel count. It handles transparency by blending against a configurable background color.

## Use cases
- extract dominant colors from an image in php
- generate a color palette from a png or jpeg
- get the most used colors in a picture
- pick representative colors for thumbnails or theme generation
- handle transparent pixels when extracting image colors

## When to choose
- you need dominant or representative colors from images in a PHP project
- you want a simple Composer-installable palette extractor with transparency handling

## When to avoid
- you need advanced color quantization or perceptual color spaces beyond basic extraction
- you are not working in PHP

## Facets
- artifact type: library
- maturity: stable
- function: image-processing
- domain: image-processing, developer-tools
- platform: php
- tags: color-palette, dominant-colors, gd, composer

## Member repositories
- thephpleague/color-extractor (main) score 88

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:22.196844+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:47:06.144499+00:00, confidence not recorded.
  - readme: https://github.com/thephpleague/color-extractor (fetched 2026-08-28T04:04:22.196844+00:00, sha 4500dde3deed)
- Data as of 2026-08-30T08:39:29.467469+00:00.
