colour.corresponding.prediction Module

Corresponding Chromaticities Prediction

Defines objects to compute corresponding chromaticities prediction.

References

[1]Breneman, E. J. (1987). Corresponding chromaticities for different states of adaptation to complex visual fields. JOSA A, 4(6). Retrieved from http://www.opticsinfobase.org/josaa/fulltext.cfm?uri=josaa-4-6-1115&id=2783
class colour.corresponding.prediction.CorrespondingChromaticitiesPrediction[source]

Bases: colour.corresponding.prediction.CorrespondingChromaticitiesPrediction

Defines a chromatic adaptation model prediction.

Parameters:
  • name (unicode) – Test colour name.
  • uvp_t (numeric) – Chromaticity coordinates \(uv_t^p\) of test colour.
  • uvp_m (array_like, (2,)) – Chromaticity coordinates \(uv_m^p\) of matching colour.
  • uvp_p (array_like, (2,)) – Chromaticity coordinates \(uv_p^p\) of predicted colour.
colour.corresponding.prediction.corresponding_chromaticities_prediction_VonKries(experiment=1, transform=u'CAT02')[source]

Returns the corresponding chromaticities prediction for Von Kries chromatic adaptation model using given transform.

Parameters:
  • experiment (integer, optional) – {1, 2, 3, 4, 6, 8, 9, 11, 12} Breneman (1987) experiment number.
  • transform (unicode, optional) – {‘CAT02’, ‘XYZ Scaling’, ‘Von Kries’, ‘Bradford’, ‘Sharp’, ‘Fairchild, ‘CMCCAT97’, ‘CMCCAT2000’, ‘CAT02_BRILL_CAT’, ‘Bianco’, ‘Bianco PC’}, Chromatic adaptation transform.
Returns:

Corresponding chromaticities prediction.

Return type:

tuple

Examples

>>> from pprint import pprint
>>> pr = corresponding_chromaticities_prediction_VonKries(2, 'Bradford')
>>> pr = [(p.uvp_m, p.uvp_p) for p in pr]
>>> pprint(pr)  
[((0.207, 0.486), (0.20820148430638033, 0.47229226819364528)),
 ((0.449, 0.511), (0.44891022948064191, 0.50716028901449561)),
 ((0.263, 0.505), (0.26435459360846608, 0.49596314494922683)),
 ((0.322, 0.545), (0.33487309037107632, 0.54712207251983425)),
 ((0.316, 0.537), (0.32487581236911361, 0.53905899356457776)),
 ((0.265, 0.553), (0.27331050571632376, 0.55550280647813977)),
 ((0.221, 0.538), (0.22714800102072819, 0.53313179748041983)),
 ((0.135, 0.532), (0.14427303768336433, 0.52268044497913713)),
 ((0.145, 0.472), (0.14987451889726533, 0.45507852741116867)),
 ((0.163, 0.331), (0.15649757464732098, 0.31487959772753954)),
 ((0.176, 0.431), (0.17605936460371163, 0.41037722722471409)),
 ((0.244, 0.349), (0.22598059059292835, 0.34652914678030416))]
colour.corresponding.prediction.corresponding_chromaticities_prediction_CIE1994(experiment=1, **kwargs)[source]

Returns the corresponding chromaticities prediction for CIE 1994 chromatic adaptation model.

Parameters:
  • experiment (integer, optional) – {1, 2, 3, 4, 6, 8, 9, 11, 12} Breneman (1987) experiment number.
  • **kwargs (**) – Keywords arguments.
Returns:

Corresponding chromaticities prediction.

Return type:

tuple

Examples

>>> from pprint import pprint
>>> pr = corresponding_chromaticities_prediction_CIE1994(2)
>>> pr = [(p.uvp_m, p.uvp_p) for p in pr]
>>> pprint(pr)  
[((0.207, 0.486), (0.21339093279517196, 0.49397945742298016)),
 ((0.449, 0.511), (0.4450345313098153, 0.5120939085633327)),
 ((0.263, 0.505), (0.26932620724691858, 0.50832124608390727)),
 ((0.322, 0.545), (0.33085939370840811, 0.54439408389253441)),
 ((0.316, 0.537), (0.3225195584183046, 0.53778269440789594)),
 ((0.265, 0.553), (0.2709737181087471, 0.5513666373694861)),
 ((0.221, 0.538), (0.22807869730753863, 0.53515923458385406)),
 ((0.135, 0.532), (0.14394366662060523, 0.53035769204585748)),
 ((0.145, 0.472), (0.15007438031976222, 0.48428958620888679)),
 ((0.163, 0.331), (0.15599555781959967, 0.37723798698131394)),
 ((0.176, 0.431), (0.18063180902005657, 0.45184759430042898)),
 ((0.244, 0.349), (0.24544456656434688, 0.40180048388092021))]
