PHPackages                             mindpowered/colorconverter - 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. mindpowered/colorconverter

ActiveLibrary

mindpowered/colorconverter
==========================

Converter to convert between various color systems such as RGB, CIELAB, CMYK, HEX, RGB, and XYZ

0.0.6(5y ago)010MITPHP

Since Jan 12Pushed 5y ago1 watchersCompare

[ Source](https://github.com/mindpowered/color-converter-php)[ Packagist](https://packagist.org/packages/mindpowered/colorconverter)[ RSS](/packages/mindpowered-colorconverter/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (1)Versions (7)Used By (0)

colorconverter
==============

[](#colorconverter)

Converter to convert between various color systems such as RGB, CIELAB, CMYK, HEX, RGB, and XYZ

[![Build Status](https://camo.githubusercontent.com/350e5de6fc9deab835621bac10b7fc27c50920e9f0a9cf51151bcb6e0eb2d586/68747470733a2f2f6d696e64706f77657265642e6465762f6173736574732f696d616765732f6769746875622d6261646765732f6275696c642d70617373696e672e737667)](https://camo.githubusercontent.com/350e5de6fc9deab835621bac10b7fc27c50920e9f0a9cf51151bcb6e0eb2d586/68747470733a2f2f6d696e64706f77657265642e6465762f6173736574732f696d616765732f6769746875622d6261646765732f6275696c642d70617373696e672e737667)

Contents
========

[](#contents)

- [Source Code and Documentation](#source-code-and-documentation)
- [About](#about)
- [Requirements](#requirements)
- [Installation](#installation)
- [Usage](#usage)
- [Support](#support)
- [Licensing](#licensing)

Source Code and Documentation
=============================

[](#source-code-and-documentation)

- Source Code:
- Documentation:

About
=====

[](#about)

Defining a color is difficult. The first challenge is finding a way to describe a color. One way is to describe color based on constituent colors. We can describe constituent colors by adding them, like in RGB, or subtracting them, like in CMYK. Gamut is the range of all colors that are representable in a color system. RGB trades a limited gamut for performance. LAB trades performance for the full gamut of visible colors. CMYK represents the gamut used in color printing.

The second challenge to defining a color is that it depends on the observer. Viewing the same color will look different when:

- printed on paper or displayed on a screen
- seen in daylight or under fluorescent lighting
- positioned at a close or far distance Standard references such as the Pantone Matching System refer to specific colors. We lose information when converting from a reference color to a color system. Printing or rendering an RGB or CMYK color equivalent to a reference color may not match. We can avoid information loss during conversion by using an unlimited gamut such as LAB. We must also take into account the effect of the observer and illumination.

This package aims to provide tools to perform:

- Color conversion between color systems
- A way of searching for similar standardized reference colors

Requirements
============

[](#requirements)

- php &gt;= 7
- php `mbstring` extension
- php `xml` extension

Third-party dependencies may have additional requirements.

Installation
============

[](#installation)

You can get colorconverter using Composer. Composer manages dependencies for packages from Packagist and you can get it here:  .

Create a composer.json file in the top-most directory of your project and add `mindpowered/colorconverter` to the requirements:

```
{
        "require": {
                "mindpowered/colorconverter" : "*"
        }
}

```

Now you can run the command to update composer: `composer update`. In order for composer to install the package dependencies you will need an archive manager such as zip installed. Composer requires use of the commands `zip` and `unzip`.

Usage
=====

[](#usage)

```
require __DIR__ . '/vendor/autoload.php';

use \mindpowered\colorconverter\ColorConverter;

$cc = new ColorConverter();
$colors = $cc->FromHEX("#336699");
```

Support
=======

[](#support)

We are here to support using this package. If it doesn't do what you're looking for, isn't working, or you just need help, please [Contact us](https://mindpowered.dev/support/?ref=color-converter-php/).

There is also a public [Issue Tracker](https://github.com/mindpowered/color-converter-php/issues) available for this package.

Licensing
=========

[](#licensing)

This package is released under the MIT License.

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

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 ~4 days

Total

6

Last Release

1930d ago

### Community

Maintainers

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

### Embed Badge

![Health badge](/badges/mindpowered-colorconverter/health.svg)

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

PHPackages © 2026

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