class ColorParser

Methods

array
parseToRGB(string|array|int $color)

Parses a color to a RGB tuple.

array
parseToCMYK(string|array|int $color)

Parses a color to a CMYK tuple.

int[]
parseToGrayscale(string|array|int $color)

Parses a color to a grayscale value.

Details

at line 27
array parseToRGB(string|array|int $color)

Parses a color to a RGB tuple.

Parameters

string|array|int $color

Return Value

array

Exceptions

InvalidArgumentException

at line 51
array parseToCMYK(string|array|int $color)

Parses a color to a CMYK tuple.

Parameters

string|array|int $color

Return Value

array

Exceptions

InvalidArgumentException

at line 82
int[] parseToGrayscale(string|array|int $color)

Parses a color to a grayscale value.

Parameters

string|array|int $color

Return Value

int[]

Exceptions

InvalidArgumentException