Example #1
0
 /**
  * @covers toString
  */
 public function testToString()
 {
     $color = new ILess_Color('#ffeeaa');
     $this->assertEquals('#ffeeaa', $color->toString());
     // the format remains the same
     $color = new ILess_Color('#fea');
     $this->assertEquals('#ffeeaa', $color->toString());
     $color = new ILess_Color('#ff0000');
     $this->assertEquals('#ff0000', $color->toString());
     $this->assertEquals(255, $color->getRed());
     $this->assertEquals(0, $color->getGreen());
     $this->assertEquals(0, $color->getBlue());
     $color = new ILess_Color('#f60000');
     $this->assertEquals('#f60000', $color->toString());
     $this->assertEquals(246, $color->getRed());
     $this->assertEquals(0, $color->getGreen());
     $this->assertEquals(0, $color->getBlue());
 }
Example #2
0
 /**
  * Returns the blue channel
  *
  * @param boolean $raw Return raw value?
  * @return mixed
  */
 public function getBlue($raw = false)
 {
     return $raw ? $this->color->getBlue() : new ILess_Node_Dimension($this->color->getBlue());
 }