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. [Utility &amp; Helpers](/categories/utility)
4. /
5. mattacosta/php-colordiff

Abandoned → [mattacosta/php-colorspace](/?search=mattacosta%2Fphp-colorspace)ArchivedLibrary[Utility &amp; Helpers](/categories/utility)

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

Provides functions to convert and compare colors.

v1.0.0(8y ago)34852MITPHP

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 3w 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

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

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

3151d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1007463?v=4)[Matt Acosta](/maintainers/mattacosta)[@mattacosta](https://github.com/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)
```

###  Alternatives

[symbiote/silverstripe-dynamiclists

A Module that allows users to create custom data lists. These lists can then be used in a form control (specified via code by a developer) or within a user defined form to be able to define controlled vocabularies managed in a central location that might be used across several forms.

109.8k2](/packages/symbiote-silverstripe-dynamiclists)[careship/functional-php

A monad-like set of utilities for PHP, type-checked by Psalm.

108.4k](/packages/careship-functional-php)

PHPackages © 2026

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