class RGB implements ColorInterface
Methods
__construct(RGB $palette, array $color, $alpha)
|
||
Integer |
getValue(string $component)
Return the value of one of the component. |
|
integer |
getRed()
Returns RED value of the color |
|
integer |
getGreen()
Returns GREEN value of the color |
|
integer |
getBlue()
Returns BLUE value of the color |
|
PaletteInterface |
getPalette()
Returns the palette attached to the current color |
|
integer |
getAlpha()
Returns percentage of transparency of the color |
|
ColorInterface |
dissolve(integer $alpha)
Returns a copy of current color, incrementing the alpha channel by the given amount |
|
ColorInterface |
lighten(integer $shade)
Returns a copy of the current color, lightened by the specified number of shades |
|
ColorInterface |
darken(integer $shade)
Returns a copy of the current color, darkened by the specified number of shades |
|
ColorInterface |
grayscale()
Returns a gray related to the current color |
|
Boolean |
isOpaque()
Checks if the current color is opaque |
|
string |
__toString()
Returns hex representation of the color |
Details
at line 45
public
__construct(RGB $palette, array $color, $alpha)
at line 55
public Integer
getValue(string $component)
Return the value of one of the component.
at line 74
public integer
getRed()
Returns RED value of the color
at line 84
public integer
getGreen()
Returns GREEN value of the color
at line 94
public integer
getBlue()
Returns BLUE value of the color
at line 102
public PaletteInterface
getPalette()
Returns the palette attached to the current color
at line 110
public integer
getAlpha()
Returns percentage of transparency of the color
at line 118
public ColorInterface
dissolve(integer $alpha)
Returns a copy of current color, incrementing the alpha channel by the given amount
at line 126
public ColorInterface
lighten(integer $shade)
Returns a copy of the current color, lightened by the specified number of shades
at line 140
public ColorInterface
darken(integer $shade)
Returns a copy of the current color, darkened by the specified number of shades
at line 154
public ColorInterface
grayscale()
Returns a gray related to the current color
at line 164
public Boolean
isOpaque()
Checks if the current color is opaque
at line 174
public string
__toString()
Returns hex representation of the color