/**
  * @dataProvider colorsBelndProvider
  *
  * @param \Jaguar\Color\RGBColor $color1
  * @param \Jaguar\Color\RGBColor $color2
  * @param integer                $amount
  * @param \Jaguar\Color\RGBColor $expected
  */
 public function testBlend(RGBColor $color1, RGBColor $color2, $amount, RGBColor $expected)
 {
     $this->assertTrue($expected->equals($color1->blend($color2, $amount)));
 }
 /**
  * {@inheritdoc}
  */
 public function getPixel(Coordinate $coordinate)
 {
     return new Pixel($coordinate, RGBColor::fromValue($this->getColorAt($coordinate)));
 }
 public function testEquals()
 {
     $this->assertTrue($this->getColor()->equals($this->getColor()));
     $this->assertFalse($this->getColor()->equals(\Jaguar\Color\RGBColor::fromValue(16711680)));
 }
 /**
  * construct new gradient
  *
  * @param \Jaguar\Color\RGBColor $start
  * @param \Jaguar\Color\RGBColor $end
  * @param inetger                $step
  *
  * @throws \InvalidArgumentException
  */
 public function __construct(RGBColor $start = null, RGBColor $end = null, $step = 0)
 {
     $this->setStartColor($start === null ? RGBColor::fromHex('#000') : $start);
     $this->setEndColor($end === null ? RGBColor::fromHex('#fff') : $end);
     $this->setStep($step);
 }