PHPackages                             umneeq/yii2-color-extractor - 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. umneeq/yii2-color-extractor

ActiveYii2-extension[Image &amp; Media](/categories/media)

umneeq/yii2-color-extractor
===========================

Extract colors from an image like a human would do

61.4k↓50%21PHP

Since Nov 6Pushed 10y ago1 watchersCompare

[ Source](https://github.com/umneeq/yii2-color-extractor)[ Packagist](https://packagist.org/packages/umneeq/yii2-color-extractor)[ RSS](/packages/umneeq-yii2-color-extractor/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (1)

Yii2 color extractor
====================

[](#yii2-color-extractor)

Extract colors from an image like a human would do. Based on [thephpleague/color-extractor](https://github.com/thephpleague/color-extractor)

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist umneeq/yii2-color-extractor "*"

```

or add

```
"umneeq/yii2-color-extractor": "*"

```

to the require section of your `composer.json` file and run `composer update` command.

Usage
-----

[](#usage)

> Notification. This extension accept 3 types of images: jpeg(jpg), png, gif

Once the extension is installed, simply use it in your code by:

```
use \umneeq\colorextractor\ColorExtractor;

$imagePath = \Yii::getAlias('@frontend/web/img') . DIRECTORY_SEPARATOR . 'test.png';

// Get four most used color hex code
$result = ColorExtractor::extract($imagePath, 4);

// $result
[
    0 => '#F76C0F',
    1 => '#F0C67F',
    2 => '#AABBCC',
    3 => '#CCBBAA',
]
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/d667eecd03b800670125522190ad0aa96f32a3587dfc72b14c2e69590556c14a?d=identicon)[umneeq](/maintainers/umneeq)

---

Top Contributors

[![umneeq](https://avatars.githubusercontent.com/u/7493644?v=4)](https://github.com/umneeq "umneeq (7 commits)")

### Embed Badge

![Health badge](/badges/umneeq-yii2-color-extractor/health.svg)

```
[![Health](https://phpackages.com/badges/umneeq-yii2-color-extractor/health.svg)](https://phpackages.com/packages/umneeq-yii2-color-extractor)
```

###  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)
