Colour Models

Tristimulus Values, CIE xyY Colourspace and Chromaticity Coordinates

colour

XYZ_to_xyY(XYZ[, illuminant])

Converts from CIE XYZ tristimulus values to CIE xyY colourspace and reference illuminant.

xyY_to_XYZ(xyY)

Converts from CIE xyY colourspace to CIE XYZ tristimulus values.

XYZ_to_xy(XYZ[, illuminant])

Returns the CIE xy chromaticity coordinates from given CIE XYZ tristimulus values.

xy_to_XYZ(xy)

Returns the CIE XYZ tristimulus values from given CIE xy chromaticity coordinates.

xyY_to_xy(xyY)

Converts from CIE xyY colourspace to CIE xy chromaticity coordinates.

xy_to_xyY(xy[, Y])

Converts from CIE xy chromaticity coordinates to CIE xyY colourspace by extending the array last dimension with given \(Y\) luminance.

Common Models

colour.models

Jab_to_JCh(Jab)

Converts from Jab* colour representation to JCh colour representation.

JCh_to_Jab(JCh)

Converts from JCh colour representation to Jab* colour representation.

CIE L*a*b* Colourspace

colour

XYZ_to_Lab(XYZ[, illuminant])

Converts from CIE XYZ tristimulus values to CIE L*a*b* colourspace.

Lab_to_XYZ(Lab[, illuminant])

Converts from CIE L*a*b* colourspace to CIE XYZ tristimulus values.

Lab_to_LCHab(Lab)

Converts from CIE L*a*b* colourspace to CIE L*C*Hab colourspace.

LCHab_to_Lab(LCHab)

Converts from CIE L*C*Hab colourspace to CIE L*a*b* colourspace.

CIE L*u*v* Colourspace

colour

XYZ_to_Luv(XYZ[, illuminant])

Converts from CIE XYZ tristimulus values to CIE L*u*v* colourspace.

Luv_to_XYZ(Luv[, illuminant])

Converts from CIE L*u*v* colourspace to CIE XYZ tristimulus values.

Luv_to_LCHuv(Luv)

Converts from CIE L*u*v* colourspace to CIE L*C*Huv colourspace.

LCHuv_to_Luv(LCHuv)

Converts from CIE L*C*Huv colourspace to CIE L*u*v* colourspace.

Luv_to_uv(Luv[, illuminant])

Returns the \(uv^p\) chromaticity coordinates from given CIE L*u*v* colourspace array.

uv_to_Luv(uv[, illuminant, Y])

Returns the CIE L*u*v* colourspace array from given \(uv^p\) chromaticity coordinates by extending the array last dimension with given \(L\) Lightness.

Luv_uv_to_xy(uv)

Returns the CIE xy chromaticity coordinates from given CIE L*u*v* colourspace \(uv^p\) chromaticity coordinates.

xy_to_Luv_uv(xy)

Returns the CIE L*u*v* colourspace \(uv^p\) chromaticity coordinates from given CIE xy chromaticity coordinates.

CIE 1960 UCS Colourspace

colour

XYZ_to_UCS(XYZ)

Converts from CIE XYZ tristimulus values to CIE 1960 UCS colourspace.

UCS_to_XYZ(UVW)

Converts from CIE 1960 UCS colourspace to CIE XYZ tristimulus values.

UCS_to_uv(UVW)

Returns the uv chromaticity coordinates from given CIE 1960 UCS colourspace array.

uv_to_UCS(uv[, V])

Returns the CIE 1960 UCS colourspace array from given uv chromaticity coordinates.

UCS_uv_to_xy(uv)

Returns the CIE xy chromaticity coordinates from given CIE 1960 UCS colourspace uv chromaticity coordinates.

xy_to_UCS_uv(xy)

Returns the CIE 1960 UCS colourspace uv chromaticity coordinates from given CIE xy chromaticity coordinates.

CIE 1964 U*V*W* Colourspace

colour

XYZ_to_UVW(XYZ[, illuminant])

Converts from CIE XYZ tristimulus values to CIE 1964 U*V*W* colourspace.

UVW_to_XYZ(UVW[, illuminant])

Converts CIE 1964 U*V*W* colourspace to CIE XYZ tristimulus values.

Hunter L,a,b Colour Scale

colour

XYZ_to_Hunter_Lab(XYZ[, XYZ_n, K_ab])

Converts from CIE XYZ tristimulus values to Hunter L,a,b colour scale.

Hunter_Lab_to_XYZ(Lab[, XYZ_n, K_ab])

Converts from Hunter L,a,b colour scale to CIE XYZ tristimulus values.

