Gray
class Gray implements ColorInterface
Methods
Return the value of one of the component.
Returns Gray value of the color (from 0 to 255).
Returns the palette attached to the current color.
Returns percentage of transparency of the color (from 0 - fully transparent, to 100 - fully opaque).
Returns a copy of current color, incrementing the alpha channel by the given amount.
Returns a copy of the current color, lightened by the specified number of shades.
Returns a copy of the current color, darkened by the specified number of shades.
Returns a gray related to the current color.
Checks if the current color is opaque.
Returns hex representation of the color.
Details
at line 39
__construct(Grayscale $palette, array $color, int $alpha)
at line 51
int|null
getValue(string $component)
Return the value of one of the component.
at line 66
int
getGray()
Returns Gray value of the color (from 0 to 255).
at line 76
PaletteInterface
getPalette()
Returns the palette attached to the current color.
at line 86
int|null
getAlpha()
Returns percentage of transparency of the color (from 0 - fully transparent, to 100 - fully opaque).
at line 96
ColorInterface
dissolve(int $alpha)
Returns a copy of current color, incrementing the alpha channel by the given amount.
at line 109
ColorInterface
lighten(int $shade)
Returns a copy of the current color, lightened by the specified number of shades.
at line 119
ColorInterface
darken(int $shade)
Returns a copy of the current color, darkened by the specified number of shades.
at line 129
ColorInterface
grayscale()
Returns a gray related to the current color.
at line 139
bool
isOpaque()
Checks if the current color is opaque.
at line 149
string
__toString()
Returns hex representation of the color.