colour.corresponding.prediction.corresponding_chromaticities_prediction_CMCCAT2000(experiment=1, **kwargs)[source]

Returns the corresponding chromaticities prediction for CMCCAT2000 chromatic adaptation model.

Parameters:
  • experiment (integer, optional) – {1, 2, 3, 4, 6, 8, 9, 11, 12} Breneman (1987) experiment number.
  • **kwargs (**) – Keywords arguments.
Returns:

Corresponding chromaticities prediction.

Return type:

tuple

Examples

>>> from pprint import pprint
>>> pr = corresponding_chromaticities_prediction_CMCCAT2000(2)
>>> pr = [(p.uvp_m, p.uvp_p) for p in pr]
>>> pprint(pr)  
[((0.207, 0.486), (0.20832101929657834, 0.47271680534693694)),
 ((0.449, 0.511), (0.44592707020371486, 0.50777351504395707)),
 ((0.263, 0.505), (0.26402624712986333, 0.4955361681706304)),
 ((0.322, 0.545), (0.33168840090358015, 0.54315801981008516)),
 ((0.316, 0.537), (0.32226245779851387, 0.53576245377085929)),
 ((0.265, 0.553), (0.27107058097430181, 0.5501997842556422)),
 ((0.221, 0.538), (0.22618269421847523, 0.52947407170848704)),
 ((0.135, 0.532), (0.14396930475660724, 0.51909841743126817)),
 ((0.145, 0.472), (0.14948357434418671, 0.45567605010224305)),
 ((0.163, 0.331), (0.15631720730028753, 0.31641514460738623)),
 ((0.176, 0.431), (0.17631993066748047, 0.41275893424542082)),
 ((0.244, 0.349), (0.22876382018951744, 0.3499324084859976))]
colour.corresponding.prediction.corresponding_chromaticities_prediction_Fairchild1990(experiment=1, **kwargs)[source]

Returns the corresponding chromaticities prediction for Fairchild (1990) chromatic adaptation model.

Parameters:
  • experiment (integer, optional) – {1, 2, 3, 4, 6, 8, 9, 11, 12} Breneman (1987) experiment number.
  • **kwargs (**) – Keywords arguments.
Returns:

Corresponding chromaticities prediction.

Return type:

tuple

Examples

>>> from pprint import pprint
>>> pr = corresponding_chromaticities_prediction_Fairchild1990(2)
>>> pr = [(p.uvp_m, p.uvp_p) for p in pr]
>>> pprint(pr)  
[((0.207, 0.486), (0.2089528677990308, 0.47240345174230519)),
 ((0.449, 0.511), (0.43756528098582792, 0.51210303139041924)),
 ((0.263, 0.505), (0.26213623665658092, 0.49725385033264224)),
 ((0.322, 0.545), (0.3235312762825191, 0.54756652922585702)),
 ((0.316, 0.537), (0.3151390992740366, 0.53983332031574016)),
 ((0.265, 0.553), (0.26347459238415272, 0.55443357809543037)),
 ((0.221, 0.538), (0.22115956537655593, 0.53244703908294599)),
 ((0.135, 0.532), (0.13969494108553854, 0.52072342107668024)),
 ((0.145, 0.472), (0.1512288710743511, 0.45330415352961834)),
 ((0.163, 0.331), (0.17156913711903982, 0.30262647410866889)),
 ((0.176, 0.431), (0.18257922398137369, 0.40778921192793854)),
 ((0.244, 0.349), (0.24189049501108895, 0.34134012046930529))]
colour.corresponding.prediction.CORRESPONDING_CHROMATICITIES_PREDICTION_MODELS = CaseInsensitiveMapping({u'vonkries': <function corresponding_chromaticities_prediction_VonKries at 0x2b436dc28c08>, u'Von Kries': <function corresponding_chromaticities_prediction_VonKries at 0x2b436dc28c08>, u'CMCCAT2000': <function corresponding_chromaticities_prediction_CMCCAT2000 at 0x2b436dc35c08>, u'CIE 1994': <function corresponding_chromaticities_prediction_CIE1994 at 0x2b436dc35b90>, u'Fairchild 1990': <function corresponding_chromaticities_prediction_Fairchild1990 at 0x2b436dc35c80>})

Aggregated corresponding chromaticities prediction models.

CORRESPONDING_CHROMATICITIES_PREDICTION_MODELS : CaseInsensitiveMapping
{‘Von Kries’, ‘CIE 1994’, ‘CMCCAT2000’, ‘Fairchild 1990’}

Aliases:

  • ‘vonkries’: ‘Von Kries’