PHPackages                             biano/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. biano/coma

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

biano/coma
==========

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

1.1.0(1y ago)24.8k↓50%MITPHPPHP ^8.1

Since Jun 18Pushed 1y agoCompare

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

READMEChangelog (2)Dependencies (7)Versions (3)Used By (0)

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

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

[![Latest Stable Version](https://camo.githubusercontent.com/e6fc9f2fd90114a7d226f5447496dd115c607d3ae06b8d806995ef8b880d5732/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6269616e6f2f636f6d612e7376673f7374796c653d666c61742d73717561726526636f6c6f72423d626c7565)](https://packagist.org/packages/biano/coma)[![PHPStan](https://camo.githubusercontent.com/bde5bbb0323a8687c29edf03c5f14a4c8579bf1b8ce97120583c84d43932ebd1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7374796c652d6c6576656c253230392d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265266c6162656c3d7068707374616e)](https://github.com/phpstan/phpstan)[![Total Downloads](https://camo.githubusercontent.com/473e83ec86399bf63ecc0825879266b3d269235796bc88db7a14ff2abdd97b25/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6269616e6f2f636f6d612e7376673f7374796c653d666c61742d73717561726526636f6c6f72423d626c7565)](https://packagist.org/packages/biano/coma/stats)[![Software License](https://camo.githubusercontent.com/a503a1186519842c87902e001ed99aec1775c13996916a55ab8c28d6c98899eb/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6269616e6f637a2f636f6d612d7068702e7376673f7374796c653d666c61742d73717561726526636f6c6f72423d626c7565)](./LICENSE)

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, CIE94 and CIEDE2000 are implemented.

```
use Biano\Coma\ColorDistance;
use Biano\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

32

—

LowBetter than 72% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 72.7% 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 ~0 days

Total

2

Last Release

699d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e2804b72261a28767b27deae892144e2a2c6a09a0d71d149631606346731d52d?d=identicon)[tomas-novotny](/maintainers/tomas-novotny)

---

Top Contributors

[![danmichaelo](https://avatars.githubusercontent.com/u/434495?v=4)](https://github.com/danmichaelo "danmichaelo (16 commits)")[![tomas-novotny](https://avatars.githubusercontent.com/u/36948723?v=4)](https://github.com/tomas-novotny "tomas-novotny (6 commits)")

---

Tags

colorcolor distancecolor conversion

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[spatie/color

A little library to handle color conversions

38118.9M28](/packages/spatie-color)[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)[mistic100/randomcolor

Generate attractive random colors

2431.4M6](/packages/mistic100-randomcolor)[kartik-v/yii2-widget-colorinput

An enhanced Yii 2 widget encapsulating the HTML 5 color input (sub repo split from yii2-widgets)

324.8M10](/packages/kartik-v-yii2-widget-colorinput)[ssnepenthe/color-utils

A PHP library for performing SASS-like color manipulations.

631.1M10](/packages/ssnepenthe-color-utils)[tecnickcom/tc-lib-color

PHP library to manipulate various color representations

247.2M9](/packages/tecnickcom-tc-lib-color)

PHPackages © 2026

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