Download the PHP package chernegasergiy/color-converter without Composer
On this page you can find all versions of the php package chernegasergiy/color-converter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download chernegasergiy/color-converter
More information about chernegasergiy/color-converter
Files in chernegasergiy/color-converter
Package color-converter
Short Description A simple PHP color converter CLI application.
License LicenseRef-CSSM-Unlimited-2.0
Informations about the package color-converter
PHP Color Converter
A standalone, interactive command-line tool for converting color models, written in pure PHP.
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
- Ensure you have PHP installed.
- Run the script from your terminal:
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
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.
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.
After confirming your input, the script will display the final conversion result.
Contributing
Contributions are welcome and appreciated! Here's how you can contribute:
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Please make sure to update tests as appropriate and adhere to the existing coding style.
License
This project is licensed under the CSSM Unlimited License v2.0 (CSSM-ULv2). See the LICENSE file for details.