PHPackages                             danmichaelo/coma - 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. danmichaelo/coma

ActiveLibrary

danmichaelo/coma
================

Library to convert colors between the RGB, XYZ, and Lab colorspaces, and to calculate color distance metrics such as CIE76 and CIE94

v0.2.0(1y ago)1725.9k↓16.7%31MITPHPPHP &gt;=5.3

Since Dec 21Pushed 1y ago5 watchersCompare

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

READMEChangelogDependencies (2)Versions (4)Used By (1)

CoMa – PHP Color Math Library
=============================

[](#coma--php-color-math-library)

[![Build Status](https://camo.githubusercontent.com/d6b044d4bcad32fd43172eb3cefff0f811d88dd17679df53b934730c9eff564a/68747470733a2f2f7472617669732d63692e6f72672f64616e6d69636861656c6f2f7068702d636f6d612e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/danmichaelo/php-coma)[![Coverage Status](https://camo.githubusercontent.com/133a200cc373bc7f8a8f58749beb52ba922e5bc376e3e14047d2b53358fe08ba/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f64616e6d69636861656c6f2f7068702d636f6d612f62616467652e706e673f6272616e63683d6d6173746572)](https://coveralls.io/r/danmichaelo/php-coma?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/b0191b94744c8225e322980d240c84fb9ca8b7c5d2b24da1c21c2ff7f9c5792b/68747470733a2f2f706f7365722e707567782e6f72672f64616e6d69636861656c6f2f636f6d612f76657273696f6e2e706e67)](https://packagist.org/packages/danmichaelo/coma)[![Total Downloads](https://camo.githubusercontent.com/bde0b20304015aac67d8e2a372ae912691e50f198609fef8a7b1403bd7a9719b/68747470733a2f2f706f7365722e707567782e6f72672f64616e6d69636861656c6f2f636f6d612f646f776e6c6f6164732e706e67)](https://packagist.org/packages/danmichaelo/coma)

Php library to convert between [sRGB](//en.wikipedia.org/wiki/SRGB), [XYZ](//en.wikipedia.org/wiki/XYZ_color_space), and [Lab](//en.wikipedia.org/wiki/Lab_color_space) color spaces, and calculate various [color distance metrics](//en.wikipedia.org/wiki/Color_difference) (delta E). Currently CIE76 and CIE94 are implemented, but I plan to implement more.

```
use Danmichaelo\Coma\ColorDistance,
	Danmichaelo\Coma\sRGB;

$color1 = new sRGB(1, 5, 250);
$color2 = new sRGB(0, 0, 208);

$cd = new ColorDistance;
$cie94 = $cd->cie94($color1, $color2);
echo 'The CIE94 ∆E is ' . $cie94 . ' between ' . $color1->toHex() . ' and ' . $color2->toHex() . '.';
```

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 89.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 ~3872 days

Total

2

Last Release

658d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/87db1d80793d2adbeca18997c33acbb5cf1dec75ccc5c19f147d666dfbf2e990?d=identicon)[danmichaelo](/maintainers/danmichaelo)

---

Top Contributors

[![danmichaelo](https://avatars.githubusercontent.com/u/434495?v=4)](https://github.com/danmichaelo "danmichaelo (17 commits)")[![thiemowmde](https://avatars.githubusercontent.com/u/6576639?v=4)](https://github.com/thiemowmde "thiemowmde (2 commits)")

---

Tags

colorcolor distancecolor conversion

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/danmichaelo-coma/health.svg)

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

###  Alternatives

[league/color-extractor

Extract colors from an image as a human would do.

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

A little library to handle color conversions

38118.9M28](/packages/spatie-color)[ksubileau/color-thief-php

Grabs the dominant color or a representative color palette from an image.

6353.8M37](/packages/ksubileau-color-thief-php)[mexitek/phpcolors

A series of methods that let you manipulate colors. Just incase you ever need different shades of one color on the fly.

5003.6M18](/packages/mexitek-phpcolors)[kevinlebrun/colors.php

Colors for PHP CLI scripts

3426.7M45](/packages/kevinlebrun-colorsphp)[codedungeon/php-cli-colors

Liven up you PHP Console Apps with standard colors

10210.1M26](/packages/codedungeon-php-cli-colors)

PHPackages © 2026

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