ColorInterface
interface ColorInterface
Constants
COLOR_RED |
Channel name: red. |
COLOR_GREEN |
Channel name: green. |
COLOR_BLUE |
Channel name: blue. |
COLOR_CYAN |
Channel name: cyan. |
COLOR_MAGENTA |
Channel name: magenta. |
COLOR_YELLOW |
Channel name: yellow. |
COLOR_KEYLINE |
Channel name: key (black). |
COLOR_GRAY |
Channel name: gray. |
Methods
Return the value of one of the component.
Returns percentage of transparency of the color (from 0 - fully transparent, to 100 - fully opaque).
Returns the palette attached to the current color.
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 81
int|null
getValue(string $component)
Return the value of one of the component.
at line 88
int|null
getAlpha()
Returns percentage of transparency of the color (from 0 - fully transparent, to 100 - fully opaque).
at line 95
PaletteInterface
getPalette()
Returns the palette attached to the current color.
at line 106
ColorInterface
dissolve(int $alpha)
Returns a copy of current color, incrementing the alpha channel by the given amount.
at line 115
ColorInterface
lighten(int $shade)
Returns a copy of the current color, lightened by the specified number of shades.
at line 124
ColorInterface
darken(int $shade)
Returns a copy of the current color, darkened by the specified number of shades.
at line 131
ColorInterface
grayscale()
Returns a gray related to the current color.
at line 138
bool
isOpaque()
Checks if the current color is opaque.
at line 145
string
__toString()
Returns hex representation of the color.