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

1"""

2 DaVinci Wide Gamut Colourspace

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

4

5 Define the *DaVinci Wide Gamut* *RGB* colourspace:

6

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

8

9 References

10----------

11- :cite:`BlackmagicDesign2020` : Blackmagic Design. (2020).

12 DaVinci Wide Gamut - DaVinci Resolve Studio 17 Public Beta 1.

13- :cite:`BlackmagicDesign2020a` : Blackmagic Design. (2020). Wide Gamut

14 Intermediate DaVinci Resolve. Retrieved December 12, 2020, from

15 https://documents.blackmagicdesign.com/InformationNotes/\

16 DaVinci_Resolve_17_Wide_Gamut_Intermediate.pdf?_v=1607414410000

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 oetf_DaVinciIntermediate,

33 oetf_inverse_DaVinciIntermediate,

34)

35

36 __author__ = "Colour Developers"

37 __copyright__ = "Copyright 2013 Colour Developers"

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

39 __maintainer__ = "Colour Developers"

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

41 __status__ = "Production"

42

43 __all__ = [

44 "PRIMARIES_DAVINCI_WIDE_GAMUT",

45 "WHITEPOINT_NAME_DAVINCI_WIDE_GAMUT",

46 "CCS_WHITEPOINT_DAVINCI_WIDE_GAMUT",

47 "MATRIX_DAVINCI_WIDE_GAMUT_TO_XYZ",

48 "MATRIX_XYZ_TO_DAVINCI_WIDE_GAMUT",

49 "RGB_COLOURSPACE_DAVINCI_WIDE_GAMUT",

50]

51

52 PRIMARIES_DAVINCI_WIDE_GAMUT: NDArrayFloat = np.array(

53 [

54 [0.8000, 0.3130],

55 [0.1682, 0.9877],

56 [0.0790, -0.1155],

57 ]

58)

59"""*DaVinci Wide Gamut* colourspace primaries."""

60

61 WHITEPOINT_NAME_DAVINCI_WIDE_GAMUT: str = "D65"

62"""*DaVinci Wide Gamut* colourspace whitepoint name."""

63

64 CCS_WHITEPOINT_DAVINCI_WIDE_GAMUT: NDArrayFloat = CCS_ILLUMINANTS[

65 "CIE 1931 2 Degree Standard Observer"

66][WHITEPOINT_NAME_DAVINCI_WIDE_GAMUT]

67"""*DaVinci Wide Gamut* colourspace whitepoint chromaticity coordinates."""

68

69 MATRIX_DAVINCI_WIDE_GAMUT_TO_XYZ: NDArrayFloat = np.array(

70 [

71 [0.70062239, 0.14877482, 0.10105872],

72 [0.27411851, 0.87363190, -0.14775041],

73 [-0.09896291, -0.13789533, 1.32591599],

74 ]

75)

76"""*DaVinci Wide Gamut* colourspace to *CIE XYZ* tristimulus values matrix."""

77

78 MATRIX_XYZ_TO_DAVINCI_WIDE_GAMUT: NDArrayFloat = np.array(

79 [

80 [1.51667204, -0.28147805, -0.14696363],

81 [-0.46491710, 1.25142378, 0.17488461],

82 [0.06484905, 0.10913934, 0.76141462],

83 ]

84)

85"""*CIE XYZ* tristimulus values to *DaVinci Wide Gamut* colourspace matrix."""

86

87 RGB_COLOURSPACE_DAVINCI_WIDE_GAMUT: RGB_Colourspace = RGB_Colourspace(

88 "DaVinci Wide Gamut",

89 PRIMARIES_DAVINCI_WIDE_GAMUT,

90 CCS_WHITEPOINT_DAVINCI_WIDE_GAMUT,

91 WHITEPOINT_NAME_DAVINCI_WIDE_GAMUT,

92 MATRIX_DAVINCI_WIDE_GAMUT_TO_XYZ,

93 MATRIX_XYZ_TO_DAVINCI_WIDE_GAMUT,

94 oetf_DaVinciIntermediate,

95 oetf_inverse_DaVinciIntermediate,

96 use_derived_matrix_RGB_to_XYZ=True,

97 use_derived_matrix_XYZ_to_RGB=True,

98)

99 RGB_COLOURSPACE_DAVINCI_WIDE_GAMUT.__doc__ = """

100*DaVinci Wide Gamut* colourspace.

101

102 References

103----------

104:cite:`BlackmagicDesign2020`, :cite:`BlackmagicDesign2020a`

105"""