class Gray implements ColorInterface
Methods
__construct(Grayscale $palette, array $color, $alpha)
|
||
Integer |
getValue(string $component)
Return the value of one of the component. |
|
integer |
getGray()
Returns Gray 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 35
public
__construct(Grayscale $palette, array $color, $alpha)
at line 45
public Integer
getValue(string $component)
Return the value of one of the component.
at line 60
public integer
getGray()
Returns Gray value of the color
at line 68
public PaletteInterface
getPalette()
Returns the palette attached to the current color
at line 76
public integer
getAlpha()
Returns percentage of transparency of the color
at line 84
public ColorInterface
dissolve(integer $alpha)
Returns a copy of current color, incrementing the alpha channel by the given amount
at line 94
public ColorInterface
lighten(integer $shade)
Returns a copy of the current color, lightened by the specified number of shades
at line 102
public ColorInterface
darken(integer $shade)
Returns a copy of the current color, darkened by the specified number of shades
at line 110
public ColorInterface
grayscale()
Returns a gray related to the current color
at line 118
public Boolean
isOpaque()
Checks if the current color is opaque
at line 128
public string
__toString()
Returns hex representation of the color