HumHub Documentation (unofficial)

CMYK
in package
implements ColorInterface

FinalYes

Table of Contents

Interfaces

ColorInterface

Properties

$c  : int
$k  : int
$m  : int
$palette  : CMYK
$y  : int

Methods

__construct()  : mixed
__toString()  : string
Returns hex representation of the color.
darken()  : static
Returns a copy of the current color, darkened by the specified number of shades.
dissolve()  : static
Returns a copy of current color, incrementing the alpha channel by the given amount.
getAlpha()  : int|null
Returns percentage of transparency of the color (from 0 - fully transparent, to 100 - fully opaque).
getCyan()  : int
Returns Cyan value of the color (from 0 to 100).
getKeyline()  : int
Returns Key value of the color (from 0 to 100).
getMagenta()  : int
Returns Magenta value of the color (from 0 to 100).
getPalette()  : PaletteInterface
Returns the palette attached to the current color.
getValue()  : int|null
Return the value of one of the component.
getYellow()  : int
Returns Yellow value of the color (from 0 to 100).
grayscale()  : static
Returns a gray related to the current color.
isOpaque()  : bool
Checks if the current color is opaque.
lighten()  : static
Returns a copy of the current color, lightened by the specified number of shades.
setColor()  : mixed
Internal, Performs checks for color validity (an of array(C, M, Y, K)).

Properties

Methods

__construct()

public __construct(CMYK $palette, array<string|int, int> $color) : mixed
Parameters
$palette : CMYK
$color : array<string|int, int>

darken()

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

public darken(mixed $shade) : static
Parameters
$shade : mixed
Tags
see
ColorInterface::darken()
Return values
static

dissolve()

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

public dissolve(mixed $alpha) : static
Parameters
$alpha : mixed
Tags
see
ColorInterface::dissolve()
Return values
static

getAlpha()

Returns percentage of transparency of the color (from 0 - fully transparent, to 100 - fully opaque).

public getAlpha() : int|null
Tags
see
ColorInterface::getAlpha()
Return values
int|null

return NULL if the color type does not support transparency

getCyan()

Returns Cyan value of the color (from 0 to 100).

public getCyan() : int
Return values
int

getKeyline()

Returns Key value of the color (from 0 to 100).

public getKeyline() : int
Return values
int

getMagenta()

Returns Magenta value of the color (from 0 to 100).

public getMagenta() : int
Return values
int

getValue()

Return the value of one of the component.

public getValue(mixed $component) : int|null
Parameters
$component : mixed

One of the ColorInterface::COLOR_* component

Tags
see
ColorInterface::getValue()
Return values
int|null

getYellow()

Returns Yellow value of the color (from 0 to 100).

public getYellow() : int
Return values
int

lighten()

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

public lighten(mixed $shade) : static
Parameters
$shade : mixed
Tags
see
ColorInterface::lighten()
Return values
static

setColor()

Internal, Performs checks for color validity (an of array(C, M, Y, K)).

private setColor(array<string|int, int> $color) : mixed
Parameters
$color : array<string|int, int>
Tags
throws
InvalidArgumentException

        
On this page

Search results