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

1"""

2 Adobe RGB (1998) Colourspace

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

4

5 Define the *Adobe RGB (1998)* *RGB* colourspace:

6

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

8

9 References

10----------

11- :cite:`AdobeSystems2005a` : Adobe Systems. (2005). Adobe RGB (1998) Color

12 Image Encoding. http://www.adobe.com/digitalimag/pdfs/AdobeRGB1998.pdf

13"""

14

15 from __future__ import annotations

16

17 import typing

18 from functools import partial

19

20 import numpy as np

21

22 from colour.colorimetry import CCS_ILLUMINANTS

23

24 if typing.TYPE_CHECKING:

25 from colour.hints import NDArrayFloat

26

27 from colour.models.rgb import RGB_Colourspace, gamma_function

28

29 __author__ = "Colour Developers"

30 __copyright__ = "Copyright 2013 Colour Developers"

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

32 __maintainer__ = "Colour Developers"

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

34 __status__ = "Production"

35

36 __all__ = [

37 "PRIMARIES_ADOBE_RGB1998",

38 "WHITEPOINT_NAME_ADOBE_RGB1998",

39 "CCS_WHITEPOINT_ADOBE_RGB1998",

40 "MATRIX_ADOBE_RGB1998_TO_XYZ",

41 "MATRIX_XYZ_TO_ADOBE_RGB1998",

42 "RGB_COLOURSPACE_ADOBE_RGB1998",

43]

44

45 PRIMARIES_ADOBE_RGB1998: NDArrayFloat = np.array(

46 [

47 [0.6400, 0.3300],

48 [0.2100, 0.7100],

49 [0.1500, 0.0600],

50 ]

51)

52"""*Adobe RGB (1998)* colourspace primaries."""

53

54 WHITEPOINT_NAME_ADOBE_RGB1998: str = "D65"

55"""*Adobe RGB (1998)* colourspace whitepoint name."""

56

57 CCS_WHITEPOINT_ADOBE_RGB1998: NDArrayFloat = CCS_ILLUMINANTS[

58 "CIE 1931 2 Degree Standard Observer"

59][WHITEPOINT_NAME_ADOBE_RGB1998]

60"""*Adobe RGB (1998)* colourspace whitepoint chromaticity coordinates."""

61

62 MATRIX_ADOBE_RGB1998_TO_XYZ: NDArrayFloat = np.array(

63 [

64 [0.57667, 0.18556, 0.18823],

65 [0.29734, 0.62736, 0.07529],

66 [0.02703, 0.07069, 0.99134],

67 ]

68)

69"""*Adobe RGB (1998)* colourspace to *CIE XYZ* tristimulus values matrix."""

70

71 MATRIX_XYZ_TO_ADOBE_RGB1998: NDArrayFloat = np.array(

72 [

73 [2.04159, -0.56501, -0.34473],

74 [-0.96924, 1.87597, 0.04156],

75 [0.01344, -0.11836, 1.01517],

76 ]

77)

78"""*CIE XYZ* tristimulus values to *Adobe RGB (1998)* colourspace matrix."""

79

80 RGB_COLOURSPACE_ADOBE_RGB1998: RGB_Colourspace = RGB_Colourspace(

81 "Adobe RGB (1998)",

82 PRIMARIES_ADOBE_RGB1998,

83 CCS_WHITEPOINT_ADOBE_RGB1998,

84 WHITEPOINT_NAME_ADOBE_RGB1998,

85 MATRIX_ADOBE_RGB1998_TO_XYZ,

86 MATRIX_XYZ_TO_ADOBE_RGB1998,

87 partial(gamma_function, exponent=1 / (563 / 256)),

88 partial(gamma_function, exponent=563 / 256),

89)

90 RGB_COLOURSPACE_ADOBE_RGB1998.__doc__ = """

91*Adobe RGB (1998)* colourspace.

92

93 References

94----------

95:cite:`AdobeSystems2005a`

96"""