Skip to content

Most visited

Recently visited

navigation

ColorSpace.Adaptation

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

java.lang.Object
   ↳ java.lang.Enum<android.graphics.ColorSpace.Adaptation>
     ↳ android.graphics.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] &= 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] &= A \left[ \begin{array}{c} W2_X\\ W2_Y\\ W2_Z \end{array} \right] \\ D &= \left[ \begin{matrix} \frac{L_2}{L_1} & 0 & 0 \\ 0 & \frac{M_2}{M_1} & 0 \\ 0 & 0 & \frac{S_2}{S_1} \end{matrix} \right] \\ T &= 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:

Summary

Enum values

ColorSpace.Adaptation  BRADFORD

Bradford chromatic adaptation transform, as defined in the CIECAM97s color appearance model. 

ColorSpace.Adaptation  CIECAT02

CIECAT02 chromatic adaption transform, as defined in the CIECAM02 color appearance model. 

ColorSpace.Adaptation  VON_KRIES

von Kries chromatic adaptation transform. 

Public methods

static ColorSpace.Adaptation valueOf(String name)
static final Adaptation[] values()

Inherited methods

From class java.lang.Enum
From class java.lang.Object
From interface java.lang.Comparable

Enum values

BRADFORD

added in API level 26
ColorSpace.Adaptation BRADFORD

Bradford chromatic adaptation transform, as defined in the CIECAM97s color appearance model.

CIECAT02

added in API level 26
ColorSpace.Adaptation CIECAT02

CIECAT02 chromatic adaption transform, as defined in the CIECAM02 color appearance model.

VON_KRIES

added in API level 26
ColorSpace.Adaptation VON_KRIES

von Kries chromatic adaptation transform.

Public methods

valueOf

added in API level 26
ColorSpace.Adaptation valueOf (String name)

Parameters
name String

Returns
ColorSpace.Adaptation

values

added in API level 26
Adaptation[] values ()

Returns
Adaptation[]

This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Follow Google Developers on WeChat

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a short survey?
Help us improve the Android developer experience.
(Sep 2017 survey)