Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Colour - Corresponding Chromaticities Prediction
from pprint import pprint
pr = corresponding_chromaticities_prediction_vonkries(2, 'Bradford')
pr = [(p.uvp_m, p.uvp_p) for p in pr]
pprint(pr) # doctest: +ELLIPSIS
[((0.20..., 0.48...), (0.2082014..., 0.4722922...)),
((0.44..., 0.51...), (0.4489102..., 0.5071602...)),
((0.26..., 0.50...), (0.2643545..., 0.4959631...)),
((0.32..., 0.54...), (0.3348730..., 0.5471220...)),
((0.31..., 0.53...), (0.3248758..., 0.5390589...)),
((0.26..., 0.55...), (0.2733105..., 0.5555028...)),
((0.22..., 0.53...), (0.2271480..., 0.5331317...)),
((0.13..., 0.53...), (0.1442730..., 0.5226804...)),
((0.14..., 0.47...), (0.1498745..., 0.4550785...)),
((0.16..., 0.33...), (0.1564975..., 0.3148795...)),
((0.17..., 0.43...), (0.1760593..., 0.4103772...)),
((0.24..., 0.34...), (0.2259805..., 0.3465291...))]
from pprint import pprint
pr = corresponding_chromaticities_prediction_cie1994(2)
pr = [(p.uvp_m, p.uvp_p) for p in pr]
pprint(pr) # doctest: +ELLIPSIS
[((0.20..., 0.48...), (0.2133909..., 0.4939794...)),
((0.44..., 0.51...), (0.4450345..., 0.5120939...)),
((0.26..., 0.50...), (0.2693262..., 0.5083212...)),
((0.32..., 0.54...), (0.3308593..., 0.5443940...)),
((0.31..., 0.53...), (0.3225195..., 0.5377826...)),
((0.26..., 0.55...), (0.2709737..., 0.5513666...)),
((0.22..., 0.53...), (0.2280786..., 0.5351592...)),
((0.13..., 0.53...), (0.1439436..., 0.5303576...)),
((0.14..., 0.47...), (0.1500743..., 0.4842895...)),
((0.16..., 0.33...), (0.1559955..., 0.3772379...)),
((0.17..., 0.43...), (0.1806318..., 0.4518475...)),
((0.24..., 0.34...), (0.2454445..., 0.4018004...))]
from pprint import pprint
pr = corresponding_chromaticities_prediction_CMCCAT2000(2)
pr = [(p.uvp_m, p.uvp_p) for p in pr]
pprint(pr) # doctest: +ELLIPSIS
[((0.20..., 0.48...), (0.2083210..., 0.4727168...)),
((0.44..., 0.51...), (0.4459270..., 0.5077735...)),
((0.26..., 0.50...), (0.2640262..., 0.4955361...)),
((0.32..., 0.54...), (0.3316884..., 0.5431580...)),
((0.31..., 0.53...), (0.3222624..., 0.5357624...)),
((0.26..., 0.55...), (0.2710705..., 0.5501997...)),
((0.22..., 0.53...), (0.2261826..., 0.5294740...)),
((0.13..., 0.53...), (0.1439693..., 0.5190984...)),
((0.14..., 0.47...), (0.1494835..., 0.4556760...)),
((0.16..., 0.33...), (0.1563172..., 0.3164151...)),
((0.17..., 0.43...), (0.1763199..., 0.4127589...)),
((0.24..., 0.34...), (0.2287638..., 0.3499324...))]
from pprint import pprint
pr = corresponding_chromaticities_prediction_fairchild1990(2)
pr = [(p.uvp_m, p.uvp_p) for p in pr]
pprint(pr) # doctest: +ELLIPSIS
[((0.20..., 0.48...), (0.2089528..., 0.4724034...)),
((0.44..., 0.51...), (0.4375652..., 0.5121030...)),
((0.26..., 0.50...), (0.2621362..., 0.4972538...)),
((0.32..., 0.54...), (0.3235312..., 0.5475665...)),
((0.31..., 0.53...), (0.3151390..., 0.5398333...)),
((0.26..., 0.55...), (0.2634745..., 0.5544335...)),
((0.22..., 0.53...), (0.2211595..., 0.5324470...)),
((0.13..., 0.53...), (0.1396949..., 0.5207234...)),
((0.14..., 0.47...), (0.1512288..., 0.4533041...)),
((0.16..., 0.33...), (0.1715691..., 0.3026264...)),
((0.17..., 0.43...), (0.1825792..., 0.4077892...)),
((0.24..., 0.34...), (0.2418904..., 0.3413401...))]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.