@tempots/color
CMYK class
Represents a color in the CMYK color model.
Signature:
declare class CMYK
Constructors
Constructor |
Modifiers |
Description |
---|---|---|
Represents a CMYK color. |
Properties
Property |
Modifiers |
Type |
Description |
---|---|---|---|
|
number |
Represents the cyan component in the CMYK color model. | |
|
number |
Represents the cyan component in the CMYK color model. | |
|
(other: CMYK, tollerance?: number) => boolean |
Checks if the current CMYK color is equal to another CMYK color. | |
|
(s: string) => CMYK |
Creates a CMYK color instance from a string representation. The string should be in the format "cmyk(c%, m%, y%, k%)". | |
|
number |
Represents the cyan component in the CMYK color model. | |
|
([cyan, magenta, yellow, black]: [cyan: number, magenta: number, yellow: number, black: number]) => CMYK |
Creates a new CMYK color instance from the given channel values. | |
|
() => [number, number, number, number] |
Converts the CMYK color values to an array of channels. | |
|
() => string |
Returns a string representation of the CMYK color in the format "cmyk(cyan%, magenta%, yellow%, black%)". | |
|
(black: number) => CMYK |
Creates a new CMYK color with the specified black value. | |
|
(cyan: number) => CMYK |
Returns a new CMYK color with the specified cyan value. | |
|
(magenta: number) => CMYK |
Returns a new CMYK color with the specified magenta value. | |
|
(yellow: number) => CMYK |
Returns a new CMYK color with the specified yellow value. | |
|
number |
Represents the cyan component in the CMYK color model. |