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 3d 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 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity43

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

1019d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/711ae4c6505ae181f347e152ec84eabe01ca18befbfa82410289614a4bbffa9a?d=identicon)[murrego7](/maintainers/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

[milon/barcode

Barcode generator like Qr Code, PDF417, C39, C39+, C39E, C39E+, C93, S25, S25+, I25, I25+, C128, C128A, C128B, C128C, 2-Digits UPC-Based Extention, 5-Digits UPC-Based Extention, EAN 8, EAN 13, UPC-A, UPC-E, MSI (Variation of Plessey code)

1.5k13.3M39](/packages/milon-barcode)[bkwld/croppa

Image thumbnail creation through specially formatted URLs for Laravel

510496.0k23](/packages/bkwld-croppa)[goat1000/svggraph

Generates SVG graphs

132849.6k3](/packages/goat1000-svggraph)[cohensive/embed

Media Embed (for Laravel or as a standalone).

120370.4k](/packages/cohensive-embed)[netresearch/rte-ckeditor-image

Image support in CKEditor for the TYPO3 ecosystem - by Netresearch

63991.3k4](/packages/netresearch-rte-ckeditor-image)[humanmade/tachyon-plugin

Rewrites WordPress image URLs to use Tachyon

87338.5k2](/packages/humanmade-tachyon-plugin)

PHPackages © 2026

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