PHPackages                             mattacosta/php-colordiff - 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. mattacosta/php-colordiff

Abandoned → [mattacosta/php-colorspace](/?search=mattacosta%2Fphp-colorspace)ArchivedLibrary

mattacosta/php-colordiff
========================

Provides functions to convert and compare colors.

v1.0.0(8y ago)24712MITPHP

Since Nov 18Pushed 4y agoCompare

[ Source](https://github.com/mattacosta/php-colordiff)[ Packagist](https://packagist.org/packages/mattacosta/php-colordiff)[ Docs](https://github.com/mattacosta/php-colordiff)[ RSS](/packages/mattacosta-php-colordiff/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

php-colordiff
=============

[](#php-colordiff)

Implements utility functions to compute the difference between colors and to convert between different color models, such as [RGB](http://en.wikipedia.org/wiki/SRGB) and [CIELAB](http://en.wikipedia.org/wiki/Lab_color_space).

For more information on delta E functions, see [Color difference](http://en.wikipedia.org/wiki/Color_difference).

Example
-------

[](#example)

```
$color1 = ['r' => 255, 'g' => 0, 'b' => 255];  // Magenta
$color2 = ['r' => 220, 'g' => 20, 'b' => 60];  // Crimson

$color1 = ColorDiff::xyz2cielab(ColorDiff::rgb2xyz($color1));
$color2 = ColorDiff::xyz2cielab(ColorDiff::rgb2xyz($color2));
$difference = ColorDiff::deltaE2000($color1, $color2);
```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3094d ago

### Community

Maintainers

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

---

Top Contributors

[![mattacosta](https://avatars.githubusercontent.com/u/1007463?v=4)](https://github.com/mattacosta "mattacosta (8 commits)")

### Embed Badge

![Health badge](/badges/mattacosta-php-colordiff/health.svg)

```
[![Health](https://phpackages.com/badges/mattacosta-php-colordiff/health.svg)](https://phpackages.com/packages/mattacosta-php-colordiff)
```

PHPackages © 2026

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