PHPackages                             tecnickcom/tc-lib-color - 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. tecnickcom/tc-lib-color

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

tecnickcom/tc-lib-color
=======================

PHP library to manipulate various color representations

2.3.9(2mo ago)247.2M—3.1%67LGPL-3.0-or-laterPHPPHP &gt;=8.1CI passing

Since Feb 24Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/tecnickcom/tc-lib-color)[ Packagist](https://packagist.org/packages/tecnickcom/tc-lib-color)[ Docs](http://www.tecnick.com)[ Fund](https://www.paypal.com/donate/?hosted_button_id=NZUEC5XS8MFBJ)[ RSS](/packages/tecnickcom-tc-lib-color/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (5)Versions (134)Used By (7)

tc-lib-color
============

[](#tc-lib-color)

*PHP Color Library*

[![Latest Stable Version](https://camo.githubusercontent.com/599a65c84ba4ba774d3d23e6d1b970b5c551f931d0c836bb2ca9ccc78926e36c/68747470733a2f2f706f7365722e707567782e6f72672f7465636e69636b636f6d2f74632d6c69622d636f6c6f722f76657273696f6e)](https://packagist.org/packages/tecnickcom/tc-lib-color)[![Build](https://github.com/tecnickcom/tc-lib-color/actions/workflows/check.yml/badge.svg)](https://github.com/tecnickcom/tc-lib-color/actions/workflows/check.yml/badge.svg)[![Coverage](https://camo.githubusercontent.com/6cadaad2ce65b79278d2f95d0cf180f99abc01143ba370888c5c710a5decf044/68747470733a2f2f636f6465636f762e696f2f67682f7465636e69636b636f6d2f74632d6c69622d636f6c6f722f67726170682f62616467652e7376673f746f6b656e3d6c335543566253686d63)](https://codecov.io/gh/tecnickcom/tc-lib-color)[![License](https://camo.githubusercontent.com/cfea0eeec2cb0c4484d19b39deed80fb2d3451443877ce067f4e1ccab74cb6c5/68747470733a2f2f706f7365722e707567782e6f72672f7465636e69636b636f6d2f74632d6c69622d636f6c6f722f6c6963656e7365)](https://packagist.org/packages/tecnickcom/tc-lib-color)[![Downloads](https://camo.githubusercontent.com/9aea5726dff06f96e45f3f8a70b767a2810c1c90ae894e17d395b91cfbdcfdd4/68747470733a2f2f706f7365722e707567782e6f72672f7465636e69636b636f6d2f74632d6c69622d636f6c6f722f646f776e6c6f616473)](https://packagist.org/packages/tecnickcom/tc-lib-color)

[![Donate via PayPal](https://camo.githubusercontent.com/e5f561f4f549822da3fbfb75d0be9059a60eac15b1ff7af66500ca1dd4dba91b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646f6e6174652d70617970616c2d3837636565622e737667)](https://www.paypal.com/donate/?hosted_button_id=NZUEC5XS8MFBJ)*Please consider supporting this project by making a donation via [PayPal](https://www.paypal.com/donate/?hosted_button_id=NZUEC5XS8MFBJ)*

- **category** Library
- **package** \\Com\\Tecnick\\Color
- **author** Nicola Asuni
- **copyright** 2001-2026 Nicola Asuni - Tecnick.com LTD
- **license**  GNU-LGPL v3 (see LICENSE.TXT)
- **link**
- **SRC DOC**

Description
-----------

[](#description)

This library includes utility classes to get colors in various representation formats.

The initial source code has been derived from [TCPDF](http://www.tcpdf.org).

Getting started
---------------

[](#getting-started)

First, you need to install all development dependencies using [Composer](https://getcomposer.org/):

```
$ curl -sS https://getcomposer.org/installer | php
$ mv composer.phar /usr/local/bin/composer
```

This project include a Makefile that allows you to test and build the project with simple commands. To see all available options:

```
make help
```

To install all the development dependencies:

```
make deps
```

Running all tests
-----------------

[](#running-all-tests)

Before committing the code, please check if it passes all tests using

```
make qa
```

All artifacts are generated in the target directory.

Example
-------

[](#example)

Examples are located in the `example` directory.

Start a development server (requires PHP 8.0) using the command:

```
make server

```

and point your browser to

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

[](#installation)

Create a composer.json in your projects root-directory:

```
{
    "require": {
        "tecnickcom/tc-lib-color": "^2.0"
    }
}
```

Or add to an existing project with:

```
composer require tecnickcom/tc-lib-color ^2.0
```

Packaging
---------

[](#packaging)

This library is mainly intended to be used and included in other PHP projects using Composer. However, since some production environments dictates the installation of any application as RPM or DEB packages, this library includes make targets for building these packages (`make rpm` and `make deb`). The packages are generated under the `target` directory.

When this library is installed using an RPM or DEB package, you can use it your code by including the autoloader:

```
require_once ('/usr/share/php/Com/Tecnick/Color/autoload.php');

```

Developer(s) Contact
--------------------

[](#developers-contact)

\*2026 Nicola Asuni

###  Health Score

67

—

FairBetter than 100% of packages

Maintenance83

Actively maintained with recent releases

Popularity55

Moderate usage in the ecosystem

Community21

Small or concentrated contributor base

Maturity89

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 99.1% 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 ~30 days

Recently: every ~8 days

Total

133

Last Release

84d ago

Major Versions

1.14.39 → 2.0.22023-11-04

PHP version history (5 changes)1.0.0PHP &gt;=5.3.3

1.8.0PHP &gt;=5.4

1.12.11PHP &gt;=5.3

2.0.2PHP &gt;=8.0

2.2.7PHP &gt;=8.1

### Community

Maintainers

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

---

Top Contributors

[![nicolaasuni](https://avatars.githubusercontent.com/u/1186996?v=4)](https://github.com/nicolaasuni "nicolaasuni (213 commits)")[![remicollet](https://avatars.githubusercontent.com/u/270445?v=4)](https://github.com/remicollet "remicollet (1 commits)")[![valioDOTch](https://avatars.githubusercontent.com/u/800467?v=4)](https://github.com/valioDOTch "valioDOTch (1 commits)")

---

Tags

cmykcolorcolourhslhslujavascriptphp-libraryrgbrgbawebwebjavascriptcolorrgbcolourcolorscolourscmykhsltc-lib-colorrgbahsla

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/tecnickcom-tc-lib-color/health.svg)

```
[![Health](https://phpackages.com/badges/tecnickcom-tc-lib-color/health.svg)](https://phpackages.com/packages/tecnickcom-tc-lib-color)
```

###  Alternatives

[ssnepenthe/color-utils

A PHP library for performing SASS-like color manipulations.

631.1M10](/packages/ssnepenthe-color-utils)[ozdemirburak/iris

PHP library for color manipulation and conversion.

1201.7M16](/packages/ozdemirburak-iris)[spatie/color

A little library to handle color conversions

38118.9M28](/packages/spatie-color)[presseddigital/colorit

A slick color picker fieldtype plugin for the Craft CMS 3 control panel.

2132.1k](/packages/presseddigital-colorit)[fjw/color-compare

A library for converting colors (Hex, RGB, HSL, CIELAB (LAB), DIN-99) and calculating color distances based on DIN-99.

1310.0k](/packages/fjw-color-compare)[tractorcow/silverstripe-colorpicker

Color picker field for Silverstripe CMS using the ColorPicker jQuery plugin

18250.8k13](/packages/tractorcow-silverstripe-colorpicker)

PHPackages © 2026

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