PHPackages                             mauriciourrego/colorcube-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Image &amp; Media](/categories/media)
4. /
5. mauriciourrego/colorcube-php

ActiveLibrary[Image &amp; Media](/categories/media)

mauriciourrego/colorcube-php
============================

Dominant color extraction from RGB images — PHP port of Ole Krause-Sparman's algorithm.

v1.0.0(2y ago)1401MITPHP

Since Jul 28Pushed 2y ago1 watchersCompare

[ Source](https://github.com/Mauricio-Urrego/colorcube-php)[ Packagist](https://packagist.org/packages/mauriciourrego/colorcube-php)[ RSS](/packages/mauriciourrego-colorcube-php/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Install
=======

[](#install)

`composer require mauriciourrego/colorcube-php`

colorcube-php
=============

[](#colorcube-php)

Dominant color extraction from RGB images — PHP port of Ole Krause-Sparman's algorithm.

[Demo](https://github.com/Mauricio-Urrego/woocommerce-colors)
-------------------------------------------------------------

[](#demo)

This is a PHP port of [ColorCube](https://github.com/pixelogik/ColorCube), by Ole Krause-Sparmann. You can find an excellent description of how it works at [that repo](https://github.com/pixelogik/ColorCube).

ColorCube is for dominant color extraction from RGB images. Given an image element, it returns a sorted array of hex colors.

Usage
-----

[](#usage)

```
$cc = new ColorCube( // all arguments are optional; these are the defaults:
  20,   // color-space resolution
  [255, 255, 255], // avoid color
  0.4,   // distinctness threshold
  0.2,  // brightness threshold
);
$image = imagecreatefromjpeg($image_url);
$colors = $cc->get_colors($image);
```

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 85.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1070d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/66705807?v=4)[Maria Camila Urrego](/maintainers/murrego7)[@murrego7](https://github.com/murrego7)

---

Top Contributors

[![Mauricio-Urrego](https://avatars.githubusercontent.com/u/6313979?v=4)](https://github.com/Mauricio-Urrego "Mauricio-Urrego (6 commits)")[![eelke](https://avatars.githubusercontent.com/u/738902?v=4)](https://github.com/eelke "eelke (1 commits)")

### Embed Badge

![Health badge](/badges/mauriciourrego-colorcube-php/health.svg)

```
[![Health](https://phpackages.com/badges/mauriciourrego-colorcube-php/health.svg)](https://phpackages.com/packages/mauriciourrego-colorcube-php)
```

###  Alternatives

[char0n/ffmpeg-php

PHP wrapper for FFmpeg application

495240.6k1](/packages/char0n-ffmpeg-php)[goat1000/svggraph

Generates SVG graphs

135911.1k3](/packages/goat1000-svggraph)[gravatarphp/gravatar

Gravatar URL builder which is most commonly called as a Gravatar library

16653.6k2](/packages/gravatarphp-gravatar)[rsoury/wp-imgix

Rewrites WordPress image URLs to use ImgIX

167.2k](/packages/rsoury-wp-imgix)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
