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(3y ago)1401MITPHP

Since Jul 28Pushed 3y 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 2d 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 25% 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

1115d 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

[goat1000/svggraph

Generates SVG graphs

135931.0k3](/packages/goat1000-svggraph)[stefangabos/zebra_image

A single-file, lightweight PHP library designed for efficient image manipulation featuring methods for modifying images and applying filters

138121.6k7](/packages/stefangabos-zebra-image)[treinetic/imageartist

ImageArtist is a php gd Wrapper which makes Image manipulation insanely easy, we introduce ImageArtist as Photoshop for php

8783.2k](/packages/treinetic-imageartist)[johncarter/filament-focal-point-picker

An image focal point picker for Filament Admin.

4431.7k1](/packages/johncarter-filament-focal-point-picker)[yk/laravel-ocr

A wrapper for gocr.

1356.6k](/packages/yk-laravel-ocr)

PHPackages © 2026

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