Colour Models¶
Tristimulus Values, CIE xyY Colourspace and Chromaticity Coordinates¶
colour
|
Converts from CIE XYZ tristimulus values to CIE xyY colourspace and reference illuminant. |
|
Converts from CIE xyY colourspace to CIE XYZ tristimulus values. |
|
Returns the CIE xy chromaticity coordinates from given CIE XYZ tristimulus values. |
|
Returns the CIE XYZ tristimulus values from given CIE xy chromaticity coordinates. |
|
Converts from CIE xyY colourspace to CIE xy chromaticity coordinates. |
|
Converts from CIE xy chromaticity coordinates to CIE xyY colourspace by extending the array last dimension with given \(Y\) luminance. |
CIE L*a*b* Colourspace¶
colour
|
Converts from CIE XYZ tristimulus values to CIE L*a*b* colourspace. |
|
Converts from CIE L*a*b* colourspace to CIE XYZ tristimulus values. |
|
Converts from CIE L*a*b* colourspace to CIE L*C*Hab colourspace. |
|
Converts from CIE L*C*Hab colourspace to CIE L*a*b* colourspace. |
CIE L*u*v* Colourspace¶
colour
|
Converts from CIE XYZ tristimulus values to CIE L*u*v* colourspace. |
|
Converts from CIE L*u*v* colourspace to CIE XYZ tristimulus values. |
|
Converts from CIE L*u*v* colourspace to CIE L*C*Huv colourspace. |
|
Converts from CIE L*C*Huv colourspace to CIE L*u*v* colourspace. |
|
Returns the \(uv^p\) chromaticity coordinates from given CIE L*u*v* colourspace array. |
|
Returns the CIE L*u*v* colourspace array from given \(uv^p\) chromaticity coordinates by extending the array last dimension with given \(L\) Lightness. |
|
Returns the CIE xy chromaticity coordinates from given CIE L*u*v* colourspace \(uv^p\) chromaticity coordinates. |
|
Returns the CIE L*u*v* colourspace \(uv^p\) chromaticity coordinates from given CIE xy chromaticity coordinates. |
CIE 1960 UCS Colourspace¶
colour
|
Converts from CIE XYZ tristimulus values to CIE 1960 UCS colourspace. |
|
Converts from CIE 1960 UCS colourspace to CIE XYZ tristimulus values. |
|
Returns the uv chromaticity coordinates from given CIE 1960 UCS colourspace array. |
|
Returns the CIE 1960 UCS colourspace array from given uv chromaticity coordinates. |
|
Returns the CIE xy chromaticity coordinates from given CIE 1960 UCS colourspace uv chromaticity coordinates. |
|
Returns the CIE 1960 UCS colourspace uv chromaticity coordinates from given CIE xy chromaticity coordinates. |
CIE 1964 U*V*W* Colourspace¶
colour
|
Converts from CIE XYZ tristimulus values to CIE 1964 U*V*W* colourspace. |
|
Converts CIE 1964 U*V*W* colourspace to CIE XYZ tristimulus values. |
Hunter L,a,b Colour Scale¶
colour
|
Converts from CIE XYZ tristimulus values to Hunter L,a,b colour scale. |
|
Converts from Hunter L,a,b colour scale to CIE XYZ tristimulus values. |
Converts from whitepoint CIE XYZ tristimulus values to Hunter L,a,b \(K_{a}\) and \(K_{b}\) chromaticity coefficients. |
Hunter Rd,a,b Colour Scale¶
colour
|
Converts from CIE XYZ tristimulus values to Hunter Rd,a,b colour scale. |
|
Converts from Hunter Rd,a,b colour scale to CIE XYZ tristimulus values. |
DIN99 Colourspace¶
colour
|
Converts from CIE L*a*b* colourspace to DIN99 colourspace. |
|
Converts from DIN99 colourspace to CIE L*a*b* colourspace. |
CAM02-LCD, CAM02-SCD, and CAM02-UCS Colourspaces - Luo, Cui and Li (2006)¶
colour
Converts from CIECAM02 \(JMh\) correlates array to Luo et al.(2006) CAM02-LCD colourspace \(J'a'b'\) array.. |
|
|
Converts from Luo et al.(2006) CAM02-LCD colourspace \(J'a'b'\) array to CIECAM02 \(JMh\) correlates array.. |
Converts from CIECAM02 \(JMh\) correlates array to Luo et al.(2006) CAM02-SCD colourspace \(J'a'b'\) array.. |
|
|
Converts from Luo et al.(2006) CAM02-SCD colourspace \(J'a'b'\) array to CIECAM02 \(JMh\) correlates array.. |
Converts from CIECAM02 \(JMh\) correlates array to Luo et al.(2006) CAM02-UCS colourspace \(J'a'b'\) array.. |
|
|
Converts from Luo et al.(2006) CAM02-UCS colourspace \(J'a'b'\) array to CIECAM02 \(JMh\) correlates array.. |
CAM16-LCD, CAM16-SCD, and CAM16-UCS Colourspaces - Li et al. (2017)¶
colour
|
Converts from CAM16 \(JMh\) correlates array to Li et al.(2017) CAM16-LCD colourspace \(J'a'b'\) array.. |
|
Converts from Li et al.(2017) CAM16-LCD colourspace \(J'a'b'\) array to CAM16 \(JMh\) correlates array.. |
|
Converts from CAM16 \(JMh\) correlates array to Li et al.(2017) CAM16-SCD colourspace \(J'a'b'\) array.. |
|
Converts from Li et al.(2017) CAM16-SCD colourspace \(J'a'b'\) array to CAM16 \(JMh\) correlates array.. |
|
Converts from CAM16 \(JMh\) correlates array to Li et al.(2017) CAM16-UCS colourspace \(J'a'b'\) array.. |
|
Converts from Li et al.(2017) CAM16-UCS colourspace \(J'a'b'\) array to CAM16 \(JMh\) correlates array.. |
IPT Colourspace¶
colour
|
Converts from CIE XYZ tristimulus values to IPT colourspace. |
|
Converts from IPT colourspace to CIE XYZ tristimulus values. |
|
Computes the hue angle in degrees from IPT colourspace. |
hdr-CIELAB Colourspace¶
colour
|
Converts from CIE XYZ tristimulus values to hdr-CIELAB colourspace. |
|
Converts from hdr-CIELAB colourspace to CIE XYZ tristimulus values. |
Supported hdr-CIELAB colourspace computation methods. |
hdr-IPT Colourspace¶
colour
|
Converts from CIE XYZ tristimulus values to hdr-IPT colourspace. |
|
Converts from hdr-IPT colourspace to CIE XYZ tristimulus values. |
Supported hdr-IPT colourspace computation methods. |
OSA UCS Colourspace¶
colour
|
Converts from CIE XYZ tristimulus values under the CIE 1964 10 Degree Standard Observer to OSA UCS colourspace. |
|
Converts from OSA UCS colourspace to CIE XYZ tristimulus values under the CIE 1964 10 Degree Standard Observer. |
\(JzAzBz\) Colourspace¶
colour
|
Converts from CIE XYZ tristimulus values to \(J_zA_zB_z\) colourspace. |
|
Converts from \(J_zA_zB_z\) colourspace to CIE XYZ tristimulus values. |
RGB Colourspace and Transformations¶
colour
|
Converts from CIE XYZ tristimulus values to RGB colourspace array. |
|
Converts given RGB colourspace array to CIE XYZ tristimulus values. |
|
Converts given RGB colourspace array from given input RGB colourspace to output RGB colourspace using given chromatic adaptation method. |
|
Computes the matrix \(M\) converting from given input RGB colourspace to output RGB colourspace using given chromatic adaptation method. |
Ancillary Objects
colour
|
Converts from CIE XYZ tristimulus values to sRGB colourspace. |
|
Converts from sRGB colourspace to CIE XYZ tristimulus values. |
RGB Colourspace Derivation¶
colour
|
Returns the normalised primary matrix using given primaries and whitepoint \(xy\) chromaticity coordinates. |
|
Chromatically adapts given primaries \(xy\) chromaticity coordinates from test |
|
Returns the primaries and whitepoint \(xy\) chromaticity coordinates using given normalised primary matrix. |
|
Returns the luminance \(Y\) of given RGB components from given primaries and whitepoint. |
|
Returns the luminance equation from given primaries and whitepoint. |
RGB Colourspaces¶
colour
|
Implements support for the RGB colourspaces datasets from |
Aggregated RGB colourspaces. |
colour.models
ACES2065-1 colourspace, base encoding, used for exchange of full fidelity images and archiving. |
|
ACEScc colourspace, a working space for color correctors, target for ASC-CDL values created on-set. |
|
ACEScct colourspace, an alternative working space for colour correctors, intended to be transient and internal to software or hardware systems, and is specifically not intended for interchange or archiving. |
|
ACESproxy colourspace, a lightweight encoding for transmission over HD-SDI (or other production transmission schemes), onset look management. |
|
ACEScg colourspace, a working space for paint/compositor applications that don’t support ACES2065-1 or ACEScc. |
|
Adobe RGB (1998) colourspace. |
|
Adobe Wide Gamut RGB colourspace. |
|
ARRI ALEXA Wide Gamut colourspace. |
|
Apple RGB colourspace. |
|
Best RGB colourspace. |
|
Beta RGB colourspace. |
|
ITU-R BT.470 - 525 colourspace. |
|
ITU-R BT.470 - 625 colourspace. |
|
ITU-R BT.709 colourspace. |
|
ITU-R BT.2020 colourspace. |
|
CIE RGB colourspace. |
|
Canon Cinema Gamut colourspace. |
|
ColorMatch RGB colourspace. |
|
DCDM XYZ colourspace. |
|
DCI-P3 colourspace. |
|
DCI-P3+ colourspace. |
|
Don RGB 4 colourspace. |
|
ECI RGB v2 colourspace. |
|
Ekta Space PS 5 colourspace. |
|
Fujifilm F-Gamut colourspace. |
|
Protune Native colourspace. |
|
Max RGB colourspace. |
|
NTSC (1953) colourspace. |
|
NTSC (1987) colourspace. |
|
P3-D65 colourspace. |
|
Pal/Secam colourspace. |
|
REDcolor colourspace. |
|
REDcolor2 colourspace. |
|
REDcolor3 colourspace. |
|
REDcolor4 colourspace. |
|
REDWideGamutRGB colourspace. |
|
DRAGONcolor colourspace. |
|
DRAGONcolor2 colourspace. |
|
ROMM RGB colourspace. |
|
RIMM RGB colourspace. |
|
ERIMM RGB colourspace. |
|
ProPhoto RGB colourspace, an alias colourspace for ROMM RGB. |
|
Russell RGB colourspace. |
|
SMPTE 240M colourspace. |
|
Implements support for the RGB colourspaces datasets from |
|
S-Gamut colourspace. |
|
S-Gamut3 colourspace. |
|
S-Gamut3.Cine colourspace. |
|
sRGB colourspace. |
|
Panasonic V-Gamut colourspace. |
|
Xtreme RGB colourspace. |
Colour Component Transfer Functions¶
colour
|
Encodes linear \(RGB\) values to non linear \(R'G'B'\) values using given encoding colour component transfer function (Encoding CCTF). |
Supported encoding colour component transfer functions (Encoding CCTFs), a collection of the functions defined by |
|
|
Decodes non-linear \(R'G'B'\) values to linear \(RGB\) values using given decoding colour component transfer function (Decoding CCTF). |
Supported decoding colour component transfer functions (Decoding CCTFs), a collection of the functions defined by |
colour.models
|
Defines the ProPhoto RGB encoding colour component transfer function (Encoding CCTF). |
|
Defines the ProPhoto RGB decoding colour component transfer function (Encoding CCTF). |
|
Defines the RIMM RGB encoding colour component transfer function (Encoding CCTF). |
|
Defines the RIMM RGB decoding colour component transfer function (Encoding CCTF). |
Aliases
colour.models
|
Defines the ProPhoto RGB encoding colour component transfer function (Encoding CCTF). |
|
Defines the ProPhoto RGB decoding colour component transfer function (Encoding CCTF). |
Opto-Electronic Transfer Functions¶
colour
|
Encodes estimated tristimulus values in a scene to \(R'G'B'\) video component signal value using given opto-electronic transfer function (OETF / OECF). |
Supported opto-electrical transfer functions (OETFs / OECFs). |
|
|
Decodes \(R'G'B'\) video component signal value to tristimulus values at the display using given inverse opto-electronic transfer function (OETF / OECF). |
Supported inverse opto-electrical transfer functions (OETFs / OECFs). |
colour.models
|
Defines ARIB STD-B67 (Hybrid Log-Gamma) opto-electrical transfer function (OETF / OECF). |
|
Defines ARIB STD-B67 (Hybrid Log-Gamma) inverse opto-electrical transfer function (OETF / OECF). |
|
Defines Recommendation ITU-R BT.2020 opto-electrical transfer function (OETF / OECF). |
|
Defines Recommendation ITU-R BT.2100 Reference HLG opto-electrical transfer function (OETF / OECF). |
|
Defines Recommendation ITU-R BT.2100 Reference HLG inverse opto-electrical transfer function (OETF / OECF). |
Defines Recommendation ITU-R BT.2100 Reference PQ opto-electrical transfer function (OETF / OECF). |
|
Defines Recommendation ITU-R BT.2100 Reference PQ inverse opto-electrical transfer function (OETF / OECF). |
|
|
Defines Recommendation ITU-R BT.601-7 opto-electronic transfer function (OETF / OECF). |
Defines Recommendation ITU-R BT.601-7 inverse opto-electronic transfer function (OETF / OECF). |
|
|
Defines Recommendation ITU-R BT.709-6 opto-electronic transfer function (OETF / OECF). |
Defines Recommendation ITU-R BT.709-6 inverse opto-electronic transfer function (OETF / OECF). |
|
|
Defines SMPTE 240M opto-electrical transfer function (OETF / OECF). |
Ancillary Objects
colour
|
Defines a typical gamma encoding / decoding function. |
Defines a typical linear encoding / decoding function, essentially a pass-through function. |
Electro-Optical Transfer Functions¶
colour
|
Decodes \(R'G'B'\) video component signal value to tristimulus values at the display using given electro-optical transfer function (EOTF / EOCF). |
Supported electro-optical transfer functions (EOTFs / EOCFs). |
|
|
Encodes estimated tristimulus values in a scene to \(R'G'B'\) video component signal value using given inverse electro-optical transfer function (EOTF / EOCF). |
Supported inverse electro-optical transfer functions (EOTFs / EOCFs). |
colour.models
|
Defines the DCDM electro-optical transfer function (EOTF / EOCF). |
|
Defines the DCDM inverse electro-optical transfer function (EOTF / EOCF). |
|
Defines the DICOM - Grayscale Standard Display Function electro-optical transfer function (EOTF / EOCF). |
|
Defines the DICOM - Grayscale Standard Display Function inverse electro-optical transfer function (EOTF / EOCF). |
|
Defines Recommendation ITU-R BT.1886 electro-optical transfer function (EOTF / EOCF). |
|
Defines Recommendation ITU-R BT.1886 inverse electro-optical transfer function (EOTF / EOCF). |
|
Defines Recommendation ITU-R BT.2020 electro-optical transfer function (EOTF / EOCF). |
Supported Recommendation ITU-R BT.2100 Reference HLG electro-optical transfer function (EOTF / EOCF). |
|
|
Defines Recommendation ITU-R BT.2100 Reference HLG electro-optical transfer function (EOTF / EOCF). |
Supported Recommendation ITU-R BT.2100 Reference HLG inverse electro-optical transfer function (EOTF / EOCF). |
|
|
Defines Recommendation ITU-R BT.2100 Reference HLG inverse electro-optical transfer function (EOTF / EOCF). |
|
Defines Recommendation ITU-R BT.2100 Reference PQ electro-optical transfer function (EOTF / EOCF). |
Defines Recommendation ITU-R BT.2100 Reference PQ inverse electro-optical transfer function (EOTF / EOCF). |
|
|
Defines SMPTE 240M electro-optical transfer function (EOTF / EOCF). |
|
Defines SMPTE ST 2084:2014 optimised perceptual electro-optical transfer function (EOTF / EOCF). |
|
Defines SMPTE ST 2084:2014 optimised perceptual inverse electro-optical transfer function (EOTF / EOCF). |
|
Defines the IEC 61966-2-1:1999 sRGB electro-optical transfer function (EOTF / EOCF). |
Defines the IEC 61966-2-1:1999 sRGB inverse electro-optical transfer function (EOTF / EOCF). |
Opto-Optical Transfer Functions¶
colour
|
Maps relative scene linear light to display linear light using given opto-optical transfer function (OOTF / OOCF). |
Supported opto-optical transfer functions (OOTFs / OOCFs). |
|
|
Maps relative display linear light to scene linear light using given inverse opto-optical transfer function (OOTF / OOCF). |
Supported inverse opto-optical transfer functions (OOTFs / OOCFs). |
colour.models
Supported Recommendation ITU-R BT.2100 Reference HLG opto-optical transfer function (OOTF / OOCF). |
|
|
Defines Recommendation ITU-R BT.2100 Reference HLG opto-optical transfer function (OOTF / OOCF). |
Supported Recommendation ITU-R BT.2100 Reference HLG inverse opto-optical transfer function (OOTF / OOCF). |
|
|
Defines Recommendation ITU-R BT.2100 Reference HLG inverse opto-optical transfer function (OOTF / OOCF). |
Defines Recommendation ITU-R BT.2100 Reference PQ opto-optical transfer function (OOTF / OOCF). |
|
Defines Recommendation ITU-R BT.2100 Reference PQ inverse opto-optical transfer function (OOTF / OOCF). |
Log Encoding and Decoding¶
colour
|
Encodes linear-light values to \(R'G'B'\) video component signal value using given log function. |
Supported log encoding functions. |
|
|
Decodes \(R'G'B'\) video component signal value to linear-light values using given log function. |
Supported log decoding functions. |
colour.models
|
Defines the ACEScc colourspace log encoding / opto-electronic transfer function. |
|
Defines the ACEScc colourspace log decoding / electro-optical transfer function. |
|
Defines the ACEScct colourspace log encoding / opto-electronic transfer function. |
|
Defines the ACEScct colourspace log decoding / electro-optical transfer function. |
|
Defines the ACESproxy colourspace log encoding curve / opto-electronic transfer function. |
|
Defines the ACESproxy colourspace log decoding curve / electro-optical transfer function. |
|
Defines the ARRI ALEXA Log C log encoding curve / opto-electronic transfer function. |
|
Defines the ARRI ALEXA Log C log decoding curve / electro-optical transfer function. |
|
Defines the Canon Log 2 log encoding curve / opto-electronic transfer function. |
|
Defines the Canon Log 2 log decoding curve / electro-optical transfer function. |
|
Defines the Canon Log 3 log encoding curve / opto-electronic transfer function. |
|
Defines the Canon Log 3 log decoding curve / electro-optical transfer function. |
|
Defines the Canon Log log encoding curve / opto-electronic transfer function. |
|
Defines the Canon Log log decoding curve / electro-optical transfer function. |
|
Defines the Cineon log encoding curve / opto-electronic transfer function. |
|
Defines the Cineon log decoding curve / electro-optical transfer function. |
|
Defines the ERIMM RGB log encoding curve / opto-electronic transfer function (OETF / OECF). |
|
Defines the ERIMM RGB log decoding curve / electro-optical transfer function (EOTF / EOCF). |
|
Defines the Fujifilm F-Log log encoding curve / opto-electronic transfer function. |
|
Defines the Fujifilm F-Log log decoding curve / electro-optical transfer function. |
Supported Log3G10 log encoding curve / opto-electronic transfer function methods. |
|
|
Defines the Log3G10 log encoding curve / opto-electronic transfer function. |
Supported Log3G10 log decoding curve / electro-optical transfer function methods. |
|
|
Defines the Log3G10 log decoding curve / electro-optical transfer function. |
Defines the Log3G12 log encoding curve / opto-electronic transfer function. |
|
Defines the Log3G12 log decoding curve / electro-optical transfer function. |
|
|
Defines the Panalog log encoding curve / opto-electronic transfer function. |
|
Defines the Panalog log decoding curve / electro-optical transfer function. |
|
Defines the Josh Pines style Pivoted Log log encoding curve / opto-electronic transfer function. |
|
Defines the Josh Pines style Pivoted Log log decoding curve / electro-optical transfer function. |
Defines the Protune log encoding curve / opto-electronic transfer function. |
|
Defines the Protune log decoding curve / electro-optical transfer function. |
|
|
Defines the REDLog log encoding curve / opto-electronic transfer function. |
|
Defines the REDLog log decoding curve / electro-optical transfer function. |
|
Defines the REDLogFilm log encoding curve / opto-electronic transfer function. |
|
Defines the REDLogFilm log decoding curve / electro-optical transfer function. |
|
Defines the Sony S-Log log encoding curve / opto-electronic transfer function. |
|
Defines the Sony S-Log log decoding curve / electro-optical transfer function. |
|
Defines the Sony S-Log2 log encoding curve / opto-electronic transfer function. |
|
Defines the Sony S-Log2 log decoding curve / electro-optical transfer function. |
|
Defines the Sony S-Log3 log encoding curve / opto-electronic transfer function. |
|
Defines the Sony S-Log3 log decoding curve / electro-optical transfer function. |
|
Defines the Panasonic V-Log log encoding curve / opto-electronic transfer function. |
|
Defines the Panasonic V-Log log decoding curve / electro-optical transfer function. |
Defines the Viper Log log encoding curve / opto-electronic transfer function. |
|
Defines the Viper Log log decoding curve / electro-optical transfer function. |
ACES Spectral Conversion¶
colour
|
Converts given spectral distribution to ACES2065-1 colourspace relative exposure values. |
Ancillary Objects
colour.models
Implements support for the CIE RGB colour matching functions. |
Colour Encodings¶
Y’CbCr Colour Encoding¶
colour
|
Converts an array of R’G’B’ values to the corresponding Y’CbCr colour encoding values array. |
|
Converts an array of Y’CbCr colour encoding values to the corresponding R’G’B’ values array. |
Implements a case-insensitive mutable mapping / dict object. |
|
|
Converts an array of RGB linear values to the corresponding Yc’Cbc’Crc’ colour encoding values array. |
|
Converts an array of Yc’Cbc’Crc’ colour encoding values to the corresponding RGB array of linear values. |
Ancillary Objects
colour
|
Converts given code value \(CV\) or float equivalent of a code value at a given bit depth from full range (full swing) to legal range (studio swing). |
|
Converts given code value \(CV\) or float equivalent of a code value at a given bit depth from legal range (studio swing) to full range (full swing). |
|
Returns the code value \(CV\) range for given bit depth, range legality and representation. |
YCoCg Colour Encoding¶
colour
|
Converts an array of R’G’B’ values to the corresponding YCoCg colour encoding values array. |
|
Converts an array of YCoCg colour encoding values to the corresponding R’G’B’ values array. |
\(IC_TC_P\) Colour Encoding¶
colour
|
Converts from ITU-R BT.2020 colourspace to \(IC_TC_P\) colour encoding. |
|
Converts from \(IC_TC_P\) colour encoding to ITU-R BT.2020 colourspace. |
RGB Representations¶
Prismatic Colourspace¶
colour
|
Converts from RGB colourspace to Prismatic \(L\rho\gamma\beta\) colourspace array. |
|
Converts from Prismatic \(L\rho\gamma\beta\) colourspace array to RGB colourspace. |
HSV Colourspace¶
colour
|
Converts from RGB colourspace to HSV colourspace. |
|
Converts from HSV colourspace to RGB colourspace. |
HSL Colourspace¶
colour
|
Converts from RGB colourspace to HSL colourspace. |
|
Converts from HSL colourspace to RGB colourspace. |
CMY Colourspace¶
colour
|
Converts from RGB colourspace to CMY colourspace. |
|
Converts from CMY colourspace to CMY colourspace. |
|
Converts from CMY colourspace to CMYK colourspace. |
|
Converts from CMYK colourspace to CMY colourspace. |