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

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

mattacosta/php-colorspace
=========================

Convert, compare, and animate colors.

v1.0.0(4y ago)06MITPHPPHP &gt;=8.1

Since Mar 7Pushed 4y ago1 watchersCompare

[ Source](https://github.com/mattacosta/php-colorspace)[ Packagist](https://packagist.org/packages/mattacosta/php-colorspace)[ Docs](https://github.com/mattacosta/php-colorspace)[ RSS](/packages/mattacosta-php-colorspace/feed)WikiDiscussions main Synced yesterday

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

php-colorspace
==============

[](#php-colorspace)

[![CI](https://github.com/mattacosta/php-colorspace/workflows/CI/badge.svg)](https://github.com/mattacosta/php-colorspace/actions)

Convert, compare, and animate colors.

Features
--------

[](#features)

Color spaces

- [sRGB](https://en.wikipedia.org/wiki/SRGB)
    - [HSL and HSV](https://en.wikipedia.org/wiki/HSL_and_HSV)
- [CIELAB](https://en.wikipedia.org/wiki/CIELAB_color_space)
- CIEXYZ

Color difference metrics

- [CIELAB ΔE](https://en.wikipedia.org/wiki/Color_difference#CIELAB_%CE%94E*)
    - CIE 1976
    - CIE 1994
    - CIE 2000
    - CMC l:c

Illuminants (part of the `CieXyzColor` class)

- D50
- D65

Animation

- Linear interpolation between colors

Requirements
------------

[](#requirements)

- PHP 8.1 or later

Installation
------------

[](#installation)

```
composer require mattacosta/php-colorspace

```

Usage
-----

[](#usage)

**Example**: Converting between color spaces (or alternate representations) using the `ColorConverter` class:

```
$hsl_color = ColorConverter::rgbToHsl($rgb_color);
```

**Example**: Computing the difference between two colors using the `ColorDifference`class:

```
$deltaE = ColorDifference::deltaE2000($reference, $sample);
```

**Example**: Transitioning from one color to another:

```
// Tip: Use a cylindrical representation for best results.
$yellow = HsvColor::lerp($red, $green, 0.5);
```

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 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

1579d 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 (3 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[mickey-kay/better-font-awesome-library

Better Font Awesome Library for WordPress

371.9k1](/packages/mickey-kay-better-font-awesome-library)

PHPackages © 2026

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