Package icyllis.arc3d.core

# Enum Class ColorSpace.Adaptation

java.lang.Object
java.lang.Enum<ColorSpace.Adaptation>
icyllis.arc3d.core.ColorSpace.Adaptation

All Implemented Interfaces:
  `Serializable`, `Comparable<ColorSpace.Adaptation>`, `Constable`

Enclosing class:
  `ColorSpace`

public static enum ColorSpace.Adaptation extends Enum<ColorSpace.Adaptation>

List of adaptation matrices that can be used for chromatic adaptation using the von Kries transform. These matrices are used to convert values in the CIE XYZ space to values in the LMS space (Long Medium Short).

Given an adaptation matrix \(A\), the conversion from XYZ to LMS is straightforward:

$$\left[ \begin{array}{c} L\\ M\\ S \end{array} \right] = A \left[ \begin{array}{c} X\\ Y\\ Z \end{array} \right]$$

The complete von Kries transform \(T\) uses a diagonal matrix noted \(D\) to perform the adaptation in LMS space. In addition to \(A\) and \(D\), the source white point \(W1\) and the destination white point \(W2\) must be specified:

$$\begin{align*} \left[ \begin{array}{c} L_1\\ M_1\\ S_1 \end{array} \right] invalid input: '&'= A \left[ \begin{array}{c} W1_X\\ W1_Y\\ W1_Z \end{array} \right] \\\ \left[ \begin{array}{c} L_2\\ M_2\\ S_2 \end{array} \right] invalid input: '&'= A \left[ \begin{array}{c} W2_X\\ W2_Y\\ W2_Z \end{array} \right] \\\ D invalid input: '&'= \left[ \begin{matrix} \frac{L_2}{L_1} invalid input: '&' 0 invalid input: '&' 0 \\\ 0 invalid input: '&' \frac{M_2}{M_1} invalid input: '&' 0 \\\ 0 invalid input: '&' 0 invalid input: '&' \frac{S_2}{S_1} \end{matrix} \right] \\\ T invalid input: '&'= A^{-1}.D.A \end{align*}$$

As an example, the resulting matrix \(T\) can then be used to perform the chromatic adaptation of sRGB XYZ transform from D65 to D50:

$$sRGB_{D50} = T.sRGB_{D65}$$

See Also:
  - `ColorSpace.Connector`
  - `ColorSpace.connect(ColorSpace, ColorSpace)`

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class java.lang.Enum

  `Enum.EnumDesc<E extends Enum<E>>`

- ## Enum Constant Summary

  Enum Constants
  Enum Constant
  Description
  `BRADFORD`
  Bradford chromatic adaptation transform, as defined in the CIECAM97s color appearance model.
  `CIECAT02`
  CIECAT02 chromatic adaption transform, as defined in the CIECAM02 color appearance model.
  `VON_KRIES`
  von Kries chromatic adaptation transform.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static ColorSpace.Adaptation`
  `valueOf(String name)`
  Returns the enum constant of this class with the specified name.
  `static ColorSpace.Adaptation[]`
  `values()`
  Returns an array containing the constants of this enum class, in the order they are declared.

  ### Methods inherited from class java.lang.Enum

  `clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

  ### Methods inherited from class java.lang.Object

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Enum Constant Details

  - ### BRADFORD

    public static final ColorSpace.Adaptation BRADFORD
    Bradford chromatic adaptation transform, as defined in the CIECAM97s color appearance model.

  - ### VON_KRIES

    public static final ColorSpace.Adaptation VON_KRIES
    von Kries chromatic adaptation transform.

  - ### CIECAT02

    public static final ColorSpace.Adaptation CIECAT02
    CIECAT02 chromatic adaption transform, as defined in the CIECAM02 color appearance model.

- ## Method Details

  - ### values

    public static ColorSpace.Adaptation[] values()
    Returns an array containing the constants of this enum class, in the order they are declared.
    Returns:
      an array containing the constants of this enum class, in the order they are declared

  - ### valueOf

    public static ColorSpace.Adaptation valueOf(String name)
    Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
    Parameters:
      `name` - the name of the enum constant to be returned.
    Returns:
      the enum constant with the specified name
    Throws:
      `IllegalArgumentException` - if this enum class has no constant with the specified name
      `NullPointerException` - if the argument is null