It's for playing with colours.
You can convert colours from one format to any of the other formats, for example:
php code:
<?php
echo Hex::create(0xCC0000)->toCMYK();
echo Hex::create(0xCC0000)->toCIELab();
echo Hex::create(0xCC0000)->toCIELCh();
echo Hex::create(0xCC0000)->toRGB();
echo Hex::fromString('black')->toHSV();
echo RGB::create(200,100,150)->toHex();
?>
Or find colour harmonies, modify colours or match colours:
php code:
<?php
echo Hex::fromString('#cc0000')->greyscale();
echo Hex::fromString('#cc0000')->websafe();
echo Hex::fromString('#cc0000')->match(array(
new RGB(0,0,0),
new XYZ(1,1,1),
new Hex(0x00FF00)
));
echo Hex::create(0xFF0000)->range(Hex::create(0x0000FF), 100);
echo new RGB(100,0,100)->split(2);
echo new RGB(100,0,100)->hue(-2);
?>
I should document it properly at some point with examples.
(no syntax highlighting? :() |