PHPackages                             maymeow/php-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. maymeow/php-color

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

maymeow/php-color
=================

v1.0.1(6y ago)02MITPHP

Since Jan 11Pushed 6y agoCompare

[ Source](https://github.com/MayMeow/php-color)[ Packagist](https://packagist.org/packages/maymeow/php-color)[ RSS](/packages/maymeow-php-color/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

PHP Color
=========

[](#php-color)

🌈 Color conversion from RGB to HEX and back.

Instalation
-----------

[](#instalation)

Trough composer:

```
composer require maymeow/php-color

```

Using
-----

[](#using)

Convert color to hex

```
use MayMeow\PHPColor\Color;
// ...
$color = new Color(198, 255, 32);
$hex = Color::convertToHex($color); //#c6ff20
```

and back to RGB

```
use MayMeow\PHPColor\Color;
// ...
try {
    $rgb = Color::convertToRGB($hex); // color object: Color(198, 255, 32)
} catch (\MayMeow\PHPColor\Exceptions\NotHexException $exception)
{
    // do something, echo message or log ...
}
```

You can check `example.php` file in project sources.

License
-------

[](#license)

MIT

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community6

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

Every ~0 days

Total

2

Last Release

2318d ago

### Community

Maintainers

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

---

Top Contributors

[![MayMeow](https://avatars.githubusercontent.com/u/3164256?v=4)](https://github.com/MayMeow "MayMeow (3 commits)")

---

Tags

colorhexphpphp-libraryrgb

### Embed Badge

![Health badge](/badges/maymeow-php-color/health.svg)

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

PHPackages © 2026

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