Author: Nick Sagona, III (nick@popphp.org)
示例#1
0
<?php

require_once '../../bootstrap.php';
use Pop\Color;
try {
    $rgb = new Color\Space\Rgb(112, 124, 228);
    $cmyk = Color\Convert::toCmyk($rgb);
    echo 'RGB: ' . $rgb . ' => CMYK: ' . $cmyk;
} catch (\Exception $e) {
    echo $e->getMessage() . PHP_EOL . PHP_EOL;
}
示例#2
0
 public function testLabToHsb()
 {
     $hsb = Convert::toHsb(new Lab(100, 100, 100));
     $this->assertInstanceOf('Pop\\Color\\Space\\Hsb', $hsb);
     $this->assertEquals('40,75,76', (string) $hsb);
 }