-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcolorconverter.py
More file actions
4319 lines (4059 loc) · 141 KB
/
colorconverter.py
File metadata and controls
4319 lines (4059 loc) · 141 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# /// script
# dependencies = [
# "colour-science",
# "matplotlib",
# ]
# ///
"""
Color Converter
===============
This script provides a comprehensive set of functions and CLI options to
convert between various color models and spaces using the Colour Science Python library.
It also offers plotting and analysis features.
"""
import argparse
import json
import sys
from matplotlib.pyplot import close, grid, savefig, xticks, yticks
import numpy as np
from colour import (
CCS_ILLUMINANTS,
chromatic_adaptation,
CMY_to_CMYK,
colorimetric_purity,
colour_fidelity_index,
colour_quality_scale,
colour_rendering_index,
complementary_wavelength,
dominant_wavelength,
excitation_purity,
IPT_hue_angle,
is_within_macadam_limits,
is_within_pointer_gamut,
Lab_to_LCHab,
Lab_to_XYZ,
LCHab_to_Lab,
LCHuv_to_Luv,
lightness,
luminance,
luminous_efficacy,
luminous_efficiency,
luminous_flux,
Luv_to_LCHuv,
Luv_to_XYZ,
MEDIA_PARAMETERS_KIM2009,
MSDS_CMFS,
munsell_value,
RGB_COLOURSPACES,
RGB_luminance,
RGB_to_CMY,
RGB_to_HCL,
RGB_to_HSL,
RGB_to_HSV,
RGB_to_IHLS,
RGB_to_Prismatic,
RGB_to_RGB,
RGB_to_XYZ,
RGB_to_YCbCr,
RGB_to_YcCbcCrc,
RGB_to_YCoCg,
sd_to_XYZ,
SDS_ILLUMINANTS,
spectral_similarity_index,
SpectralDistribution,
SpectralShape,
TVS_ILLUMINANTS,
TVS_ILLUMINANTS_HUNTERLAB,
UCS_to_uv,
uv_to_CCT,
VIEWING_CONDITIONS_CAM16,
VIEWING_CONDITIONS_CIECAM02,
VIEWING_CONDITIONS_CIECAM16,
VIEWING_CONDITIONS_HELLWIG2022,
VIEWING_CONDITIONS_HUNT,
VIEWING_CONDITIONS_KIM2009,
VIEWING_CONDITIONS_LLAB,
VIEWING_CONDITIONS_RLAB,
VIEWING_CONDITIONS_ZCAM,
wavelength_to_XYZ,
xy_to_Luv_uv,
xy_to_XYZ,
xyY_to_munsell_colour,
XYZ_to_ATD95,
XYZ_to_CAM16,
XYZ_to_CIECAM02,
XYZ_to_CIECAM16,
XYZ_to_DIN99,
XYZ_to_hdr_CIELab,
XYZ_to_hdr_IPT,
XYZ_to_Hellwig2022,
XYZ_to_Hunt,
XYZ_to_Hunter_Lab,
XYZ_to_Hunter_Rdab,
XYZ_to_ICaCb,
XYZ_to_ICtCp,
XYZ_to_IgPgTg,
XYZ_to_IPT,
XYZ_to_IPT_Ragoo2021,
XYZ_to_Jzazbz,
XYZ_to_K_ab_HunterLab1966,
XYZ_to_Kim2009,
XYZ_to_Lab,
XYZ_to_LLAB,
XYZ_to_Luv,
XYZ_to_Nayatani95,
XYZ_to_Oklab,
XYZ_to_OSA_UCS,
XYZ_to_ProLab,
XYZ_to_RGB,
XYZ_to_RLAB,
XYZ_to_UCS,
XYZ_to_UVW,
XYZ_to_xy,
XYZ_to_xyY,
XYZ_to_Yrg,
XYZ_to_ZCAM,
)
from colour.appearance import D_FACTOR_RLAB
from colour.colorimetry import (
whiteness_CIE2004,
whiteness_Berger1959,
whiteness_Stensby1968,
whiteness_ASTME313,
yellowness_ASTMD1925,
yellowness_ASTME313,
)
from colour.graph.conversion import (
CAM16_to_JMh_CAM16,
JMh_CAM16_to_CAM16LCD,
JMh_CAM16_to_CAM16SCD,
JMh_CAM16_to_CAM16UCS,
CIECAM02_to_JMh_CIECAM02,
JMh_CIECAM02_to_CAM02LCD,
JMh_CIECAM02_to_CAM02SCD,
JMh_CIECAM02_to_CAM02UCS,
CIECAM16_to_JMh_CIECAM16,
Hellwig2022_to_JMh_Hellwig2022,
)
from colour.models import XYZ_to_Iab, XYZ_to_Izazbz
from colour.plotting import plot_single_sd_colour_rendition_report, plot_multi_sds
from colour.recovery import XYZ_to_sd_Jakob2019
from colour.adaptation import chromatic_adaptation_VonKries
from colour.notation import RGB_to_HEX
from colour.utilities import filter_warnings
# FACTOR FOR NORMALIZATION OF VALUES TO 0:1 DEPENDING ON BITDEPTH
BITDEPTH_FACTOR = {"8": 255, "15+1": 32768, "16": 65535, "32": 1}
CIELAB_DEPTH_VALUES = {
"8": {"L": (0, 100), "ab": (-200, 200)},
"15+1": {"L": (0, 32768), "ab": (-25600, 25600)},
"16": {"L": (0, 65535), "ab": (-51200, 51200)},
"32": {"L": (0, 1), "ab": (-1, 1)},
}
CIELCHUV_DEPTH_VALUES = {
"8": {"L": (0, 100), "Ch": (0, 230), "uv": (0, 360)},
"15+1": {
"L": (0, 32768),
"Ch": (0, 230 * 327.68),
"uv": (0, 360 * 327.68),
}, # Assuming a linear scale with bitdepth
"16": {
"L": (0, 65535),
"Ch": (0, 230 * 655.35),
"uv": (0, 360 * 655.35),
}, # Assuming a linear scale with bitdepth
"32": {"L": (0, 1), "Ch": (0, 230), "uv": (0, 360)},
}
CIEXYZ_DEPTH_VALUES = {"8": (0, 1), "15+1": (0, 1), "16": (0, 1), "32": (0, 1)}
VIS_SPECTRUM_MIN = 360 # nm [CIE 015:2018, pg. 21]
VIS_SPECTRUM_MAX = 830 # nm [CIE 015:2018, pg. 21]
# CIE ILLUMINANTS
# https://www.liquisearch.com/standard_illuminant/white_point/white_points_of_standard_illuminants
# https://en.wikipedia.org/wiki/Standard_illuminant
# ISO 7589:2002(E) ILLUMINANTS
# "Photography - Illuminants for sensitometry - Specifications for daylight, incandescent
# tungsten and printer"
# https://www.iso.org/standard/33979.html
# ACES, Blackmagic Wide Gamut, and DCI-P3 illuminants are used only by a small number of
# spaces in cinema and visual effects
# Illuminants C and E are present in the RGB and CIE_ALL lists because we have color
# spaces that use them
RGB_ILLUMINANTS_LIST = [
"A",
"C",
"D50",
"D55",
"D65",
"D75",
"E",
"FL1",
"FL2",
"FL3",
"FL3.1",
"FL3.2",
"FL3.3",
"FL3.4",
"FL3.5",
"FL3.6",
"FL3.7",
"FL3.8",
"FL3.9",
"FL3.10",
"FL3.11",
"FL3.12",
"FL3.13",
"FL3.14",
"FL3.15",
"FL4",
"FL5",
"FL6",
"FL7",
"FL8",
"FL9",
"FL10",
"FL11",
"FL12",
"HP1",
"HP2",
"HP3",
"HP4",
"HP5",
"ID50",
"ID65",
"LED-B1",
"LED-B2",
"LED-B3",
"LED-B4",
"LED-B5",
"LED-BH1",
"LED-RGB1",
"LED-V1",
"LED-V2",
"ISO 7589 Sensitometric Daylight",
"ISO 7589 Sensitometric Studio Tungsten",
"ISO 7589 Sensitometric Photoflood",
"ISO 7589 Sensitometric Printer",
"ACES",
"Blackmagic Wide Gamut",
"DCI-P3",
]
CIE_ILLUMINANTS_LIST = [
"A",
"D50",
"D55",
"D65",
"D75",
"FL1",
"FL2",
"FL3",
"FL3.1",
"FL3.2",
"FL3.3",
"FL3.4",
"FL3.5",
"FL3.6",
"FL3.7",
"FL3.8",
"FL3.9",
"FL3.10",
"FL3.11",
"FL3.12",
"FL3.13",
"FL3.14",
"FL3.15",
"FL4",
"FL5",
"FL6",
"FL7",
"FL8",
"FL9",
"FL10",
"FL11",
"FL12",
"HP1",
"HP2",
"HP3",
"HP4",
"HP5",
"ID50",
"ID65",
"LED-B1",
"LED-B2",
"LED-B3",
"LED-B4",
"LED-B5",
"LED-BH1",
"LED-RGB1",
"LED-V1",
"LED-V2",
]
CIE_NON_STANDARD_LIST = ["B", "C", "D60", "E"]
CIE_ALL_ILLUMINANTS_LIST = [
"A",
"B",
"C",
"D50",
"D55",
"D60",
"D65",
"D75",
"E",
"FL1",
"FL2",
"FL3",
"FL3.1",
"FL3.2",
"FL3.3",
"FL3.4",
"FL3.5",
"FL3.6",
"FL3.7",
"FL3.8",
"FL3.9",
"FL3.10",
"FL3.11",
"FL3.12",
"FL3.13",
"FL3.14",
"FL3.15",
"FL4",
"FL5",
"FL6",
"FL7",
"FL8",
"FL9",
"FL10",
"FL11",
"FL12",
"HP1",
"HP2",
"HP3",
"HP4",
"HP5",
"ID50",
"ID65",
"LED-B1",
"LED-B2",
"LED-B3",
"LED-B4",
"LED-B5",
"LED-BH1",
"LED-RGB1",
"LED-V1",
"LED-V2",
]
ISO_7589_ILLUMINANTS_LIST = [
"ISO 7589 Sensitometric Daylight",
"ISO 7589 Sensitometric Studio Tungsten",
"ISO 7589 Sensitometric Photoflood",
"ISO 7589 Sensitometric Printer",
]
# CHROMATIC ADAPTATION TRANSFORMS SUPPORTED IN COLOUR
CHROMATIC_ADAPTATION_TRANSFORMS = [
"Bianco 2010",
"Bianco PC 2010",
"Bradford",
"CAT02",
"CAT02 Brill 2008",
"CAT16",
"CMCCAT97",
"CMCCAT2000",
"Fairchild",
"Sharp",
"Von Kries",
"XYZ Scaling",
]
STANDARD_OBSERVERS = [
"CIE 1931 2 Degree Standard Observer",
"CIE 1964 10 Degree Standard Observer",
]
# RGB COLORSPACES SUPPORTED BY CSS4
RGB_CSS_COLORSPACES = [
"sRGB",
"Adobe RGB (1998)",
"Display P3",
"ITU-R BT.2020",
"ProPhoto RGB",
]
# CAM constants
CCT_W = 6504
D_FACTOR_RLAB = D_FACTOR_RLAB["Hard Copy Images"]
HUNTER_D65 = TVS_ILLUMINANTS_HUNTERLAB["CIE 1931 2 Degree Standard Observer"]["D65"]
E_O = 5000.0
E_OR = 1000.0
E_O1 = 200.0
E_O2 = 200.0
K_1 = 0.0
K_2 = 50.0
L_A = L = Y_0 = 318.31
L_A_ZCAM = 264
L_A1 = 200
L_A2 = 200
Y_B = Y_O = 20.0
Y_B_ZCAM = 100
Y_N = 31.83
# Conversions to LMS space needed by some calculations
LMS_TO_LMS_P = lambda x: x**0.43
M_XYZ_TO_LMS = np.array(
[
[0.4002, 0.7075, -0.0807],
[-0.2280, 1.1500, 0.0612],
[0.0000, 0.0000, 0.9184],
]
)
M_LMS_P_TO_IAB = np.array(
[
[0.4000, 0.4000, 0.2000],
[4.4550, -4.8510, 0.3960],
[0.8056, 0.3572, -1.1628],
]
)
# CAM viewing conditions defaults
media_kim2009 = MEDIA_PARAMETERS_KIM2009["CRT Displays"]
sigma_rlab = VIEWING_CONDITIONS_RLAB["Average"]
surround_cam16 = VIEWING_CONDITIONS_CAM16["Average"]
surround_ciecam02 = VIEWING_CONDITIONS_CIECAM02["Average"]
surround_ciecam16 = VIEWING_CONDITIONS_CIECAM16["Average"]
surround_hellwig2022 = VIEWING_CONDITIONS_HELLWIG2022["Average"]
surround_hunt = VIEWING_CONDITIONS_HUNT["Normal Scenes"]
surround_kim2009 = VIEWING_CONDITIONS_KIM2009["Average"]
surround_llab = VIEWING_CONDITIONS_LLAB["ref_average_4_minus"]
surround_zcam = VIEWING_CONDITIONS_ZCAM["Average"]
# DICTIONARY OF COLOR MODELS, WITH SECTION GROUPINGS AND DESCRIPTION
COLOR_MODELS_TEMPLATES = {}
# RGB COLOR SPACES
COLOR_MODELS_TEMPLATES["ACES2065-1"] = {
"name": "ACES2065-1",
"section": "RGB Color Spaces",
"ui_group": "rgb",
"description": (
"Used primarily in cinema for exchange of full fidelity images and "
"archiving; not recommended for rendering"
),
"illuminant": "ACES",
"observer": "CIE 1931 2 Degree Standard Observer",
"labels": ["Red", "Green", "Blue"],
"codes": ["R", "G", "B"],
}
COLOR_MODELS_TEMPLATES["ACEScc"] = {
"name": "ACEScc",
"section": "RGB Color Spaces",
"ui_group": "rgb",
"description": (
"Workspace for color correctors, target for ASC-CDL values created " "on-set"
),
"illuminant": "ACES",
"observer": "CIE 1931 2 Degree Standard Observer",
"labels": ["Red", "Green", "Blue"],
"codes": ["R", "G", "B"],
}
COLOR_MODELS_TEMPLATES["ACEScct"] = {
"name": "ACEScct",
"section": "RGB Color Spaces",
"ui_group": "rgb",
"description": (
"Alternative workspace for color correctors, intended to be transient "
"and internal to software or hardware systems; not intended for "
"interchange or archiving"
),
"illuminant": "ACES",
"observer": "CIE 1931 2 Degree Standard Observer",
"labels": ["Red", "Green", "Blue"],
"codes": ["R", "G", "B"],
}
COLOR_MODELS_TEMPLATES["ACEScg"] = {
"name": "ACEScg",
"section": "RGB Color Spaces",
"ui_group": "rgb",
"description": (
"Workspace for painting/compositing applications that don't support "
"ACES2065-1 or ACEScc"
),
"illuminant": "ACES",
"observer": "CIE 1931 2 Degree Standard Observer",
"labels": ["Red", "Green", "Blue"],
"codes": ["R", "G", "B"],
}
COLOR_MODELS_TEMPLATES["ACESproxy"] = {
"name": "ACESproxy",
"section": "RGB Color Spaces",
"ui_group": "rgb",
"description": (
"A lightweight encoding for transmission over HD-SDI (or other "
"production transmission schemes), on-set look management. Not "
"intended to be stored or used in production imagery"
),
"illuminant": "ACES",
"observer": "CIE 1931 2 Degree Standard Observer",
"labels": ["Red", "Green", "Blue"],
"codes": ["R", "G", "B"],
}
COLOR_MODELS_TEMPLATES["ARRI Wide Gamut 3"] = {
"name": "ARRI Wide Gamut 3 / LogCv3",
"section": "RGB Color Spaces",
"ui_group": "rgb",
"description": (
"Based on virtual primaries optimized for the encoding of the color "
"data generated by ARRI camera systems, often referred to as LogC3"
),
"illuminant": "D65",
"observer": "CIE 1931 2 Degree Standard Observer",
"labels": ["Red", "Green", "Blue"],
"codes": ["R", "G", "B"],
}
COLOR_MODELS_TEMPLATES["ARRI Wide Gamut 4"] = {
"name": "ARRI Wide Gamut 4 / LogC4",
"section": "RGB Color Spaces",
"ui_group": "rgb",
"description": (
"Sometimes referred to as LogC4, this space provides the encoding "
"used for media from the ARRI ALEXA 35"
),
"illuminant": "D65",
"observer": "CIE 1931 2 Degree Standard Observer",
"labels": ["Red", "Green", "Blue"],
"codes": ["R", "G", "B"],
}
COLOR_MODELS_TEMPLATES["Adobe RGB (1998)"] = {
"name": "A98 RGB",
"section": "RGB Color Spaces",
"ui_group": "rgb",
"description": (
"Originally defined to meet the demands for an RGB working space "
"suited for print production"
),
"illuminant": "D65",
"observer": "CIE 1931 2 Degree Standard Observer",
"labels": ["Red", "Green", "Blue"],
"codes": ["R", "G", "B"],
}
COLOR_MODELS_TEMPLATES["Adobe Wide Gamut RGB"] = {
"name": "Adobe Wide Gamut RGB",
"section": "RGB Color Spaces",
"ui_group": "rgb",
"description": (
"Offers a large gamut by using pure spectral primary colors; covers "
"77.6% of visible colors in CIELAB"
),
"illuminant": "D50",
"observer": "CIE 1931 2 Degree Standard Observer",
"labels": ["Red", "Green", "Blue"],
"codes": ["R", "G", "B"],
}
COLOR_MODELS_TEMPLATES["Apple RGB"] = {
"name": "Apple RGB",
"section": "RGB Color Spaces",
"ui_group": "rgb",
"description": (
"Describes the characteristics of a legacy Apple monitor, used for "
"press workflows before the widespread adoption of color management"
),
"illuminant": "D65",
"observer": "CIE 1931 2 Degree Standard Observer",
"labels": ["Red", "Green", "Blue"],
"codes": ["R", "G", "B"],
}
COLOR_MODELS_TEMPLATES["Best RGB"] = {
"name": "Best RGB",
"section": "RGB Color Spaces",
"ui_group": "rgb",
"description": (
"Almost identical to Don RGB 4 except for a modified red coordinate "
"that helps encompass the reds and magentas in Fujichrome Velvia, "
"and a slight increase in green saturation; created by Don Hutcheson "
"at HutchColor"
),
"illuminant": "D50",
"observer": "CIE 1931 2 Degree Standard Observer",
"labels": ["Red", "Green", "Blue"],
"codes": ["R", "G", "B"],
}
COLOR_MODELS_TEMPLATES["Beta RGB"] = {
"name": "Beta RGB",
"section": "RGB Color Spaces",
"ui_group": "rgb",
"description": (
"Designed by Bruce Lindbloom as an optimized capture, archiving and "
"editing space for high-end digital imaging applications"
),
"illuminant": "D50",
"observer": "CIE 1931 2 Degree Standard Observer",
"labels": ["Red", "Green", "Blue"],
"codes": ["R", "G", "B"],
}
COLOR_MODELS_TEMPLATES["Blackmagic Wide Gamut"] = {
"name": "Blackmagic Wide Gamut",
"section": "RGB Color Spaces",
"ui_group": "rgb",
"description": (
"A custom non-linear color space created by Blackmagic Design to "
"preserve maximum color data and dynamic range"
),
"illuminant": "Blackmagic Wide Gamut",
"observer": "CIE 1931 2 Degree Standard Observer",
"labels": ["Red", "Green", "Blue"],
"codes": ["R", "G", "B"],
}
COLOR_MODELS_TEMPLATES["CIE RGB"] = {
"name": "CIE RGB",
"section": "CIE Fundamentals",
"ui_group": "cie",
"description": (
"Created by the CIE in 1931, leveraging the results of a series of "
"experiments done in the late 1920s"
),
"illuminant": "E",
"observer": "CIE 1931 2 Degree Standard Observer",
"labels": ["Red", "Green", "Blue"],
"codes": ["R", "G", "B"],
}
COLOR_MODELS_TEMPLATES["Cinema Gamut"] = {
"name": "Canon Cinema Gamut",
"section": "RGB Color Spaces",
"ui_group": "rgb",
"description": (
"Cinema Gamut is a set of primaries specified by Canon, typically "
"paired with the Canon Log 2 or Canon Log 3 curve"
),
"illuminant": "D65",
"observer": "CIE 1931 2 Degree Standard Observer",
"labels": ["Red", "Green", "Blue"],
"codes": ["R", "G", "B"],
}
COLOR_MODELS_TEMPLATES["ColorMatch RGB"] = {
"name": "ColorMatch RGB",
"section": "RGB Color Spaces",
"ui_group": "rgb",
"description": (
"A legacy space created by Radius to work with their PressView " "displays"
),
"illuminant": "D50",
"observer": "CIE 1931 2 Degree Standard Observer",
"labels": ["Red", "Green", "Blue"],
"codes": ["R", "G", "B"],
}
COLOR_MODELS_TEMPLATES["DCDM XYZ"] = {
"name": "DCDM XYZ",
"section": "RGB Color Spaces",
"ui_group": "rgb",
"description": (
"Digital Cinema Distribution Master [DCDM] was devised by Digital "
"Cinema Initiatives, LLC (DCI) for the purpose of exchanging content "
"to encoding systems, as well as to the Digital Cinema playback "
"system"
),
"illuminant": "E",
"observer": "CIE 1931 2 Degree Standard Observer",
"labels": ["Red", "Green", "Blue"],
"codes": ["R", "G", "B"],
}
COLOR_MODELS_TEMPLATES["DCI-P3"] = {
"name": "DCI-P3",
"section": "RGB Color Spaces",
"ui_group": "rgb",
"description": (
"First defined as part of the Digital Cinema Initiative in 2005 for "
"digital motion picture distribution"
),
"illuminant": "DCI-P3",
"observer": "CIE 1931 2 Degree Standard Observer",
"labels": ["Red", "Green", "Blue"],
"codes": ["R", "G", "B"],
}
COLOR_MODELS_TEMPLATES["DCI-P3-P"] = {
"name": "DCI-P3+",
"section": "RGB Color Spaces",
"ui_group": "rgb",
"description": "An expanded gamut version of DCI-P3",
"illuminant": "DCI-P3",
"observer": "CIE 1931 2 Degree Standard Observer",
"labels": ["Red", "Green", "Blue"],
"codes": ["R", "G", "B"],
}
COLOR_MODELS_TEMPLATES["DJI D-Gamut"] = {
"name": "DJI D-Gamut",
"section": "RGB Color Spaces",
"ui_group": "rgb",
"description": (
"Designed to encompass the capabilities of the DJI Zenmuse sensor, "
"while simultaneously providing an ideal starting point for color "
"grading"
),
"illuminant": "D65",
"observer": "CIE 1931 2 Degree Standard Observer",
"labels": ["Red", "Green", "Blue"],
"codes": ["R", "G", "B"],
}
COLOR_MODELS_TEMPLATES["DRAGONcolor"] = {
"name": "DRAGONcolor",
"section": "RGB Color Spaces",
"ui_group": "rgb",
"description": (
"Acts as a color engine that converts between the camera's native "
"gamut and monitor RGB, which is assumed to be close to Rec. 709, "
"from RED"
),
"illuminant": "D65",
"observer": "CIE 1931 2 Degree Standard Observer",
"labels": ["Red", "Green", "Blue"],
"codes": ["R", "G", "B"],
}
COLOR_MODELS_TEMPLATES["DRAGONcolor2"] = {
"name": "DRAGONcolor2",
"section": "RGB Color Spaces",
"ui_group": "rgb",
"description": "A RED color space evolution of DRAGONcolor",
"illuminant": "D65",
"observer": "CIE 1931 2 Degree Standard Observer",
"labels": ["Red", "Green", "Blue"],
"codes": ["R", "G", "B"],
}
COLOR_MODELS_TEMPLATES["DaVinci Wide Gamut"] = {
"name": "DaVinci Wide Gamut",
"section": "RGB Color Spaces",
"ui_group": "rgb",
"description": (
"DWG is designed to accommodate the vast majority of colors that can "
"be captured using the latest cameras and capture devices; it "
"facilitates the storage and manipulation of intermediate image data "
"in modern production pipelines"
),
"illuminant": "D65",
"observer": "CIE 1931 2 Degree Standard Observer",
"labels": ["Red", "Green", "Blue"],
"codes": ["R", "G", "B"],
}
COLOR_MODELS_TEMPLATES["Display P3"] = {
"name": "Display P3",
"section": "RGB Color Spaces",
"ui_group": "rgb",
"description": (
"Display P3 is a variant of the DCI-P3 color space, advanced by "
"Apple to better characterize the wider gamut possible on "
"contemporary devices"
),
"illuminant": "D65",
"observer": "CIE 1931 2 Degree Standard Observer",
"labels": ["Red", "Green", "Blue"],
"codes": ["R", "G", "B"],
}
COLOR_MODELS_TEMPLATES["Don RGB 4"] = {
"name": "Don RGB 4",
"section": "RGB Color Spaces",
"ui_group": "rgb",
"description": (
"Wide gamut workspace with a 2.2 gamma. Captures the Ektachrome "
"color gamut with virtually no clipping, from Don Hutcheson at "
"HutchColor"
),
"illuminant": "D50",
"observer": "CIE 1931 2 Degree Standard Observer",
"labels": ["Red", "Green", "Blue"],
"codes": ["R", "G", "B"],
}
COLOR_MODELS_TEMPLATES["EBU Tech. 3213-E"] = {
"name": "EBU Tech. 3213-E",
"section": "RGB Color Spaces",
"ui_group": "rgb",
"description": (
"In 1975, the European Broadcasting Union recommended this space for "
"studio monitors for broadcasting organizations using PAL or SECAM "
"signals"
),
"illuminant": "D65",
"observer": "CIE 1931 2 Degree Standard Observer",
"labels": ["Red", "Green", "Blue"],
"codes": ["R", "G", "B"],
}
COLOR_MODELS_TEMPLATES["ECI RGB v2"] = {
"name": "ECI RGB v2",
"section": "RGB Color Spaces",
"ui_group": "rgb",
"description": (
"The Metamorfoze Preservation Imaging Guidelines promotes use of "
"this European Color Initiative space - and requires it at their "
"strictest level of compliance"
),
"illuminant": "D50",
"observer": "CIE 1931 2 Degree Standard Observer",
"labels": ["Red", "Green", "Blue"],
"codes": ["R", "G", "B"],
}
COLOR_MODELS_TEMPLATES["ERIMM RGB"] = {
"name": "ERIMM RGB",
"section": "RGB Color Spaces",
"ui_group": "rgb",
"description": (
"Extended Reference Input Medium Metric, intended to encode extended "
"dynamic range scene-referred images"
),
"illuminant": "D50",
"observer": "CIE 1931 2 Degree Standard Observer",
"labels": ["Red", "Green", "Blue"],
"codes": ["R", "G", "B"],
}
COLOR_MODELS_TEMPLATES["Ekta Space PS 5"] = {
"name": "Ekta Space PS 5",
"section": "RGB Color Spaces",
"ui_group": "rgb",
"description": (
"Developed by Joseph Holmes for high quality storage of image data "
"from scans of transparencies"
),
"illuminant": "D50",
"observer": "CIE 1931 2 Degree Standard Observer",
"labels": ["Red", "Green", "Blue"],
"codes": ["R", "G", "B"],
}
COLOR_MODELS_TEMPLATES["F-Gamut"] = {
"name": "Fujifilm F-Log",
"section": "RGB Color Spaces",
"ui_group": "rgb",
"description": "The gamut of Fujifilm's F-log space complies with ITU-R BT.2020",
"illuminant": "D65",
"observer": "CIE 1931 2 Degree Standard Observer",
"labels": ["Red", "Green", "Blue"],
"codes": ["R", "G", "B"],
}
COLOR_MODELS_TEMPLATES["FilmLight E-Gamut"] = {
"name": "FilmLight T-Log / E-Gamut",
"section": "RGB Color Spaces",
"ui_group": "rgb",
"description": (
"The gamut of this working space is designed to cover most colors "
"produced by contemporary digital cinema cameras"
),
"illuminant": "D65",
"observer": "CIE 1931 2 Degree Standard Observer",
"labels": ["Red", "Green", "Blue"],
"codes": ["R", "G", "B"],
}
COLOR_MODELS_TEMPLATES["ITU-R BT.2020"] = {
"name": "ITU-R BT.2020",
"section": "RGB Color Spaces",
"ui_group": "rgb",
"description": (
"Often referred to simply as Rec.2020, this space provides parameter "
"values for ultra-high definition television (UHDTV)"
),
"illuminant": "D65",
"observer": "CIE 1931 2 Degree Standard Observer",
"labels": ["Red", "Green", "Blue"],
"codes": ["R", "G", "B"],
}
COLOR_MODELS_TEMPLATES["ITU-R BT.470 - 525"] = {
"name": "ITU-R BT.470 - 525",
"section": "RGB Color Spaces",
"ui_group": "rgb",
"description": (
"ITU-R BT.470 - 525 was recommended to define a standard for "
"conventional television signals"
),
"illuminant": "C",
"observer": "CIE 1931 2 Degree Standard Observer",
"labels": ["Red", "Green", "Blue"],
"codes": ["R", "G", "B"],
}
COLOR_MODELS_TEMPLATES["ITU-R BT.470 - 625"] = {
"name": "ITU-R BT.470 - 625",
"section": "RGB Color Spaces",
"ui_group": "rgb",
"description": (
"ITU-R BT.470 - 525 was recommended to define a standard for "
"conventional television signals"
),
"illuminant": "D65",
"observer": "CIE 1931 2 Degree Standard Observer",
"labels": ["Red", "Green", "Blue"],
"codes": ["R", "G", "B"],
}
COLOR_MODELS_TEMPLATES["ITU-R BT.709"] = {
"name": "ITU-R BT.709",
"section": "RGB Color Spaces",
"ui_group": "rgb",
"description": (
"Standard developed by the ITU for image encoding and signal "
"characteristics of high-definition television"
),
"illuminant": "D65",
"observer": "CIE 1931 2 Degree Standard Observer",
"labels": ["Red", "Green", "Blue"],
"codes": ["R", "G", "B"],
}
COLOR_MODELS_TEMPLATES["ITU-T H.273 - 22 Unspecified"] = {
"name": "ITU-T H.273 - 22 Unspecified",
"section": "RGB Color Spaces",
"ui_group": "rgb",
"description": (
"Recommendation ITU-T H.273 row 22 color space as given in Table 2 - "
'"Interpretation of colour primaries (ColourPrimaries)" value'
),
"illuminant": "D65",
"observer": "CIE 1931 2 Degree Standard Observer",
"labels": ["Red", "Green", "Blue"],
"codes": ["R", "G", "B"],
}
COLOR_MODELS_TEMPLATES["ITU-T H.273 - Generic Film"] = {
"name": "ITU-T H.273 - Generic Film",
"section": "RGB Color Spaces",
"ui_group": "rgb",
"description": (
"Recommendation ITU-T H.273 Generic Film (color filters using "
"illuminant C) color space"
),
"illuminant": "C",
"observer": "CIE 1931 2 Degree Standard Observer",
"labels": ["Red", "Green", "Blue"],
"codes": ["R", "G", "B"],
}
COLOR_MODELS_TEMPLATES["Max RGB"] = {
"name": "Max RGB",
"section": "RGB Color Spaces",
"ui_group": "rgb",
"description": (
"A wide gamut color space with colors outside the xyY limits, "
"created by Don Hutcheson at HutchColor"
),
"illuminant": "D50",
"observer": "CIE 1931 2 Degree Standard Observer",
"labels": ["Red", "Green", "Blue"],
"codes": ["R", "G", "B"],
}
COLOR_MODELS_TEMPLATES["N-Gamut"] = {
"name": "N-Gamut",
"section": "RGB Color Spaces",
"ui_group": "rgb",
"description": "",
"illuminant": "D65",
"observer": "CIE 1931 2 Degree Standard Observer",
"labels": ["Red", "Green", "Blue"],
"codes": ["R", "G", "B"],
}
COLOR_MODELS_TEMPLATES["NTSC (1953)"] = {
"name": "NTSC (1953)",
"section": "RGB Color Spaces",
"ui_group": "rgb",
"description": (
"The original 1953 color NTSC specification, still part of the "
"United States Code of Federal Regulations"
),
"illuminant": "C",
"observer": "CIE 1931 2 Degree Standard Observer",
"labels": ["Red", "Green", "Blue"],
"codes": ["R", "G", "B"],
}
COLOR_MODELS_TEMPLATES["NTSC (1987)"] = {
"name": "NTSC (1987)",
"section": "RGB Color Spaces",
"ui_group": "rgb",
"description": (
"In 1987, SMPTE adopted the SMPTE C (Conrac) phosphors for general "
"use, defining this space"
),
"illuminant": "D65",
"observer": "CIE 1931 2 Degree Standard Observer",
"labels": ["Red", "Green", "Blue"],
"codes": ["R", "G", "B"],
}
COLOR_MODELS_TEMPLATES["P3-D65"] = {
"name": "P3-D65",
"section": "RGB Color Spaces",
"ui_group": "rgb",
"description": "",
"illuminant": "D65",
"observer": "CIE 1931 2 Degree Standard Observer",
"labels": ["Red", "Green", "Blue"],
"codes": ["R", "G", "B"],
}
COLOR_MODELS_TEMPLATES["Pal/Secam"] = {
"name": "PAL/SECAM",