Class

Imagine\Image\Palette\Color\CMYK

class CMYK implements ColorInterface

Methods

__construct(CMYK $palette, array $color)

Integer getValue(string $component)

Return the value of one of the component.

integer getCyan()

Returns Cyan value of the color

integer getMagenta()

Returns Magenta value of the color

integer getYellow()

Returns Yellow value of the color

integer getKeyline()

Returns Key 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 46
public __construct(CMYK $palette, array $color)

Parameters

CMYK $palette
array $color

at line 55
public Integer getValue(string $component)

Return the value of one of the component.

Parameters

string $component One of the ColorInterface::COLOR_* component

Return Value

Integer

at line 76
public integer getCyan()

Returns Cyan value of the color

Return Value

integer

at line 86
public integer getMagenta()

Returns Magenta value of the color

Return Value

integer

at line 96
public integer getYellow()

Returns Yellow value of the color

Return Value

integer

at line 106
public integer getKeyline()

Returns Key value of the color

Return Value

integer

at line 114
public PaletteInterface getPalette()

Returns the palette attached to the current color

Return Value

PaletteInterface

at line 122
public integer getAlpha()

Returns percentage of transparency of the color

Return Value

integer

at line 130
public ColorInterface dissolve(integer $alpha)

Returns a copy of current color, incrementing the alpha channel by the given amount

Parameters

integer $alpha

Return Value

ColorInterface

at line 138
public ColorInterface lighten(integer $shade)

Returns a copy of the current color, lightened by the specified number of shades

Parameters

integer $shade

Return Value

ColorInterface

at line 153
public ColorInterface darken(integer $shade)

Returns a copy of the current color, darkened by the specified number of shades

Parameters

integer $shade

Return Value

ColorInterface

at line 168
public ColorInterface grayscale()

Returns a gray related to the current color

Return Value

ColorInterface

at line 184
public Boolean isOpaque()

Checks if the current color is opaque

Return Value

Boolean

at line 194
public string __toString()

Returns hex representation of the color

Return Value

string