Skip to content

Commit

Permalink
Add the *Color Interop Forum* (CIF) recommendation *RGB* colourspaces.
Browse files Browse the repository at this point in the history
Closes #1312.
  • Loading branch information
KelSolaar committed Nov 28, 2024
1 parent 316d4ab commit e7d6aa6
Show file tree
Hide file tree
Showing 8 changed files with 542 additions and 79 deletions.
28 changes: 27 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1356,6 +1356,7 @@ RGB Colourspaces
'Beta RGB',
'Blackmagic Wide Gamut',
'CIE RGB',
'CIE XYZ-D65 - Scene-referred',
'Cinema Gamut',
'ColorMatch RGB',
'DCDM XYZ',
Expand All @@ -1373,12 +1374,20 @@ RGB Colourspaces
'Ekta Space PS 5',
'F-Gamut',
'FilmLight E-Gamut',
'Gamma 1.8 Encoded Rec.709',
'Gamma 2.2 Encoded AP1',
'Gamma 2.2 Encoded AdobeRGB',
'Gamma 2.2 Encoded Rec.709',
'ITU-R BT.2020',
'ITU-R BT.470 - 525',
'ITU-R BT.470 - 625',
'ITU-R BT.709',
'ITU-T H.273 - 22 Unspecified',
'ITU-T H.273 - Generic Film',
'Linear AdobeRGB',
'Linear P3-D65',
'Linear Rec.2020',
'Linear Rec.709 (sRGB)',
'Max RGB',
'N-Gamut',
'NTSC (1953)',
Expand Down Expand Up @@ -1408,8 +1417,25 @@ RGB Colourspaces
'Xtreme RGB',
'aces',
'adobe1998',
'g18_rec709_scene',
'g22_adobergb_scene',
'g22_ap1_scene',
'g22_rec709_scene',
'lin_adobergb_scene',
'lin_ap0_scene',
'lin_ap1_scene',
'lin_ciexyzd65_scene',
'lin_p3d65_scene',
'lin_rec2020_scene',
'lin_rec709_scene',
'prophoto',
'sRGB']
'sRGB',
'sRGB Encoded AP1',
'sRGB Encoded P3-D65',
'sRGB Encoded Rec.709 (sRGB)',
'srgb_ap1_scene',
'srgb_p3d65_scene',
'srgb_rec709_scene']
OETFs
*****
Expand Down
87 changes: 56 additions & 31 deletions colour/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,23 +269,24 @@
)
from .rgb import (
RGB_COLOURSPACES,
RGB_COLOURSPACES_TEXTURE_ASSETS_AND_CG_RENDERING_CIF,
RGB_COLOURSPACE_ACES2065_1,
RGB_COLOURSPACE_ACESCC,
RGB_COLOURSPACE_ACESCCT,
RGB_COLOURSPACE_ACESPROXY,
RGB_COLOURSPACE_ACESCG,
RGB_COLOURSPACE_ACESPROXY,
RGB_COLOURSPACE_ADOBE_RGB1998,
RGB_COLOURSPACE_ADOBE_WIDE_GAMUT_RGB,
RGB_COLOURSPACE_APPLE_RGB,
RGB_COLOURSPACE_ARRI_WIDE_GAMUT_3,
RGB_COLOURSPACE_ARRI_WIDE_GAMUT_4,
RGB_COLOURSPACE_APPLE_RGB,
RGB_COLOURSPACE_BEST_RGB,
RGB_COLOURSPACE_BETA_RGB,
RGB_COLOURSPACE_BLACKMAGIC_WIDE_GAMUT,
RGB_COLOURSPACE_BT2020,
RGB_COLOURSPACE_BT470_525,
RGB_COLOURSPACE_BT470_625,
RGB_COLOURSPACE_BT709,
RGB_COLOURSPACE_BT2020,
RGB_COLOURSPACE_CIE_RGB,
RGB_COLOURSPACE_CINEMA_GAMUT,
RGB_COLOURSPACE_COLOR_MATCH_RGB,
Expand All @@ -296,44 +297,56 @@
RGB_COLOURSPACE_DISPLAY_P3,
RGB_COLOURSPACE_DJI_D_GAMUT,
RGB_COLOURSPACE_DON_RGB_4,
RGB_COLOURSPACE_DRAGON_COLOR,
RGB_COLOURSPACE_DRAGON_COLOR_2,
RGB_COLOURSPACE_EBU_3213_E,
RGB_COLOURSPACE_ECI_RGB_V2,
RGB_COLOURSPACE_EKTA_SPACE_PS_5,
RGB_COLOURSPACE_ERIMM_RGB,
RGB_COLOURSPACE_FILMLIGHT_E_GAMUT,
RGB_COLOURSPACE_H273_GENERIC_FILM,
RGB_COLOURSPACE_F_GAMUT,
RGB_COLOURSPACE_G18_REC709_SCENE,
RGB_COLOURSPACE_G22_ADOBERGB_SCENE,
RGB_COLOURSPACE_G22_AP1_SCENE,
RGB_COLOURSPACE_G22_REC709_SCENE,
RGB_COLOURSPACE_H273_22_UNSPECIFIED,
RGB_COLOURSPACE_PROTUNE_NATIVE,
RGB_COLOURSPACE_H273_GENERIC_FILM,
RGB_COLOURSPACE_LIN_ADOBERGB_SCENE,
RGB_COLOURSPACE_LIN_CIEXYZD65_SCENE,
RGB_COLOURSPACE_LIN_P3D65_SCENE,
RGB_COLOURSPACE_LIN_REC2020_SCENE,
RGB_COLOURSPACE_LIN_REC709_SCENE,
RGB_COLOURSPACE_MAX_RGB,
RGB_COLOURSPACE_NTSC1953,
RGB_COLOURSPACE_NTSC1987,
RGB_COLOURSPACE_N_GAMUT,
RGB_COLOURSPACE_P3_D65,
RGB_COLOURSPACE_PAL_SECAM,
RGB_COLOURSPACE_PLASA_ANSI_E154,
RGB_COLOURSPACE_PROPHOTO_RGB,
RGB_COLOURSPACE_PROTUNE_NATIVE,
RGB_COLOURSPACE_RED_COLOR,
RGB_COLOURSPACE_RED_COLOR_2,
RGB_COLOURSPACE_RED_COLOR_3,
RGB_COLOURSPACE_RED_COLOR_4,
RGB_COLOURSPACE_DRAGON_COLOR,
RGB_COLOURSPACE_DRAGON_COLOR_2,
RGB_COLOURSPACE_RED_WIDE_GAMUT_RGB,
RGB_COLOURSPACE_ROMM_RGB,
RGB_COLOURSPACE_RIMM_RGB,
RGB_COLOURSPACE_ERIMM_RGB,
RGB_COLOURSPACE_PROPHOTO_RGB,
RGB_COLOURSPACE_PLASA_ANSI_E154,
RGB_COLOURSPACE_ROMM_RGB,
RGB_COLOURSPACE_RUSSELL_RGB,
RGB_COLOURSPACE_SHARP_RGB,
RGB_COLOURSPACE_SMPTE_240M,
RGB_COLOURSPACE_SMPTE_C,
RGB_COLOURSPACE_NTSC1953,
RGB_COLOURSPACE_NTSC1987,
RGB_COLOURSPACE_SRGB_AP1_SCENE,
RGB_COLOURSPACE_SRGB_P3D65_SCENE,
RGB_COLOURSPACE_SRGB_REC709_SCENE,
RGB_COLOURSPACE_S_GAMUT,
RGB_COLOURSPACE_S_GAMUT3,
RGB_COLOURSPACE_S_GAMUT3_CINE,
RGB_COLOURSPACE_VENICE_S_GAMUT3,
RGB_COLOURSPACE_VENICE_S_GAMUT3_CINE,
RGB_COLOURSPACE_sRGB,
RGB_COLOURSPACE_V_GAMUT,
RGB_COLOURSPACE_XTREME_RGB,
RGB_COLOURSPACE_F_GAMUT,
RGB_COLOURSPACE_sRGB,
)

