ImageColor
class ImageColor
Represent RGB color (0..255) with opacity (0..1).
Methods
static ImageColor
rgb(int $red, int $green, int $blue, float $opacity = 1)
Creates a color from RGB components (0..255) and opacity (0..1).
static ImageColor
hex(string $hex)
Accepts formats #RRGGBB, #RRGGBBAA, #RGB, #RGBA
array
toRGBA()
Returns GD-compatible color array [R, G, B, alpha].
Details
at line 22
static ImageColor
rgb(int $red, int $green, int $blue, float $opacity = 1)
Creates a color from RGB components (0..255) and opacity (0..1).
at line 31
static ImageColor
hex(string $hex)
Accepts formats #RRGGBB, #RRGGBBAA, #RGB, #RGBA
at line 72
array
toRGBA()
Returns GD-compatible color array [R, G, B, alpha].