PHPackages                             ivuorinen/palette - 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. ivuorinen/palette

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

ivuorinen/palette
=================

Get most used colors from an image

1.0.1(12y ago)328[2 issues](https://github.com/ivuorinen/palette/issues)MITPHPPHP &gt;=5.2.0

Since Jun 27Pushed 1y ago1 watchersCompare

[ Source](https://github.com/ivuorinen/palette)[ Packagist](https://packagist.org/packages/ivuorinen/palette)[ Docs](https://github.com/ivuorinen/palette)[ RSS](/packages/ivuorinen-palette/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (3)Used By (0)

Palette [![Build Status](https://camo.githubusercontent.com/8a589854133f08facebc588120d83c6fca000fd4373b6ee54f09b9020236ff55/68747470733a2f2f7472617669732d63692e6f72672f6976756f72696e656e2f70616c657474652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/ivuorinen/palette)
==========================================================================================================================================================================================================================================================================================

[](#palette-)

Palette is a PHP class that takes your images and returns used colors, sorts them by usage and saves the results.

Usage
-----

[](#usage)

After adding Palette to your `composer.json` file and installed to your vendor folder, you can use the class like this:

### With default settings

[](#with-default-settings)

```
$image = "example/example.jpg";
$palette = new \ivuorinen\Palette\Palette($image);
print_r($palette->colorsArray);
```

### With custom settings

[](#with-custom-settings)

```
$palette = new \ivuorinen\Palette\Palette();

$palette->filename     = "example/example.jpg"; // Our image
$palette->precision    = 10; // Precision of color collection
$palette->returnColors = 10; // How many colors we want
$palette->destination  = './data/' . md5($palette->filename) . '.json';

// Do the work (same as ``Palette::run()``)
$this->getPalette();
$this->save(); // Not needed, but caching results colorsArray);
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance14

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

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

Every ~4 days

Total

2

Last Release

4698d ago

### Community

Maintainers

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

---

Top Contributors

[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (54 commits)")[![ivuorinen](https://avatars.githubusercontent.com/u/11024?v=4)](https://github.com/ivuorinen "ivuorinen (47 commits)")

---

Tags

imagePSR-2colorspalette

### Embed Badge

![Health badge](/badges/ivuorinen-palette/health.svg)

```
[![Health](https://phpackages.com/badges/ivuorinen-palette/health.svg)](https://phpackages.com/packages/ivuorinen-palette)
```

###  Alternatives

[intervention/image

PHP Image Processing

14.3k194.3M2.2k](/packages/intervention-image)[league/color-extractor

Extract colors from an image as a human would do.

1.3k4.7M18](/packages/league-color-extractor)[league/glide

Wonderfully easy on-demand image manipulation library with an HTTP based API.

2.6k51.2M116](/packages/league-glide)[liip/imagine-bundle

This bundle provides an image manipulation abstraction toolkit for Symfony-based projects.

1.7k38.3M217](/packages/liip-imagine-bundle)[spatie/image

Manipulate images with an expressive API

1.4k54.4M138](/packages/spatie-image)[brianmcdo/image-palette

Extracts colors from an image and generates a color palette against a whitelist of colors.

179209.0k2](/packages/brianmcdo-image-palette)

PHPackages © 2026

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