1 /*
2  * Copyright 2019 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package androidx.compose.ui.graphics.colorspace
18 
19 /** Illuminant contains standard CIE [white points][WhitePoint]. */
20 object Illuminant {
21     /**
22      * Standard CIE 1931 2° illuminant A, encoded in xyY. This illuminant has a color temperature of
23      * 2856K.
24      */
25     val A = WhitePoint(0.44757f, 0.40745f)
26 
27     /**
28      * Standard CIE 1931 2° illuminant B, encoded in xyY. This illuminant has a color temperature of
29      * 4874K.
30      */
31     val B = WhitePoint(0.34842f, 0.35161f)
32 
33     /**
34      * Standard CIE 1931 2° illuminant C, encoded in xyY. This illuminant has a color temperature of
35      * 6774K.
36      */
37     val C = WhitePoint(0.31006f, 0.31616f)
38 
39     /**
40      * Standard CIE 1931 2° illuminant D50, encoded in xyY. This illuminant has a color temperature
41      * of 5003K. This illuminant is used by the profile connection space in ICC profiles.
42      */
43     val D50 = WhitePoint(0.34567f, 0.35850f)
44 
45     /**
46      * Standard CIE 1931 2° illuminant D55, encoded in xyY. This illuminant has a color temperature
47      * of 5503K.
48      */
49     val D55 = WhitePoint(0.33242f, 0.34743f)
50 
51     /**
52      * Standard CIE 1931 2° illuminant D60, encoded in xyY. This illuminant has a color temperature
53      * of 6004K.
54      */
55     val D60 = WhitePoint(0.32168f, 0.33767f)
56 
57     /**
58      * Standard CIE 1931 2° illuminant D65, encoded in xyY. This illuminant has a color temperature
59      * of 6504K. This illuminant is commonly used in RGB color spaces such as sRGB, BT.209, etc.
60      */
61     val D65 = WhitePoint(0.31271f, 0.32902f)
62 
63     /**
64      * Standard CIE 1931 2° illuminant D75, encoded in xyY. This illuminant has a color temperature
65      * of 7504K.
66      */
67     val D75 = WhitePoint(0.29902f, 0.31485f)
68 
69     /**
70      * Standard CIE 1931 2° illuminant E, encoded in xyY. This illuminant has a color temperature of
71      * 5454K.
72      */
73     val E = WhitePoint(0.33333f, 0.33333f)
74 
75     internal val D50Xyz = floatArrayOf(0.964212f, 1.0f, 0.825188f)
76 
newD50Xyznull77     internal fun newD50Xyz() = floatArrayOf(0.964212f, 1.0f, 0.825188f)
78 }
79