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

23 statements  

« prev     ^ index     » next       coverage.py v7.11.0, created at 2025-11-16 22:49 +1300

1""" 

2Nikon N-Gamut Colourspace 

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

4 

5Define the *Nikon N-Gamut* colourspace: 

6 

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

8 

9References 

10---------- 

11- :cite:`Nikon2018` : Nikon. (2018). N-Log Specification Document - Version 

12 1.0.0 (pp. 1-5). Retrieved September 9, 2019, from 

13 http://download.nikonimglib.com/archive3/hDCmK00m9JDI03RPruD74xpoU905/\ 

14N-Log_Specification_(En)01.pdf 

15""" 

16 

17from __future__ import annotations 

18 

19import typing 

20 

21if typing.TYPE_CHECKING: 

22 from colour.hints import NDArrayFloat 

23 

24from colour.models.rgb import RGB_Colourspace, log_decoding_NLog, log_encoding_NLog 

25from colour.models.rgb.datasets.itur_bt_2020 import ( 

26 CCS_WHITEPOINT_BT2020, 

27 MATRIX_BT2020_TO_XYZ, 

28 MATRIX_XYZ_TO_BT2020, 

29 PRIMARIES_BT2020, 

30 WHITEPOINT_NAME_BT2020, 

31) 

32 

33__author__ = "Colour Developers" 

34__copyright__ = "Copyright 2013 Colour Developers" 

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

36__maintainer__ = "Colour Developers" 

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

38__status__ = "Production" 

39 

40__all__ = [ 

41 "PRIMARIES_N_GAMUT", 

42 "WHITEPOINT_NAME_N_GAMUT", 

43 "CCS_WHITEPOINT_N_GAMUT", 

44 "MATRIX_N_GAMUT_TO_XYZ", 

45 "MATRIX_XYZ_TO_N_GAMUT", 

46 "RGB_COLOURSPACE_N_GAMUT", 

47] 

48 

49PRIMARIES_N_GAMUT: NDArrayFloat = PRIMARIES_BT2020 

50""" 

51*Nikon N-Gamut* colourspace primaries. 

52 

53Notes 

54----- 

55The *Nikon N-Gamut* colourspace gamut is same as the "ITU-R BT.2020" wide 

56colour gamut. 

57""" 

58 

59WHITEPOINT_NAME_N_GAMUT: str = WHITEPOINT_NAME_BT2020 

60"""*Nikon N-Gamut* colourspace whitepoint name.""" 

61 

62CCS_WHITEPOINT_N_GAMUT: NDArrayFloat = CCS_WHITEPOINT_BT2020 

63"""*Nikon N-Gamut* colourspace whitepoint.""" 

64 

65MATRIX_N_GAMUT_TO_XYZ: NDArrayFloat = MATRIX_BT2020_TO_XYZ 

66"""*Nikon N-Gamut* colourspace to *CIE XYZ* tristimulus values matrix.""" 

67 

68MATRIX_XYZ_TO_N_GAMUT: NDArrayFloat = MATRIX_XYZ_TO_BT2020 

69"""*CIE XYZ* tristimulus values to *Nikon N-Gamut* colourspace matrix.""" 

70 

71RGB_COLOURSPACE_N_GAMUT: RGB_Colourspace = RGB_Colourspace( 

72 "N-Gamut", 

73 PRIMARIES_N_GAMUT, 

74 CCS_WHITEPOINT_N_GAMUT, 

75 WHITEPOINT_NAME_N_GAMUT, 

76 MATRIX_N_GAMUT_TO_XYZ, 

77 MATRIX_XYZ_TO_N_GAMUT, 

78 log_encoding_NLog, 

79 log_decoding_NLog, 

80) 

81RGB_COLOURSPACE_N_GAMUT.__doc__ = """ 

82*Nikon N-Gamut* colourspace. 

83 

84References 

85---------- 

86:cite:`Nikon2018` 

87"""