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.5k↓85.7%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 2d 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

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community14

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://avatars.githubusercontent.com/u/7493644?v=4)[Dmitry Chernikov](/maintainers/umneeq)[@umneeq](https://github.com/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

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

PHPackages © 2026

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