CMYKColor

CMYKColor class

Namespace: Aspose.Barcode.Generation

Class for CMYK color. A null instance means CMYK is not used, and default RGB color is in use.

Constructors

NameDescription
__constructInitializes a new instance of the CMYKColor class from CMYK values. CMYK values are expected in the range 0–100.

Methods

NameStaticDescription
formatCMYKNoFormat this CMYKColor into a string “C_M_Y_K”, multiplying each internal component (0–1) by 100 and rounding.
parseCMYKYesParse a CMYK string of the form “C_M_Y_K” into a CMYKColor instance.

CMYKColor__construct(int $c, int $m, int $y, int $k)

Initializes a new instance of the CMYKColor class from CMYK values. CMYK values are expected in the range 0–100.

ParameterTypeDescription
$cint
$mint
$yint
$kint

formatCMYKformatCMYK()

Format this CMYKColor into a string “C_M_Y_K”, multiplying each internal component (0–1) by 100 and rounding.

Returns: string e.g. “30_100_0_30”

parseCMYKparseCMYK(string $str) (static)

Parse a CMYK string of the form “C_M_Y_K” into a CMYKColor instance.

ParameterTypeDescription
$strstring

Returns: CMYKColor