A PHP toolkit class to manage colors functionalities
You can install the package via composer:
composer require datomatic/color-helper
use Datomatic\Color\Color;
$color = Color::fromHex('#ffffff');
$color->rgb(); // ['r' => 255, 'g' => 255, 'b' => 255]
$color->hsl(); // ['h' => 0, 's' => 0, 'l' => 100]
$color->hsv(); // ['h' => 0, 's' => 0, 'v' => 100]
$color->cmyk(); // ['c' => 0, 'm' => 0, 'y' => 0, 'k' => 0]
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.