Coverage for models/rgb/datasets/itur_bt_2020.py: 0%

1"""

2 Recommendation ITU-R BT.2020 Colourspace

3========================================

4

5 Define the *RecommendationITU-R BT.2020* colourspace:

6

7- :attr:`colour.models.RGB_COLOURSPACE_BT2020`.

8

9 References

10----------

11- :cite:`InternationalTelecommunicationUnion2015h` : International

12 Telecommunication Union. (2015). Recommendation ITU-R BT.2020 - Parameter

13 values for ultra-high definition television systems for production and

14 international programme exchange (pp. 1-8).

15 https://www.itu.int/dms_pubrec/itu-r/rec/bt/\

16 R-REC-BT.2020-2-201510-I!!PDF-E.pdf

17"""

18

19 from __future__ import annotations

20

21 import typing

22

23 import numpy as np

24

25 from colour.colorimetry import CCS_ILLUMINANTS

26

27 if typing.TYPE_CHECKING:

28 from colour.hints import NDArrayFloat

29

30 from colour.models.rgb import (

31 RGB_Colourspace,

32 normalised_primary_matrix,

33 oetf_BT2020,

34 oetf_inverse_BT2020,

35)

36

37 __author__ = "Colour Developers"

38 __copyright__ = "Copyright 2013 Colour Developers"

39 __license__ = "BSD-3-Clause - https://opensource.org/licenses/BSD-3-Clause"

40 __maintainer__ = "Colour Developers"

41 __email__ = "colour-developers@colour-science.org"

42 __status__ = "Production"

43

44 __all__ = [

45 "PRIMARIES_BT2020",

46 "WHITEPOINT_NAME_BT2020",

47 "CCS_WHITEPOINT_BT2020",

48 "MATRIX_BT2020_TO_XYZ",

49 "MATRIX_XYZ_TO_BT2020",

50 "RGB_COLOURSPACE_BT2020",

51]

52

53 PRIMARIES_BT2020: NDArrayFloat = np.array(

54 [

55 [0.7080, 0.2920],

56 [0.1700, 0.7970],

57 [0.1310, 0.0460],

58 ]

59)

60"""*RecommendationITU-R BT.2020* colourspace primaries."""

61

62 WHITEPOINT_NAME_BT2020: str = "D65"

63"""*RecommendationITU-R BT.2020* colourspace whitepoint name."""

64

65 CCS_WHITEPOINT_BT2020: NDArrayFloat = CCS_ILLUMINANTS[

66 "CIE 1931 2 Degree Standard Observer"

67][WHITEPOINT_NAME_BT2020]

68"""

69*RecommendationITU-R BT.2020* colourspace whitepoint chromaticity coordinates.

70"""

71

72 MATRIX_BT2020_TO_XYZ: NDArrayFloat = normalised_primary_matrix(

73 PRIMARIES_BT2020, CCS_WHITEPOINT_BT2020

74)

75"""

76*RecommendationITU-R BT.2020* colourspace to *CIE XYZ* tristimulus values

77 matrix.

78"""

79

80 MATRIX_XYZ_TO_BT2020: NDArrayFloat = np.linalg.inv(MATRIX_BT2020_TO_XYZ)

81"""

82*CIE XYZ* tristimulus values to *RecommendationITU-R BT.2020* colourspace

83 matrix.

84"""

85

86 RGB_COLOURSPACE_BT2020: RGB_Colourspace = RGB_Colourspace(

87 "ITU-R BT.2020",

88 PRIMARIES_BT2020,

89 CCS_WHITEPOINT_BT2020,

90 WHITEPOINT_NAME_BT2020,

91 MATRIX_BT2020_TO_XYZ,

92 MATRIX_XYZ_TO_BT2020,

93 oetf_BT2020,

94 oetf_inverse_BT2020,

95)

96 RGB_COLOURSPACE_BT2020.__doc__ = """

97*RecommendationITU-R BT.2020* colourspace.

98

99 The wavelength of the *RecommendationITU-R BT.2020* primary colours are:

100

101- 630nm for the red primary colour

102- 532nm for the green primary colour

103- 467nm for the blue primary colour.

104

105 References

106----------

107:cite:`InternationalTelecommunicationUnion2015h`

108"""