vkollin/php-colorcode-converter

v0.2 2019-02-19 22:37 UTC

README

Build Status

PHP color code converter

Examples

convert RGB to HSL (fluent)

$converter = new Converter();

$rgb = new RGB(123, 45, 67);

/** @var HSL $hsl */
$hsl = $converter->convert($rgb)->to(HSL::class);

// $hsl is an instance of HSL with following values H: 0, S: 0.46, L: 0.33