XYZ_to_K_ab_HunterLab1966(XYZ)

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

XYZ_to_Hunter_Rdab(XYZ[, XYZ_n, K_ab])

Converts from CIE XYZ tristimulus values to Hunter Rd,a,b colour scale.

Hunter_Rdab_to_XYZ(R_d_ab[, XYZ_n, K_ab])

Converts from Hunter Rd,a,b colour scale to CIE XYZ tristimulus values.

DIN99 Colourspace

colour

Lab_to_DIN99(Lab[, k_E, k_CH])

Converts from CIE L*a*b* colourspace to DIN99 colourspace.

DIN99_to_Lab(Lab_99[, k_E, k_CH])

Converts from DIN99 colourspace to CIE L*a*b* colourspace.

CAM02-LCD, CAM02-SCD, and CAM02-UCS Colourspaces - Luo, Cui and Li (2006)

colour

JMh_CIECAM02_to_CAM02LCD(JMh)

Converts from CIECAM02 \(JMh\) correlates array to Luo et al.(2006) CAM02-LCD colourspace \(J'a'b'\) array..

CAM02LCD_to_JMh_CIECAM02(Jpapbp)

Converts from Luo et al.(2006) CAM02-LCD colourspace \(J'a'b'\) array to CIECAM02 \(JMh\) correlates array..

JMh_CIECAM02_to_CAM02SCD(JMh)

Converts from CIECAM02 \(JMh\) correlates array to Luo et al.(2006) CAM02-SCD colourspace \(J'a'b'\) array..

CAM02SCD_to_JMh_CIECAM02(Jpapbp)

Converts from Luo et al.(2006) CAM02-SCD colourspace \(J'a'b'\) array to CIECAM02 \(JMh\) correlates array..

JMh_CIECAM02_to_CAM02UCS(JMh)

Converts from CIECAM02 \(JMh\) correlates array to Luo et al.(2006) CAM02-UCS colourspace \(J'a'b'\) array..

CAM02UCS_to_JMh_CIECAM02(Jpapbp)

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

JMh_CAM16_to_CAM16LCD(JMh, *[, coefficients])

Converts from CAM16 \(JMh\) correlates array to Li et al.(2017) CAM16-LCD colourspace \(J'a'b'\) array..

CAM16LCD_to_JMh_CAM16(Jpapbp, *[, coefficients])

Converts from Li et al.(2017) CAM16-LCD colourspace \(J'a'b'\) array to CAM16 \(JMh\) correlates array..

JMh_CAM16_to_CAM16SCD(JMh, *[, coefficients])

Converts from CAM16 \(JMh\) correlates array to Li et al.(2017) CAM16-SCD colourspace \(J'a'b'\) array..

CAM16SCD_to_JMh_CAM16(Jpapbp, *[, coefficients])

Converts from Li et al.(2017) CAM16-SCD colourspace \(J'a'b'\) array to CAM16 \(JMh\) correlates array..

JMh_CAM16_to_CAM16UCS(JMh, *[, coefficients])

Converts from CAM16 \(JMh\) correlates array to Li et al.(2017) CAM16-UCS colourspace \(J'a'b'\) array..

CAM16UCS_to_JMh_CAM16(Jpapbp, *[, coefficients])

Converts from Li et al.(2017) CAM16-UCS colourspace \(J'a'b'\) array to CAM16 \(JMh\) correlates array..

IPT Colourspace

colour

XYZ_to_IPT(XYZ)

Converts from CIE XYZ tristimulus values to IPT colourspace.

IPT_to_XYZ(IPT)

Converts from IPT colourspace to CIE XYZ tristimulus values.

IPT_hue_angle(IPT)

Computes the hue angle in degrees from IPT colourspace.

hdr-CIELAB Colourspace

colour

XYZ_to_hdr_CIELab(XYZ[, illuminant, Y_s, …])

Converts from CIE XYZ tristimulus values to hdr-CIELAB colourspace.

hdr_CIELab_to_XYZ(Lab_hdr[, illuminant, …])

Converts from hdr-CIELAB colourspace to CIE XYZ tristimulus values.

HDR_CIELAB_METHODS

Supported hdr-CIELAB colourspace computation methods.

hdr-IPT Colourspace

colour

XYZ_to_hdr_IPT(XYZ[, Y_s, Y_abs, method])

Converts from CIE XYZ tristimulus values to hdr-IPT colourspace.

hdr_IPT_to_XYZ(IPT_hdr[, Y_s, Y_abs, method])

Converts from hdr-IPT colourspace to CIE XYZ tristimulus values.

HDR_IPT_METHODS

Supported hdr-IPT colourspace computation methods.

OSA UCS Colourspace

colour

XYZ_to_OSA_UCS(XYZ)

Converts from CIE XYZ tristimulus values under the CIE 1964 10 Degree Standard Observer to OSA UCS colourspace.

OSA_UCS_to_XYZ(Ljg[, optimisation_parameters])

Converts from OSA UCS colourspace to CIE XYZ tristimulus values under the CIE 1964 10 Degree Standard Observer.

\(JzAzBz\) Colourspace

colour

XYZ_to_JzAzBz(XYZ_D65[, constants])

Converts from CIE XYZ tristimulus values to \(J_zA_zB_z\) colourspace.

JzAzBz_to_XYZ(JzAzBz[, constants])

Converts from \(J_zA_zB_z\) colourspace to CIE XYZ tristimulus values.

RGB Colourspace and Transformations

colour

XYZ_to_RGB(XYZ, illuminant_XYZ, …[, …])

Converts from CIE XYZ tristimulus values to RGB colourspace array.

RGB_to_XYZ(RGB, illuminant_RGB, …[, …])

Converts given RGB colourspace array to CIE XYZ tristimulus values.

RGB_to_RGB(RGB, input_colourspace, …[, …])

Converts given RGB colourspace array from given input RGB colourspace to output RGB colourspace using given chromatic adaptation method.

RGB_to_RGB_matrix(input_colourspace, …[, …])

Computes the matrix \(M\) converting from given input RGB colourspace to output RGB colourspace using given chromatic adaptation method.

Ancillary Objects

colour

XYZ_to_sRGB(XYZ[, illuminant, …])

Converts from CIE XYZ tristimulus values to sRGB colourspace.

sRGB_to_XYZ(RGB[, illuminant, …])

Converts from sRGB colourspace to CIE XYZ tristimulus values.

RGB Colourspace Derivation

colour

normalised_primary_matrix(primaries, whitepoint)

Returns the normalised primary matrix using given primaries and whitepoint \(xy\) chromaticity coordinates.

chromatically_adapted_primaries(primaries, …)

Chromatically adapts given primaries \(xy\) chromaticity coordinates from test whitepoint_t to reference whitepoint_r.

primaries_whitepoint(npm)

Returns the primaries and whitepoint \(xy\) chromaticity coordinates using given normalised primary matrix.

RGB_luminance(RGB, primaries, whitepoint)

Returns the luminance \(Y\) of given RGB components from given primaries and whitepoint.

RGB_luminance_equation(primaries, whitepoint)

Returns the luminance equation from given primaries and whitepoint.

RGB Colourspaces

colour

RGB_Colourspace(name, primaries, whitepoint)

Implements support for the RGB colourspaces datasets from colour.models.datasets.aces_rgb, etc….

RGB_COLOURSPACES

Aggregated RGB colourspaces.

colour.models

ACES_2065_1_COLOURSPACE

ACES2065-1 colourspace, base encoding, used for exchange of full fidelity images and archiving.

ACES_CC_COLOURSPACE

ACEScc colourspace, a working space for color correctors, target for ASC-CDL values created on-set.

ACES_CCT_COLOURSPACE

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.

ACES_PROXY_COLOURSPACE

ACESproxy colourspace, a lightweight encoding for transmission over HD-SDI (or other production transmission schemes), onset look management.

ACES_CG_COLOURSPACE

ACEScg colourspace, a working space for paint/compositor applications that don’t support ACES2065-1 or ACEScc.

ADOBE_RGB_1998_COLOURSPACE

Adobe RGB (1998) colourspace.

ADOBE_WIDE_GAMUT_RGB_COLOURSPACE

Adobe Wide Gamut RGB colourspace.

ALEXA_WIDE_GAMUT_COLOURSPACE

ARRI ALEXA Wide Gamut colourspace.

APPLE_RGB_COLOURSPACE

Apple RGB colourspace.

BEST_RGB_COLOURSPACE

Best RGB colourspace.

BETA_RGB_COLOURSPACE

Beta RGB colourspace.

BT470_525_COLOURSPACE

ITU-R BT.470 - 525 colourspace.

BT470_625_COLOURSPACE

ITU-R BT.470 - 625 colourspace.

BT709_COLOURSPACE

ITU-R BT.709 colourspace.

BT2020_COLOURSPACE

ITU-R BT.2020 colourspace.

CIE_RGB_COLOURSPACE

CIE RGB colourspace.

CINEMA_GAMUT_COLOURSPACE

Canon Cinema Gamut colourspace.

COLOR_MATCH_RGB_COLOURSPACE

ColorMatch RGB colourspace.

DCDM_XYZ_COLOURSPACE

DCDM XYZ colourspace.

DCI_P3_COLOURSPACE

DCI-P3 colourspace.

DCI_P3_P_COLOURSPACE

DCI-P3+ colourspace.

DISPLAY_P3_COLOURSPACE

Display P3 colourspace.

DON_RGB_4_COLOURSPACE

Don RGB 4 colourspace.

ECI_RGB_V2_COLOURSPACE

ECI RGB v2 colourspace.

EKTA_SPACE_PS_5_COLOURSPACE

Ekta Space PS 5 colourspace.

F_GAMUT_COLOURSPACE

Fujifilm F-Gamut colourspace.

PROTUNE_NATIVE_COLOURSPACE

Protune Native colourspace.

MAX_RGB_COLOURSPACE

Max RGB colourspace.

NTSC_1953_COLOURSPACE

NTSC (1953) colourspace.

NTSC_1987_COLOURSPACE

NTSC (1987) colourspace.

P3_D65_COLOURSPACE

P3-D65 colourspace.

PAL_SECAM_COLOURSPACE

Pal/Secam colourspace.

RED_COLOR_COLOURSPACE

REDcolor colourspace.

RED_COLOR_2_COLOURSPACE

REDcolor2 colourspace.

RED_COLOR_3_COLOURSPACE

REDcolor3 colourspace.

RED_COLOR_4_COLOURSPACE

REDcolor4 colourspace.

RED_WIDE_GAMUT_RGB_COLOURSPACE

REDWideGamutRGB colourspace.

DRAGON_COLOR_COLOURSPACE

DRAGONcolor colourspace.

DRAGON_COLOR_2_COLOURSPACE

DRAGONcolor2 colourspace.

ROMM_RGB_COLOURSPACE

ROMM RGB colourspace.

RIMM_RGB_COLOURSPACE

RIMM RGB colourspace.

ERIMM_RGB_COLOURSPACE

ERIMM RGB colourspace.

PROPHOTO_RGB_COLOURSPACE

ProPhoto RGB colourspace, an alias colourspace for ROMM RGB.

RUSSELL_RGB_COLOURSPACE

Russell RGB colourspace.

SMPTE_240M_COLOURSPACE

SMPTE 240M colourspace.

SMPTE_C_COLOURSPACE

Implements support for the RGB colourspaces datasets from colour.models.datasets.aces_rgb, etc….

S_GAMUT_COLOURSPACE

S-Gamut colourspace.

S_GAMUT3_COLOURSPACE

S-Gamut3 colourspace.

S_GAMUT3_CINE_COLOURSPACE

S-Gamut3.Cine colourspace.

sRGB_COLOURSPACE

sRGB colourspace.

V_GAMUT_COLOURSPACE

Panasonic V-Gamut colourspace.

XTREME_RGB_COLOURSPACE

Xtreme RGB colourspace.

Colour Component Transfer Functions

colour

cctf_encoding(value[, function])

Encodes linear \(RGB\) values to non linear \(R'G'B'\) values using given encoding colour component transfer function (Encoding CCTF).

CCTF_ENCODINGS

Supported encoding colour component transfer functions (Encoding CCTFs), a collection of the functions defined by colour.LOG_ENCODINGS, colour.OETFS, colour.EOTF_INVERSES attributes, the colour.models.cctf_encoding_ProPhotoRGB(), colour.models.cctf_encoding_RIMMRGB(), colour.models.cctf_encoding_ROMMRGB() definitions and 3 gamma encoding functions (1 / 2.2, 1 / 2.4, 1 / 2.6).

cctf_decoding(value[, function])

Decodes non-linear \(R'G'B'\) values to linear \(RGB\) values using given decoding colour component transfer function (Decoding CCTF).

CCTF_DECODINGS

Supported decoding colour component transfer functions (Decoding CCTFs), a collection of the functions defined by colour.LOG_DECODINGS, colour.EOTFS, colour.OETF_INVERSES attributes, the colour.models.cctf_decoding_ProPhotoRGB(), colour.models.cctf_decoding_RIMMRGB(), colour.models.cctf_decoding_ROMMRGB() definitions and 3 gamma decoding functions (2.2, 2.4, 2.6).

colour.models

cctf_encoding_ROMMRGB(X[, bit_depth, out_int])

Defines the ProPhoto RGB encoding colour component transfer function (Encoding CCTF).

cctf_decoding_ROMMRGB(X_p[, bit_depth, in_int])

Defines the ProPhoto RGB decoding colour component transfer function (Encoding CCTF).

cctf_encoding_RIMMRGB(X[, bit_depth, …])

Defines the RIMM RGB encoding colour component transfer function (Encoding CCTF).

cctf_decoding_RIMMRGB(X_p[, bit_depth, …])

Defines the RIMM RGB decoding colour component transfer function (Encoding CCTF).

Aliases

colour.models

cctf_encoding_ProPhotoRGB(X[, bit_depth, …])

Defines the ProPhoto RGB encoding colour component transfer function (Encoding CCTF).

cctf_decoding_ProPhotoRGB(X_p[, bit_depth, …])

Defines the ProPhoto RGB decoding colour component transfer function (Encoding CCTF).

Opto-Electronic Transfer Functions

colour

oetf(value[, function])

Encodes estimated tristimulus values in a scene to \(R'G'B'\) video component signal value using given opto-electronic transfer function (OETF / OECF).

OETFS

Supported opto-electrical transfer functions (OETFs / OECFs).

oetf_inverse(value[, function])

Decodes \(R'G'B'\) video component signal value to tristimulus values at the display using given inverse opto-electronic transfer function (OETF / OECF).

OETF_INVERSES

Supported inverse opto-electrical transfer functions (OETFs / OECFs).

colour.models

oetf_ARIBSTDB67(E[, r, constants])

Defines ARIB STD-B67 (Hybrid Log-Gamma) opto-electrical transfer function (OETF / OECF).

oetf_inverse_ARIBSTDB67(E_p[, r, constants])

Defines ARIB STD-B67 (Hybrid Log-Gamma) inverse opto-electrical transfer function (OETF / OECF).

oetf_BT2020(E[, is_12_bits_system, constants])

Defines Recommendation ITU-R BT.2020 opto-electrical transfer function (OETF / OECF).

oetf_HLG_BT2100(E[, constants])

Defines Recommendation ITU-R BT.2100 Reference HLG opto-electrical transfer function (OETF / OECF).

oetf_inverse_HLG_BT2100(E_p[, constants])

Defines Recommendation ITU-R BT.2100 Reference HLG inverse opto-electrical transfer function (OETF / OECF).

oetf_PQ_BT2100(E)

Defines Recommendation ITU-R BT.2100 Reference PQ opto-electrical transfer function (OETF / OECF).

oetf_inverse_PQ_BT2100(E_p)

Defines Recommendation ITU-R BT.2100 Reference PQ inverse opto-electrical transfer function (OETF / OECF).

oetf_BT601(L)

Defines Recommendation ITU-R BT.601-7 opto-electronic transfer function (OETF / OECF).

oetf_inverse_BT601(E)

Defines Recommendation ITU-R BT.601-7 inverse opto-electronic transfer function (OETF / OECF).

oetf_BT709(L)

Defines Recommendation ITU-R BT.709-6 opto-electronic transfer function (OETF / OECF).

oetf_inverse_BT709(V)

Defines Recommendation ITU-R BT.709-6 inverse opto-electronic transfer function (OETF / OECF).

oetf_SMPTE240M(L_c)

Defines SMPTE 240M opto-electrical transfer function (OETF / OECF).

Ancillary Objects

colour

gamma_function(a[, exponent, …])

Defines a typical gamma encoding / decoding function.

linear_function(a)

Defines a typical linear encoding / decoding function, essentially a pass-through function.

Electro-Optical Transfer Functions

colour

eotf(value[, function])

Decodes \(R'G'B'\) video component signal value to tristimulus values at the display using given electro-optical transfer function (EOTF / EOCF).

EOTFS

Supported electro-optical transfer functions (EOTFs / EOCFs).

eotf_inverse(value[, function])

Encodes estimated tristimulus values in a scene to \(R'G'B'\) video component signal value using given inverse electro-optical transfer function (EOTF / EOCF).

EOTF_INVERSES

Supported inverse electro-optical transfer functions (EOTFs / EOCFs).

colour.models

eotf_DCDM(XYZ_p[, in_int])

Defines the DCDM electro-optical transfer function (EOTF / EOCF).

eotf_inverse_DCDM(XYZ[, out_int])

Defines the DCDM inverse electro-optical transfer function (EOTF / EOCF).

eotf_DICOMGSDF(J[, in_int])

Defines the DICOM - Grayscale Standard Display Function electro-optical transfer function (EOTF / EOCF).

eotf_inverse_DICOMGSDF(L[, out_int])

Defines the DICOM - Grayscale Standard Display Function inverse electro-optical transfer function (EOTF / EOCF).

eotf_BT1886(V[, L_B, L_W])

Defines Recommendation ITU-R BT.1886 electro-optical transfer function (EOTF / EOCF).

eotf_inverse_BT1886(L[, L_B, L_W])

Defines Recommendation ITU-R BT.1886 inverse electro-optical transfer function (EOTF / EOCF).

eotf_BT2020(E_p[, is_12_bits_system, constants])

Defines Recommendation ITU-R BT.2020 electro-optical transfer function (EOTF / EOCF).

BT2100_HLG_EOTF_METHODS

Supported Recommendation ITU-R BT.2100 Reference HLG electro-optical transfer function (EOTF / EOCF).

eotf_HLG_BT2100(E_p[, L_B, L_W, gamma, …])

Defines Recommendation ITU-R BT.2100 Reference HLG electro-optical transfer function (EOTF / EOCF).

BT2100_HLG_EOTF_INVERSE_METHODS

Supported Recommendation ITU-R BT.2100 Reference HLG inverse electro-optical transfer function (EOTF / EOCF).

eotf_inverse_HLG_BT2100(F_D[, L_B, L_W, …])

Defines Recommendation ITU-R BT.2100 Reference HLG inverse electro-optical transfer function (EOTF / EOCF).

eotf_PQ_BT2100(E_p)

Defines Recommendation ITU-R BT.2100 Reference PQ electro-optical transfer function (EOTF / EOCF).

eotf_inverse_PQ_BT2100(F_D)

Defines Recommendation ITU-R BT.2100 Reference PQ inverse electro-optical transfer function (EOTF / EOCF).

eotf_SMPTE240M(V_r)

Defines SMPTE 240M electro-optical transfer function (EOTF / EOCF).

eotf_ST2084(N[, L_p, constants])

Defines SMPTE ST 2084:2014 optimised perceptual electro-optical transfer function (EOTF / EOCF).

eotf_inverse_ST2084(C[, L_p, constants])

Defines SMPTE ST 2084:2014 optimised perceptual inverse electro-optical transfer function (EOTF / EOCF).

eotf_sRGB(V)

Defines the IEC 61966-2-1:1999 sRGB electro-optical transfer function (EOTF / EOCF).

eotf_inverse_sRGB(L)

Defines the IEC 61966-2-1:1999 sRGB inverse electro-optical transfer function (EOTF / EOCF).

Opto-Optical Transfer Functions

colour

ootf(value[, function])

Maps relative scene linear light to display linear light using given opto-optical transfer function (OOTF / OOCF).

OOTFS

Supported opto-optical transfer functions (OOTFs / OOCFs).

ootf_inverse(value[, function])

Maps relative display linear light to scene linear light using given inverse opto-optical transfer function (OOTF / OOCF).

OOTF_INVERSES

Supported inverse opto-optical transfer functions (OOTFs / OOCFs).

colour.models

BT2100_HLG_OOTF_METHODS

Supported Recommendation ITU-R BT.2100 Reference HLG opto-optical transfer function (OOTF / OOCF).

ootf_HLG_BT2100(E[, L_B, L_W, gamma, method])

Defines Recommendation ITU-R BT.2100 Reference HLG opto-optical transfer function (OOTF / OOCF).

BT2100_HLG_OOTF_INVERSE_METHODS

Supported Recommendation ITU-R BT.2100 Reference HLG inverse opto-optical transfer function (OOTF / OOCF).

ootf_inverse_HLG_BT2100(F_D[, L_B, L_W, …])

Defines Recommendation ITU-R BT.2100 Reference HLG inverse opto-optical transfer function (OOTF / OOCF).

ootf_PQ_BT2100(E)

Defines Recommendation ITU-R BT.2100 Reference PQ opto-optical transfer function (OOTF / OOCF).

ootf_inverse_PQ_BT2100(F_D)

Defines Recommendation ITU-R BT.2100 Reference PQ inverse opto-optical transfer function (OOTF / OOCF).

Log Encoding and Decoding

colour

log_encoding(value[, function])

Encodes linear-light values to \(R'G'B'\) video component signal value using given log function.

LOG_ENCODINGS

Supported log encoding functions.

log_decoding(value[, function])

Decodes \(R'G'B'\) video component signal value to linear-light values using given log function.

LOG_DECODINGS

Supported log decoding functions.

colour.models

log_encoding_ACEScc(lin_AP1)

Defines the ACEScc colourspace log encoding / opto-electronic transfer function.

log_decoding_ACEScc(ACEScc)

Defines the ACEScc colourspace log decoding / electro-optical transfer function.

log_encoding_ACEScct(lin_AP1[, constants])

Defines the ACEScct colourspace log encoding / opto-electronic transfer function.

log_decoding_ACEScct(ACEScct[, constants])

Defines the ACEScct colourspace log decoding / electro-optical transfer function.

log_encoding_ACESproxy(lin_AP1[, bit_depth, …])

Defines the ACESproxy colourspace log encoding curve / opto-electronic transfer function.

log_decoding_ACESproxy(ACESproxy[, …])

Defines the ACESproxy colourspace log decoding curve / electro-optical transfer function.

log_encoding_ALEXALogC(x[, firmware, method, EI])

Defines the ARRI ALEXA Log C log encoding curve / opto-electronic transfer function.

log_decoding_ALEXALogC(t[, firmware, method, EI])

Defines the ARRI ALEXA Log C log decoding curve / electro-optical transfer function.

log_encoding_CanonLog2(x[, bit_depth, …])

Defines the Canon Log 2 log encoding curve / opto-electronic transfer function.

log_decoding_CanonLog2(clog2[, bit_depth, …])

Defines the Canon Log 2 log decoding curve / electro-optical transfer function.

log_encoding_CanonLog3(x[, bit_depth, …])

Defines the Canon Log 3 log encoding curve / opto-electronic transfer function.

log_decoding_CanonLog3(clog3[, bit_depth, …])

Defines the Canon Log 3 log decoding curve / electro-optical transfer function.

log_encoding_CanonLog(x[, bit_depth, …])

Defines the Canon Log log encoding curve / opto-electronic transfer function.

log_decoding_CanonLog(clog[, bit_depth, …])

Defines the Canon Log log decoding curve / electro-optical transfer function.

log_encoding_Cineon(x[, black_offset])

Defines the Cineon log encoding curve / opto-electronic transfer function.

log_decoding_Cineon(y[, black_offset])

Defines the Cineon log decoding curve / electro-optical transfer function.

log_encoding_ERIMMRGB(X[, bit_depth, …])

Defines the ERIMM RGB log encoding curve / opto-electronic transfer function (OETF / OECF).

log_decoding_ERIMMRGB(X_p[, bit_depth, …])

Defines the ERIMM RGB log decoding curve / electro-optical transfer function (EOTF / EOCF).

log_encoding_FLog(in_r[, bit_depth, …])

Defines the Fujifilm F-Log log encoding curve / opto-electronic transfer function.

log_decoding_FLog(out_r[, bit_depth, …])

Defines the Fujifilm F-Log log decoding curve / electro-optical transfer function.

LOG3G10_ENCODING_METHODS

Supported Log3G10 log encoding curve / opto-electronic transfer function methods.

log_encoding_Log3G10(x[, method])

Defines the Log3G10 log encoding curve / opto-electronic transfer function.

LOG3G10_DECODING_METHODS

Supported Log3G10 log decoding curve / electro-optical transfer function methods.

log_decoding_Log3G10(y[, method])

Defines the Log3G10 log decoding curve / electro-optical transfer function.

log_encoding_Log3G12(x)

Defines the Log3G12 log encoding curve / opto-electronic transfer function.

log_decoding_Log3G12(y)

Defines the Log3G12 log decoding curve / electro-optical transfer function.

log_encoding_Panalog(x[, black_offset])

Defines the Panalog log encoding curve / opto-electronic transfer function.

log_decoding_Panalog(y[, black_offset])

Defines the Panalog log decoding curve / electro-optical transfer function.

log_encoding_PivotedLog(x[, log_reference, …])

Defines the Josh Pines style Pivoted Log log encoding curve / opto-electronic transfer function.

log_decoding_PivotedLog(y[, log_reference, …])

Defines the Josh Pines style Pivoted Log log decoding curve / electro-optical transfer function.

log_encoding_Protune(x)

Defines the Protune log encoding curve / opto-electronic transfer function.

log_decoding_Protune(y)

Defines the Protune log decoding curve / electro-optical transfer function.

log_encoding_REDLog(x[, black_offset])

Defines the REDLog log encoding curve / opto-electronic transfer function.

log_decoding_REDLog(y[, black_offset])

Defines the REDLog log decoding curve / electro-optical transfer function.

log_encoding_REDLogFilm(x[, black_offset])

Defines the REDLogFilm log encoding curve / opto-electronic transfer function.

log_decoding_REDLogFilm(y[, black_offset])

Defines the REDLogFilm log decoding curve / electro-optical transfer function.

log_encoding_SLog(x[, bit_depth, …])

Defines the Sony S-Log log encoding curve / opto-electronic transfer function.

log_decoding_SLog(y[, bit_depth, …])

Defines the Sony S-Log log decoding curve / electro-optical transfer function.

log_encoding_SLog2(x[, bit_depth, …])

Defines the Sony S-Log2 log encoding curve / opto-electronic transfer function.

log_decoding_SLog2(y[, bit_depth, …])

Defines the Sony S-Log2 log decoding curve / electro-optical transfer function.

log_encoding_SLog3(x[, bit_depth, …])

Defines the Sony S-Log3 log encoding curve / opto-electronic transfer function.

log_decoding_SLog3(y[, bit_depth, …])

Defines the Sony S-Log3 log decoding curve / electro-optical transfer function.

log_encoding_VLog(L_in[, bit_depth, …])

Defines the Panasonic V-Log log encoding curve / opto-electronic transfer function.

log_decoding_VLog(V_out[, bit_depth, …])

Defines the Panasonic V-Log log decoding curve / electro-optical transfer function.

log_encoding_ViperLog(x)

Defines the Viper Log log encoding curve / opto-electronic transfer function.

log_decoding_ViperLog(y)

Defines the Viper Log log decoding curve / electro-optical transfer function.

ACES Spectral Conversion

colour

sd_to_aces_relative_exposure_values(sd[, …])

Converts given spectral distribution to ACES2065-1 colourspace relative exposure values.

Ancillary Objects

colour.models

ACES_RICD

Implements support for the CIE RGB colour matching functions.

Colour Encodings

Y’CbCr Colour Encoding

colour

RGB_to_YCbCr(RGB[, K, in_bits, in_legal, …])

Converts an array of R’G’B’ values to the corresponding Y’CbCr colour encoding values array.

YCbCr_to_RGB(YCbCr[, K, in_bits, in_legal, …])

Converts an array of Y’CbCr colour encoding values to the corresponding R’G’B’ values array.

YCBCR_WEIGHTS

Implements a case-insensitive mutable mapping / dict object.

RGB_to_YcCbcCrc(RGB[, out_bits, out_legal, …])

Converts an array of RGB linear values to the corresponding Yc’Cbc’Crc’ colour encoding values array.

YcCbcCrc_to_RGB(YcCbcCrc[, in_bits, …])

Converts an array of Yc’Cbc’Crc’ colour encoding values to the corresponding RGB array of linear values.

Ancillary Objects

colour

full_to_legal(CV[, bit_depth, in_int, out_int])

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).

legal_to_full(CV[, bit_depth, in_int, out_int])

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).

CV_range([bit_depth, is_legal, is_int])

Returns the code value \(CV\) range for given bit depth, range legality and representation.

YCoCg Colour Encoding

colour

RGB_to_YCoCg(RGB)

Converts an array of R’G’B’ values to the corresponding YCoCg colour encoding values array.

YCoCg_to_RGB(YCoCg)

Converts an array of YCoCg colour encoding values to the corresponding R’G’B’ values array.

\(IC_TC_P\) Colour Encoding

colour

RGB_to_ICTCP(RGB[, L_p])

Converts from ITU-R BT.2020 colourspace to \(IC_TC_P\) colour encoding.

ICTCP_to_RGB(ICTCP[, L_p])

Converts from \(IC_TC_P\) colour encoding to ITU-R BT.2020 colourspace.

RGB Representations

Prismatic Colourspace

colour

RGB_to_Prismatic(RGB)

Converts from RGB colourspace to Prismatic \(L\rho\gamma\beta\) colourspace array.

Prismatic_to_RGB(Lrgb)

Converts from Prismatic \(L\rho\gamma\beta\) colourspace array to RGB colourspace.

HSV Colourspace

colour

RGB_to_HSV(RGB)

Converts from RGB colourspace to HSV colourspace.

HSV_to_RGB(HSV)

Converts from HSV colourspace to RGB colourspace.

HSL Colourspace

colour

RGB_to_HSL(RGB)

Converts from RGB colourspace to HSL colourspace.

HSL_to_RGB(HSL)

Converts from HSL colourspace to RGB colourspace.

CMY Colourspace

colour

RGB_to_CMY(RGB)

Converts from RGB colourspace to CMY colourspace.

CMY_to_RGB(CMY)

Converts from CMY colourspace to CMY colourspace.

CMY_to_CMYK(CMY)

Converts from CMY colourspace to CMYK colourspace.

CMYK_to_CMY(CMYK)

Converts from CMYK colourspace to CMY colourspace.