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

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

hracik/php-color-converter
==========================

Color converter.

0.0.3(6y ago)0321[1 PRs](https://github.com/hracik/php-color-converter/pulls)2MITPHPCI passing

Since Jun 16Pushed 3w agoCompare

[ Source](https://github.com/hracik/php-color-converter)[ Packagist](https://packagist.org/packages/hracik/php-color-converter)[ RSS](/packages/hracik-php-color-converter/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (6)Used By (2)

Color converter
===============

[](#color-converter)

Converts color between HEX, RGB and HSL.

Getting Started
---------------

[](#getting-started)

These instructions will get you a copy of the project up and running

### Installing

[](#installing)

Install with Composer

```
composer require hracik/php-color-converter

```

### Usage

[](#usage)

```
use Hracik\ColorConverter;

//$hex in format #ffffff
$hsl = ColorConverter::hex2hsl($hex);
$rgb = ColorConverter::hex2rgb($hex);

//$rgb as array like [0, 99, 255] each value between 0-255
$hex = ColorConverter::rgb2hex($rgb);
$hsl = ColorConverter::rgb2hsl($rgb);

//$hsl as array like [0.542, 1.0, 0.5]
$rgb = ColorConverter::hsl2rgb($hsl);
$hex = ColorConverter::hsl2hex($hsl);
```

Running the tests
-----------------

[](#running-the-tests)

Run

```
./vendor/bin/phpunit --bootstrap vendor/autoload.php tests

```

For Windows platforms

```
./vendor/bin/phpunit.bat --bootstrap vendor/autoload.php tests

```

Built With
----------

[](#built-with)

- [PHPUnit](https://phpunit.de/) - The PHP Testing Framework

Contributing
------------

[](#contributing)

Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.

Versioning
----------

[](#versioning)

We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/hracik/php-color-converter/tags).

Authors
-------

[](#authors)

- **Andrej Lahucky** - *Initial work* - [Hracik](https://github.com/hracik)

See also the list of [contributors](https://github.com/hracik/php-color-converter/graphs/contributors) who participated in this project.

License
-------

[](#license)

This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.

Acknowledgments
---------------

[](#acknowledgments)

- PurpleBooth

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance62

Regular maintenance activity

Popularity12

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity53

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

3

Last Release

2521d ago

### Community

Maintainers

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

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[klepak/nova-dynamic-page-title

Dynamically updates Laravel Nova page title based on data from Vue router.

11154.8k](/packages/klepak-nova-dynamic-page-title)

PHPackages © 2026

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