PHPackages                             chernegasergiy/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. [CLI &amp; Console](/categories/cli)
4. /
5. chernegasergiy/color-converter

ActiveProject[CLI &amp; Console](/categories/cli)

chernegasergiy/color-converter
==============================

A simple PHP color converter CLI application.

v1.0.0(7mo ago)00LicenseRef-CSSM-Unlimited-2.0PHP

Since Sep 30Pushed 6mo agoCompare

[ Source](https://github.com/ChernegaSergiy/php-color-converter)[ Packagist](https://packagist.org/packages/chernegasergiy/color-converter)[ RSS](/packages/chernegasergiy-color-converter/feed)WikiDiscussions main Synced 1mo ago

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

PHP Color Converter
===================

[](#php-color-converter)

[![Latest Stable Version](https://camo.githubusercontent.com/d470b224f14e65e0c5ceecc40924889b99be42adc3c26c9b0bcf6695fc532a4e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636865726e6567617365726769792f636f6c6f722d636f6e7665727465722e7376673f6c6162656c3d5061636b6167697374266c6f676f3d7061636b6167697374)](https://packagist.org/packages/chernegasergiy/color-converter)[![Total Downloads](https://camo.githubusercontent.com/e3215692e3d78fba548f77f1f9947cfc0da4f8920004f2bced19f062eafd3dcf/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636865726e6567617365726769792f636f6c6f722d636f6e7665727465722e7376673f6c6162656c3d446f776e6c6f616473266c6f676f3d7061636b6167697374)](https://packagist.org/packages/chernegasergiy/color-converter)[![License](https://camo.githubusercontent.com/85be0f2c91ff88df695af99928219d7847080c162a8c612aaf3dccfce6be639e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f636865726e6567617365726769792f636f6c6f722d636f6e7665727465722e7376673f6c6162656c3d4c6963656e6365266c6f676f3d6f70656e2d736f757263652d696e6974696174697665)](https://packagist.org/packages/chernegasergiy/color-converter)

A standalone, interactive command-line tool for converting color models, written in pure PHP.

Features
--------

[](#features)

- **Multiple Conversion Modes:** Convert between the following color models:
    - RGB ↔ CMYK
    - RGB ↔ HSV
    - RGB ↔ HSL
    - RGB ↔ Lab
    - RGB ↔ YCbCr
    - RGB → All formats (one-click conversion to all supported models)
- **Interactive UI:** A fully interactive, menu-driven interface that runs directly in your terminal.
- **Live Previews:** See a preview of the color swatch in your terminal as you select values.
- **Slider Input:** Use arrow keys to intuitively adjust color values with a visual slider.
- **Conversion History:** Keeps a running history of your recent color conversions.
- **Zero Dependencies:** A single script that runs without any external libraries or Composer packages.

How to Run
----------

[](#how-to-run)

1. Ensure you have PHP installed.
2. Run the script from your terminal: ```
    php converter.php
    ```

Supported Conversions
---------------------

[](#supported-conversions)

The tool supports the following direct conversions in both directions (unless otherwise noted):

- **RGB → CMYK** and **CMYK → RGB**
- **RGB → HSV** and **HSV → RGB**
- **RGB → HSL** and **HSL → RGB**
- **RGB → Lab** and **Lab → RGB**
- **RGB → YCbCr** and **YCbCr → RGB**
- **RGB → All formats:** Quickly convert RGB to all other supported models in a single operation

Usage
-----

[](#usage)

This tool provides a simple, guided workflow for color conversion. First, run the script to see the main menu where you can select the desired conversion type.

[![Main Menu](./images/img_01.png)](./images/img_01.png)

Next, use the arrow keys to adjust the color values with the interactive slider. The terminal shows a live preview of the color as you make changes.

[![Color Selection with Slider](./images/img_02.png)](./images/img_02.png)

After confirming your input, the script will display the final conversion result.

[![Conversion Result](./images/img_03.png)](./images/img_03.png)

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

[](#contributing)

Contributions are welcome and appreciated! Here's how you can contribute:

1. Fork the project
2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request

Please make sure to update tests as appropriate and adhere to the existing coding style.

License
-------

[](#license)

This project is licensed under the CSSM Unlimited License v2.0 (CSSM-ULv2). See the [LICENSE](LICENSE) file for details.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance65

Regular maintenance activity

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 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

224d ago

### Community

Maintainers

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

---

Top Contributors

[![ChernegaSergiy](https://avatars.githubusercontent.com/u/60980650?v=4)](https://github.com/ChernegaSergiy "ChernegaSergiy (15 commits)")

---

Tags

clicmykcolorcolor-convertercolor-modelshslhsvlabphprgbterminalutilityycbcr

### Embed Badge

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

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

###  Alternatives

[wp-cli/wp-cli

WP-CLI framework

5.0k17.2M320](/packages/wp-cli-wp-cli)[consolidation/annotated-command

Initialize Symfony Console commands from annotated command class methods.

22569.8M19](/packages/consolidation-annotated-command)[chi-teck/drupal-code-generator

Drupal code generator

26947.8M5](/packages/chi-teck-drupal-code-generator)[seld/cli-prompt

Allows you to prompt for user input on the command line, and optionally hide the characters they type

24725.8M17](/packages/seld-cli-prompt)[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[php-tui/php-tui

Comprehensive TUI library heavily influenced by Ratatui

589747.0k6](/packages/php-tui-php-tui)

PHPackages © 2026

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