# xyzToCmyk

fun xyzToCmyk(context: Context, @Size(value = 3) xyzIn: DoubleArray, @Size(value = 3) xyzRef: DoubleArray, bpc: Boolean): DoubleArray

Calculates CMYK value from XYZ input using built in lookup tables

#### Return

CMYK value output, unity scale (element order C, M, Y, K)

#### Parameters

context

Context

xyzIn

XYZ colour input, unity scale (element order X, Y, Z)

xyzRef

Reference white value for XYZIn, unity scale (element order X, Y, Z)

bpc

set to true to perform black point compensation

fun xyzToCmyk(@Size(value = 3) xyzIn: DoubleArray, @Size(value = 3) xyzRef: DoubleArray, bpc: Boolean, m: Array<DoubleArray>, inputCurves: Array<IntArray>, clut: Array<IntArray>, outputCurves: Array<IntArray>): DoubleArray

Calculates CMYK value from XYZ using lookup tables provided as `inputCurves` arguments

#### Return

CMYK value on unity scale (element order C, M, Y, K)

#### Parameters

xyzIn

XYZ colour, unity scale (element order X, Y, Z)

xyzRef

Reference white value for xyzIn, unity scale (element order X, Y, Z)

bpc

Black point compensation enabled / disabled

m

3x3 Extracted from ICC profile: transformation matrix to perform on LAB value (code only tested with identity matrix)

inputCurves

256x3 Extracted from ICC profile: InputCurves

clut

35937x4: Extracted from ICC profile: Lab to CMYK LUT (flattened 33x33x33 array with 4 channels, one each for C,M,Y,K)

outputCurves

256x4: Extracted from ICC profile: OutputCurves