public object ColorSpaces
Properties
Srgb
public val Srgb: Rgb =
Rgb("sRGB IEC61966-2.1", SrgbPrimaries, Illuminant.D65, SrgbTransferParameters, id = 0)
RGB color space sRGB standardized as IEC 61966-2.1:1999. See details on sRGB color space
LinearSrgb
public val LinearSrgb: Rgb =
Rgb("sRGB IEC61966-2.1 (Linear)", SrgbPrimaries, Illuminant.D65, 1.0, 0.0f, 1.0f, id = 1)
RGB color space sRGB standardized as IEC 61966-2.1:1999. See details on Linear sRGB color space
ExtendedSrgb
public val ExtendedSrgb: Rgb =
Rgb(
"scRGB-nl IEC 61966-2-2:2003",
SrgbPrimaries,
Illuminant.D65,
null,
{ x -> absRcpResponse(x, 1 / 1.055, 0.055 / 1.055, 1 / 12.92, 0.04045, 2.4) },
{ x -> absResponse(x, 1 / 1.055, 0.055 / 1.055, 1 / 12.92, 0.04045, 2.4) },
-0.799f,
2.399f,
SrgbTransferParameters,
id = 2,
)
RGB color space scRGB-nl standardized as IEC 61966-2-2:2003. See details on Extended sRGB color space
LinearExtendedSrgb
public val LinearExtendedSrgb: Rgb =
Rgb("scRGB IEC 61966-2-2:2003", SrgbPrimaries, Illuminant.D65, 1.0, -0.5f, 7.499f, id = 3)
RGB color space scRGB standardized as IEC 61966-2-2:2003. See details on Linear Extended sRGB color space
Bt709
public val Bt709: Rgb =
Rgb(
"Rec. ITU-R BT.709-5",
floatArrayOf(0.640f, 0.330f, 0.300f, 0.600f, 0.150f, 0.060f),
Illuminant.D65,
TransferParameters(1 / 0.45, 1 / 1.099, 0.099 / 1.099, 1 / 4.5, 0.081),
id = 4,
)
RGB color space BT.709 standardized as Rec. ITU-R BT.709-5. See details on BT.709 color space
Bt2020
public val Bt2020: Rgb =
Rgb(
"Rec. ITU-R BT.2020-1",
floatArrayOf(0.708f, 0.292f, 0.170f, 0.797f, 0.131f, 0.046f),
Illuminant.D65,
TransferParameters(1 / 0.45, 1 / 1.0993, 0.0993 / 1.0993, 1 / 4.5, 0.08145),
id = 5,
)
RGB color space BT.2020 standardized as Rec. ITU-R BT.2020-1. See details on BT.2020 color space
DciP3
public val DciP3: Rgb =
Rgb(
"SMPTE RP 431-2-2007 DCI (P3)",
floatArrayOf(0.680f, 0.320f, 0.265f, 0.690f, 0.150f, 0.060f),
WhitePoint(0.314f, 0.351f),
2.6,
0.0f,
1.0f,
id = 6,
)
RGB color space DCI-P3 standardized as SMPTE RP 431-2-2007. See details on DCI-P3 color space
DisplayP3
public val DisplayP3: Rgb =
Rgb(
"Display P3",
floatArrayOf(0.680f, 0.320f, 0.265f, 0.690f, 0.150f, 0.060f),
Illuminant.D65,
SrgbTransferParameters,
id = 7,
)
RGB color space Display P3 based on SMPTE RP 431-2-2007 and IEC 61966-2.1:1999. See details on Display P3 color space
Ntsc1953
public val Ntsc1953: Rgb =
Rgb(
"NTSC (1953)",
Ntsc1953Primaries,
Illuminant.C,
TransferParameters(1 / 0.45, 1 / 1.099, 0.099 / 1.099, 1 / 4.5, 0.081),
id = 8,
)
RGB color space NTSC, 1953 standard. See details on NTSC 1953 color space
SmpteC
public val SmpteC: Rgb =
Rgb(
"SMPTE-C RGB",
floatArrayOf(0.630f, 0.340f, 0.310f, 0.595f, 0.155f, 0.070f),
Illuminant.D65,
TransferParameters(1 / 0.45, 1 / 1.099, 0.099 / 1.099, 1 / 4.5, 0.081),
id = 9,
)
RGB color space SMPTE C. See details on SMPTE C color space
AdobeRgb
public val AdobeRgb: Rgb =
Rgb(
"Adobe RGB (1998)",
floatArrayOf(0.64f, 0.33f, 0.21f, 0.71f, 0.15f, 0.06f),
Illuminant.D65,
2.2,
0.0f,
1.0f,
id = 10,
)
RGB color space Adobe RGB (1998). See details on Adobe RGB (1998) color space
ProPhotoRgb
public val ProPhotoRgb: Rgb =
Rgb(
"ROMM RGB ISO 22028-2:2013",
floatArrayOf(0.7347f, 0.2653f, 0.1596f, 0.8404f, 0.0366f, 0.0001f),
Illuminant.D50,
TransferParameters(1.8, 1.0, 0.0, 1 / 16.0, 0.031248),
id = 11,
)
RGB color space ProPhoto RGB standardized as ROMM RGB ISO 22028-2:2013. See details on ProPhoto RGB color space
Aces
public val Aces: Rgb =
Rgb(
"SMPTE ST 2065-1:2012 ACES",
floatArrayOf(0.73470f, 0.26530f, 0.0f, 1.0f, 0.00010f, -0.0770f),
Illuminant.D60,
1.0,
-65504.0f,
65504.0f,
id = 12,
)
RGB color space ACES standardized as SMPTE ST 2065-1:2012. See details on ACES color space
Acescg
public val Acescg: Rgb =
Rgb(
"Academy S-2014-004 ACEScg",
floatArrayOf(0.713f, 0.293f, 0.165f, 0.830f, 0.128f, 0.044f),
Illuminant.D60,
1.0,
-65504.0f,
65504.0f,
id = 13,
)
RGB color space ACEScg standardized as Academy S-2014-004. See details on ACEScg color space
CieXyz
public val CieXyz: ColorSpace = Xyz("Generic XYZ", id = 14)
XYZ color space CIE XYZ. This color space assumes standard illuminant D50 as its white point.
| Property | Value |
|-------------------------|-----------------------|
| Name | Generic XYZ |
| CIE standard illuminant | `D50` |
| Range | ``-2.0, 2.0`` |
CieLab
public val CieLab: ColorSpace = Lab("Generic L*a*b*", id = 15)
Lab color space CIE Lab*. This color space uses CIE XYZ D50 as a profile conversion space.
| Property | Value |
|-------------------------|---------------------------------------------------------|
| Name | Generic L*a*b* |
| CIE standard illuminant | `D50` |
| Range | (L: ``0.0, 100.0``, a: ``-128, 128``, b: ``-128, 128``) |
Bt2020Hlg
public val Bt2020Hlg: Rgb =
Rgb(
"Hybrid Log Gamma encoding",
Bt2020Primaries,
Illuminant.D65,
null,
{ x -> transferHlgOetf(Bt2020HlgTransferParameters, x) },
{ x -> transferHlgEotf(Bt2020HlgTransferParameters, x) },
0.0f,
1.0f,
Bt2020HlgTransferParameters,
id = 17,
)
RGB color space BT.2100 standardized as Hybrid Log Gamma encoding
| Property | Value |
|-------------------------|---------------------------------------------------------|
| Name | Hybrid Log Gamma encoding |
| CIE standard illuminant | `D65` |
| Range | ``0.0, 1.0`` |
Bt2020Pq
public val Bt2020Pq: Rgb =
Rgb(
"Perceptual Quantizer encoding",
Bt2020Primaries,
Illuminant.D65,
null,
{ x -> transferSt2048Oetf(Bt2020PqTransferParameters, x) },
{ x -> transferSt2048Eotf(Bt2020PqTransferParameters, x) },
0.0f,
1.0f,
Bt2020PqTransferParameters,
id = 18,
)
RGB color space BT.2100 standardized as Perceptual Quantizer encoding
| Property | Value |
|-------------------------|---------------------------------------------------------|
| Name | Perceptual Quantizer encoding |
| CIE standard illuminant | `D65` |
| Range | ``0.0, 1.0`` |
Oklab
public val Oklab: ColorSpace = Oklab("Oklab", id = 19)
Lab color space Oklab. This color space uses Oklab D65 as a profile conversion space.
| Property | Value |
|-------------------------|---------------------------------------------------------|
| Name | Oklab |
| CIE standard illuminant | `D65` |
| Range | (L: ``0.0, 1.0``, a: ``-2, 2``, b: ``-2, 2``) |
Functions
match
public fun match(@Size(9) toXYZD50: FloatArray, function: TransferParameters): ColorSpace?
Returns a ColorSpaces instance of ColorSpace that matches the specified RGB to CIE XYZ transform and transfer functions. If no instance can be found, this method returns null.
The color transform matrix is assumed to target the CIE XYZ space a D50 standard illuminant.
Parameters
| toXYZD50 | 3x3 column-major transform matrix from RGB to the profile connection space CIE XYZ as an array of 9 floats, cannot be null |
| function | Parameters for the transfer functions |
Return
A non-null ColorSpace if a match is found, null otherwise