from .rgb import XYZ_to_sRGB, sRGB_to_XYZ
Expand Down Expand Up @@ -799,23 +812,24 @@
]
__all__ += [
"RGB_COLOURSPACES",
"RGB_COLOURSPACES_TEXTURE_ASSETS_AND_CG_RENDERING_CIF",
"RGB_COLOURSPACE_ACES2065_1",
"RGB_COLOURSPACE_ACESCC",
"RGB_COLOURSPACE_ACESCCT",
"RGB_COLOURSPACE_ACESPROXY",
"RGB_COLOURSPACE_ACESCG",
"RGB_COLOURSPACE_ACESPROXY",
"RGB_COLOURSPACE_ADOBE_RGB1998",
"RGB_COLOURSPACE_ADOBE_WIDE_GAMUT_RGB",
"RGB_COLOURSPACE_APPLE_RGB",
"RGB_COLOURSPACE_ARRI_WIDE_GAMUT_3",
"RGB_COLOURSPACE_ARRI_WIDE_GAMUT_4",
"RGB_COLOURSPACE_APPLE_RGB",
"RGB_COLOURSPACE_BEST_RGB",
"RGB_COLOURSPACE_BETA_RGB",
"RGB_COLOURSPACE_BLACKMAGIC_WIDE_GAMUT",
"RGB_COLOURSPACE_BT2020",
"RGB_COLOURSPACE_BT470_525",
"RGB_COLOURSPACE_BT470_625",
"RGB_COLOURSPACE_BT709",
"RGB_COLOURSPACE_BT2020",
"RGB_COLOURSPACE_CIE_RGB",
"RGB_COLOURSPACE_CINEMA_GAMUT",
"RGB_COLOURSPACE_COLOR_MATCH_RGB",
Expand All @@ -826,46 +840,57 @@
"RGB_COLOURSPACE_DISPLAY_P3",
"RGB_COLOURSPACE_DJI_D_GAMUT",
"RGB_COLOURSPACE_DON_RGB_4",
"RGB_COLOURSPACE_DRAGON_COLOR",
"RGB_COLOURSPACE_DRAGON_COLOR_2",
"RGB_COLOURSPACE_EBU_3213_E",
"RGB_COLOURSPACE_ECI_RGB_V2",
"RGB_COLOURSPACE_EKTA_SPACE_PS_5",
"RGB_COLOURSPACE_ERIMM_RGB",
"RGB_COLOURSPACE_FILMLIGHT_E_GAMUT",
"RGB_COLOURSPACE_H273_GENERIC_FILM",
"RGB_COLOURSPACE_F_GAMUT",
"RGB_COLOURSPACE_G18_REC709_SCENE",
"RGB_COLOURSPACE_G22_ADOBERGB_SCENE",
"RGB_COLOURSPACE_G22_AP1_SCENE",
"RGB_COLOURSPACE_G22_REC709_SCENE",
"RGB_COLOURSPACE_H273_22_UNSPECIFIED",
"RGB_COLOURSPACE_PROTUNE_NATIVE",
"RGB_COLOURSPACE_H273_GENERIC_FILM",
"RGB_COLOURSPACE_LIN_ADOBERGB_SCENE",
"RGB_COLOURSPACE_LIN_CIEXYZD65_SCENE",
"RGB_COLOURSPACE_LIN_P3D65_SCENE",
"RGB_COLOURSPACE_LIN_REC2020_SCENE",
"RGB_COLOURSPACE_LIN_REC709_SCENE",
"RGB_COLOURSPACE_MAX_RGB",
"RGB_COLOURSPACE_NTSC1953",
"RGB_COLOURSPACE_NTSC1987",
"RGB_COLOURSPACE_N_GAMUT",
"RGB_COLOURSPACE_P3_D65",
"RGB_COLOURSPACE_PAL_SECAM",
"RGB_COLOURSPACE_PLASA_ANSI_E154",
"RGB_COLOURSPACE_PROPHOTO_RGB",
"RGB_COLOURSPACE_PROTUNE_NATIVE",
"RGB_COLOURSPACE_RED_COLOR",
"RGB_COLOURSPACE_RED_COLOR_2",
"RGB_COLOURSPACE_RED_COLOR_3",
"RGB_COLOURSPACE_RED_COLOR_4",
"RGB_COLOURSPACE_DRAGON_COLOR",
"RGB_COLOURSPACE_DRAGON_COLOR_2",
"RGB_COLOURSPACE_RED_WIDE_GAMUT_RGB",
"RGB_COLOURSPACE_ROMM_RGB",
"RGB_COLOURSPACE_RIMM_RGB",
"RGB_COLOURSPACE_ERIMM_RGB",
"RGB_COLOURSPACE_PROPHOTO_RGB",
"RGB_COLOURSPACE_PLASA_ANSI_E154",
"RGB_COLOURSPACE_ROMM_RGB",
"RGB_COLOURSPACE_RUSSELL_RGB",
"RGB_COLOURSPACE_SHARP_RGB",
"RGB_COLOURSPACE_SMPTE_240M",
"RGB_COLOURSPACE_SMPTE_C",
"RGB_COLOURSPACE_NTSC1953",
"RGB_COLOURSPACE_NTSC1987",
"RGB_COLOURSPACE_SRGB_AP1_SCENE",
"RGB_COLOURSPACE_SRGB_P3D65_SCENE",
"RGB_COLOURSPACE_SRGB_REC709_SCENE",
"RGB_COLOURSPACE_S_GAMUT",
"RGB_COLOURSPACE_S_GAMUT3",
"RGB_COLOURSPACE_S_GAMUT3_CINE",
"RGB_COLOURSPACE_VENICE_S_GAMUT3",
"RGB_COLOURSPACE_VENICE_S_GAMUT3_CINE",
"RGB_COLOURSPACE_sRGB",
"RGB_COLOURSPACE_V_GAMUT",
"RGB_COLOURSPACE_XTREME_RGB",
"RGB_COLOURSPACE_F_GAMUT",
"RGB_COLOURSPACE_sRGB",
]

__all__ += ["XYZ_to_sRGB", "sRGB_to_XYZ"]
__all__ += [
"RGB_to_HSV",
Expand Down
Loading

0 comments on commit e7d6aa6

Please sign in to comment.