RGBAColor

Chameleon\Colors\RGBAColor

  • Class name: RGBAColor
  • Namespace: Chameleon\Colors
  • Fully qualified class name: Chameleon\Colors\RGBAColor
  • Extends: Chameleon\Colors\RGBColor

Methods

__construct()

void RGBColor::__construct(integer $red, integer $green, integer $blue)

Class constructor

  • Defined by Chameleon\Colors\RGBColor

    Arguments

  • $red integer - <p>The red channel value [0, 255]</p>

  • $green integer - <p>The green channel value [0, 255]</p>

  • $blue integer - <p>The blue channel value [0, 255]</p>


__toString()

string RGBColor::__toString()

Get string representation of this color

Format: rgb(red, green, blue) * Defined by Chameleon\Colors\RGBColor

Arguments

None.


getAlpha()

integer RGBAColor::getAlpha()

Get RGB alpha channel value

Arguments

None.


setAlpha()

RGBAColor RGBAColor::setAlpha(integer $alpha)

Set RGB alpha channel value

Arguments

  • $alpha integer - <p>RGB alpha channel avalue [0, 127]</p>

getRGBA()

void RGBColor::getRGBA()

fromRGBA()

void RGBColor::fromRGBA(\Chameleon\Colors\RGBAColor $rgba)

getRed()

integer RGBColor::getRed()

Get red channel value


setRed()

RGBColor RGBColor::setRed(integer $red)

Set the red channel value


getGreen()

integer RGBColor::getGreen()

Get green channel value


setGreen()

RGBColor RGBColor::setGreen(integer $green)

Set green channel value


getBlue()

integer RGBColor::getBlue()

Get blue channel value


setBlue()

RGBColor RGBColor::setBlue(integer $blue)

Set blue channel value


lighten()

void RGBColor::lighten(\Chameleon\Colors\float $percentage)

darken()

void RGBColor::darken(\Chameleon\Colors\float $percentage)