Companion
Functions
Adapts colour in XYZ from one reference white to another using Bradford adaptation method. NOTE: refIn, refOut, xyzIn must all be on the same scale
Clips CIEXYZ values in between 0 and the value of the reference white to ensure X,Y,Z are in the proper range.
Calculates XYZ value from CMYK input using built-in lookup tables
Calculates XYZ value from CMYK input using lookup tables provided as input arguments
Takes two CIELAB values and calculates color difference (dE) using CIE2000 formula NOTE: both CIELAB values must share the same reference white. If they do not: convert to XYZ, adapt, convert back to CIELAB before calculating dE.
Takes two CIELAB values and calculates color difference (dE) using CIE1976 formula. NOTE: both CIELAB values must share the same reference white. If they do not: convert to XYZ, adapt, convert back to CIELAB before calculating dE
Takes two CIELAB values and calculates color difference (dE) using CIE1994 formula. Requires weighting factors kL, k1, and k2 which are dependent on application. Use the deltaE94G method for graphic design applications and the deltaE94T for textile applications. NOTE: both CIELAB values must share the same reference white. If they do not: convert to XYZ, adapt, convert back to CIELAB before calculating dE.
Takes two CIELAB values and calculates color difference (dE) using CIE1994 formula for the graphic design application (kL = 1, k1 = 0.045, k2 = 0.015). NOTE: both CIELAB values must share the same reference white. If they do not: convert to XYZ, adapt, convert back to CIELAB before calculating dE.
Takes two CIELAB values and calculates color difference (dE) using CIE1994 formula for the textiles application (kL = 2, k1 = 0.048, k2 = 0.014). NOTE: both CIELAB values must share the same reference white. If they do not: convert to XYZ, adapt, convert back to CIELAB before calculating dE.
Takes two CIELAB values and calculates color difference (dE) using CMC(l:c) formula. Depends on model parameters l and c; common values used are CMC(2:1) for acceptability and CMC(1:1) for perceptibility. NOTE: both CIELAB values must share the same reference white. If they do not: convert to XYZ, adapt, convert back to CIELAB before calculating dE
Takes CIELAB value and converts to polar coordinates (LCH)
Takes CIELAB value and its reference white to calculate CIEXYZ value
Takes LCHab value and converts to CIELAB
Takes LCHuv value and converts to CIELUV
Takes CIELUV value and converts to polar coordinates (LCH)
Takes CIELUV value and its reference white to calculate CIEXYZ value
Calculates XYZ from linear RGB given chromaticity coordinates of RGB working space primaries and reference whites of RGB and XYZ value.
Takes reflectance data on 10 nm intervals and calculates CMYK densities according to ISO 5-3:2009. Data must be provided on 10 nm intervals corresponding to the nearest 10 nanometer. Density values are calculated across the range 340 - 770 nm. If the provided data spans a shorter range (eg - 400 - 700 nm), the values at the boundaries are repeated.
Takes reflectance data on 10 nm intervals and calculates a CIEXYZ value according to ASTM E308. Data must be provided on 10 nm intervals corresponding to the nearest 10 nanometer. CIEXYZ values are calculated across the range 360 - 780 nm. If the provided data spans a shorter range (eg - 400 - 700 nm), the values at the boundaries are repeated.
Calculates XYZ from sRGB value.
Calculates CMYK value from XYZ input using built in lookup tables
Calculates CMYK value from XYZ using lookup tables provided as inputCurves
arguments
Takes CIEXYZ value and its reference white to calculate CIELAB value. xyz and xyzRef can be either unity (0 - 1) or scaled (0 - 100) input, but both vectors must be the same scale. (IE - if xyz is unity scale, xyzRef must also be unity scale)
Takes CIEXYZ value and its reference white to calculate CIELUV value.
Calculates linear RGB from XYZ given chromaticity coordinates of RGB working space primaries and reference whites of RGB and XYZ value
Calculates companded sRGB value from XYZ given reference white of XYZ value.