<?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; }
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); }