Releases: colour-science/colour
Colour 0.3.13
Colour 0.3.13 - Alpha Milestone
This is mainly a maintenance release addressing regressions introduced in CIECAM02 and CAM16 implementations by Colour 0.3.12.
Features
colour.quality
- Add
colour.uv_to_Luv
andcolour.uv_to_UCS
conversion definitions. (@KelSolaar)
colour.quality
- Implement support for colour quality scale computation using NIST CQS 9.0 method based on the latest available spreadsheet from Yoshi Ohno. The results are typically very close to NIST CQS 7.4 method. The
colour.COLOUR_QUALITY_SCALE_METHODS
attribute was added to enumerate the available methods. (@KelSolaar)
colour.utilities
- Implement
colour.utilities.multiprocessing_pool
context manager to support domain-range scale propagation when multiprocessing code on Windows. (@KelSolaar)
Fixes
colour.appearance
- Fix regressions introduced to CIECAM02 and CAM16 implementations by Colour 0.3.12. (@nschloe, @KelSolaar)
Changes
colour.colorimetry
colour.whiteness
: (@KelSolaar)- Signature:
whiteness(XYZ, XYZ_0, method='CIE 2004', **kwargs)
- Signature:
colour.notation
- The
colour.notation.munsell_specification_to_xyY
,colour.notation.xyY_to_munsell_specification
,colour.munsell_colour_to_xyY
andcolour.xyY_to_munsell_colour
definitions have been updated to support n-dimensional arrays. (@KelSolaar)
colour.plotting
colour.plotting.plot_single_sd
: (@KelSolaar)- Signature:
plot_single_sd(sd, cmfs='CIE 1931 2 Degree Standard Observer', out_of_gamut_clipping=True, modulate_colours_with_sd_amplitude=False, equalize_sd_amplitude=False, **kwargs)
- Signature:
colour.plotting.plot_single_sd_colour_quality_scale_bars
: (@KelSolaar)- Signature:
plot_single_sd_colour_quality_scale_bars(sd, method='NIST CQS 7.4', **kwargs)
- Signature:
colour.plotting.plot_multi_sds_colour_quality_scales_bars
: (@KelSolaar)- Signature:
plot_multi_sds_colour_quality_scales_bars(sds, method='NIST CQS 7.4', **kwargs)
- Signature:
colour.quality
colour.colour_quality_scale
: (@KelSolaar)- Signature:
colour_quality_scale(sd_test, additional_data=False, method='NIST CQS 9.0')
- Signature:
colour.temperature
- The
colour.cct.uv_to_CCT_Ohno2013
,colour.cct.CCT_to_uv_Ohno2013
,colour.cct.uv_to_CCT_Robertson1968
,colour.cct.CCT_to_uv_Robertson1968
,colour.CCT_to_uv
andcolour.uv_to_CCT
definitions have been updated to support n-dimensional arrays. TheD_uv
argument is now required to be passed horizontally stacked with theCCT
argument. (@KelSolaar)
Colour 0.3.12
>>> CCT, D_uv = 6503.49254150, 0.00320598
>>> colour.CCT_to_uv(CCT, D_uv=D_uv)
>>> colour.temperature.CCT_to_uv_Ohno2013(CCT, D_uv)
Colour 0.3.13
>>> CCT_D_uv = [6503.49254150, 0.00320598]
>>> colour.CCT_to_uv(CCT_D_uv, cmfs=cmfs)
>>> colour.temperature.CCT_to_uv_Ohno2013(CCT_D_uv)
colour.temperature.CCT_to_uv_Ohno2013
: (@KelSolaar)- Signature: `CCT_to_uv_Ohno2013(CCT_D_uv, cmfs=STANDARD_OBSERVERS_CMFS['CIE 1931 2 Degree Standard Observer'])
colour.temperature.CCT_to_uv_Robertson1968
: (@KelSolaar)- Signature: `CCT_to_uv_Robertson1968(CCT_D_uv)
colour.volume
colour.RGB_colourspace_volume_MonteCarlo
: (@KelSolaar)- Signature:
RGB_colourspace_volume_MonteCarlo(colourspace, samples=10e6, limits=np.array([[0, 100], [-150, 150], [-150, 150]], dtype=np.float), illuminant_Lab=ILLUMINANTS['CIE 1931 2 Degree Standard Observer']['D65'], chromatic_adaptation_method='CAT02', random_generator=random_triplet_generator, random_state=None)
- Signature:
Colour 0.3.12
Colour 0.3.12 - Alpha Milestone
Another important 700+ commits step on The Road to Stable!
This release was severely delayed because of the involvement of some of us in the authoring of the upcoming Cinematic Color update. Colouris used to produce an important amount of figures in this work and it was important to improve the plotting capabilities.
Plotting Package Overhaul
The colour.plotting
sub-package was extensively overhauled. It is less opinionated and more flexible. The plotting definitions have been renamed and start with plot_, they return the figure
and axes
instances. The Cinematic Color 2 - Figures Google Colab document is a good example highlighting the greatest and latest changes and capabilities.
Default to CIE Standard Illuminant D Series D65
The CIE Standard Illuminant D Series D65 was made the default illuminant in places where CIE Illuminant D Series D50 was used as the default argument.
A few reasons for this choice, first D65 is a Standard CIE illuminant along with A, second Colour is used mainly in computer graphics thus it makes sense to adopt D65 where it is ubiquitous, and, finally, it brings consistency across the API while preventing some errors from users with less expertise in the field.
Domain-Range Scales
The colour science field adopts many input domains and output ranges. Those are challenging when designing an API. Picking a unique domain-range scale over an other has caused surprise and grief to practitioners of different industries in other software.
Colour has always used the domain-range scales of the publications it implements while recognizing the need for a unique domain-range scale. The API can be switched to use a soft normalised scale to domain-range [0, 1] using the colour.set_domain_range_scale
definition and the colour.domain_range_scale
context manager. More information about Domain-Range Scales is available in the documentation.
Look-Up-Tables IO
With this release, Colour is now able to read and write Look-Up-Tables (LUTs) of various dimensions, i.e. LUT1D, LUT3x1D, LUT3D and LUT Sequences.
Polynomial Colour Correction
Polynomial colour correction was added, it is a useful tool to correct for non-linearity of data, for example, film stocks colours. With great powers come great responsibilities and polynomials will eventually alter significantly
colour data that is not present in the original fitting set.
Windows and macOs CI
Support for Azure Pipelines was added by @MichaelMauderer giving for the first time continuous integration on macOS and Windows, a few Windows related issues were addressed.
Contrast Sensitivity Function
The Barten (1999) contrast sensitivity function was implemented and can be used to estimate ideal code values as a function of viewing conditions.
Miscellaneous
The power word and abbreviation has been removed from all the spectral distribution related objects. Likewise, the word spectral has been removed from all the related objects and replaced with sd.
The built documentation has been removed from the PyPi package to reduce the size of the downloads.
Features
colour.algebra
-
Implement support for safe and symmetrical power with
colour.algebra.spow
definition and the relatedcolour.algebra.is_spow_enabled
,colour.algebra.set_spow_enable
andcolour.algebra.spow_enable
definitions. (@KelSolaar) -
Implement
colour.NearestNeighbourInterpolator
interpolator class. (@KelSolaar) -
Implement support for various ellipse related geometrical definitions: (@KelSolaar)
colour.algebra.ellipse_coefficients_general_form
colour.algebra.ellipse_coefficients_canonical_form
colour.algebra.point_at_angle_on_ellipse
colour.algebra.ellipse_fitting_Halir1998
colour.algebra.ELLIPSE_FITTING_METHODS
colour.algebra.ellipse_fitting
colour.characterisation
- Implement support for Cheung et al. (2004), Finlayson et al. (2015) and Vandermonde polynomial colour correction with
colour.polynomial_expansion
,colour.colour_correction_matrix
, andcolour.colour_correction
definitions wrapping the following objects: (@KelSolaar)- Cheung et al. (2004) :
colour.characterisation.augmented_matrix_Cheung2004
,
colour.characterisation.colour_correction_matrix_Cheung2004
and
colour.characterisation.colour_correction_Cheung2004
definitions. - Finlayson et al. (2015) :
colour.characterisation.augmented_matrix_Finlayson2015
,
colour.characterisation.colour_correction_matrix_Finlayson2015
and
colour.characterisation.colour_correction_Finlayson2015
definitions. - Vandermonde :
colour.characterisation.augmented_matrix_Vandermonde
,
colour.characterisation.colour_correction_matrix_Vandermonde
and
colour.characterisation.colour_correction_Vandermonde
definitions.
- Cheung et al. (2004) :
- Add X-Rite new ColourChecker data from prior and after November 2014 in
colour.COLOURCHECKERS
attribute and available with the following keys:ColorChecker24 - Before November 2014
ColorChecker24 - After November 2014
colour.blindness
- Implement support for Machado et al. (2009) colour vision deficiency model with
colour.anomalous_trichromacy_cmfs_Machado2009
,colour.anomalous_trichromacy_matrix_Machado2009
andcolour.cvd_matrix_Machado2009
definitions. (@KelSolaar, @MichaelMauderer)
colour.colorimetry
- Implement support for multi-spectral distribution array conversion to CIE XYZ tristimulus values with
colour.multi_sds_to_XYZ
definition. (@KelSolaar)
It ultimately allows conversion of multi-spectral images to RGB, as an example here is the RIT MetaCow converted to sRGB:
- Add
colour.MultiSpectralDistribution.signal_type
property andcolour.MultiSpectralDistribution.to_sds
method. (@KelSolaar) - Implement support for gaussian spectral distributions generation and single and multi LED spectral distributions generation according to Ohno (2005) method with the following objects: (@KelSolaar)
colour.SD_GAUSSIAN_METHODS
colour.sd_gaussian
colour.colorimetry.sd_single_led_Ohno2005
colour.SD_SINGLE_LED_METHODS
colour.sd_single_led
colour.colorimetry.sd_multi_leds_Ohno2005
colour.SD_MULTI_LEDS_METHODS
colour.sd_multi_leds
- Add
colour.colorimetry.daylight_locus_function
definition computing the the Daylight Locus chromaticity coordinatey_D
for given chromaticity coordinatex_D
. (@KelSolaar)
colour.contrast
- Implement support for Barten (1999) contrast sensitivity function (CSF) with
colour.contrast.contrast_sensitivity_function_Barten1999
definition and thecolour.contrast_sensitivity_function
high-level definition wrapper. (@KelSolaar)
Computing the minimum detectable contrast with the assumed conditions for UHDTV applications as given in ITU-R BT.2246-4 Figure 31 and using Barten (1999) method.
colour.difference
- Implement support for DIN99 colour difference formula with
colour.difference.delta_E_DIN99
definition.
(@KelSolaar, @MichaelMauderer)
colour.io
- Implement support for reading and writing 1D, 3x1D and 3D LUTs with the
colour.read_LUT
andcolour.write_LUT
definitions. (@nick-shaw, @KelSolaar)
The following LUT formats are currently available:
- *Cinespace*: `colour.io.read_LUT_Cinespace` and `colour.io.write_LUT_Cinespace` definitions.
- *Iridas*: `colour.io.read_LUT_IridasCube` and `colour.io.write_LUT_IridasCube` definitions.
- *Resolve*: `colour.io.read_LUT_ResolveCube` and `colour.io.write_LUT_ResolveCube` definitions.
- *Sony SPI 1D*: `colour.io.read_LUT_SonySPI1D` and `colour.io.write_LUT_SonySPI1D` definitions.
- *Sony SPI 3D*: `colour.io.read_LUT_SonySPI3D` and `colour.io.write_LUT_SonySPI3D` definitions.
- Implement support for writing image attributes using the
colour.io.ImageAttribute_Specification
class:
(@KelSolaar)
import numpy as np
import colour
compression = colour.io.ImageAttribute_Specification('Compression', 'none')
colour.write_image(np.ones((32, 32, 3)), 'compression_rle.tif')
colour.write_image(np.ones((32, 32, 3)), 'compression_none.tif',
attributes=[compression])
colour.models
- Implement support for Safdar et al. (2017) JzAzBz colourspace with
colour.XYZ_to_JzAzBz
andcolour.JzAzBz_to_XYZ
definitions. (@KelSolaar) - Implement support for YCoCg colour encoding with
colour.RGB_to_YCoCg
andcolour.YCoCg_to_RGB
definitions. (@KelSolaar) - Implement
colour.ENCODING_CCTFS
andcolour.DECODING_CCTFS
attributes andcolour.encoding_cctf
andcolour.decoding_cctf
definitions: they are convenient collections around the following transfer function objects: (@KelSolaar)colour.ENCODING_CCTFS
andcolour.encoding_cctf
:colour.LOG_ENCODING_CURVES
colour.OETFS
colour.EOTFS_REVERSE
colour.DECODING_CCTFS
andcolour.decoding_cctf
:colour.LOG_DECODING_CURVES
colour.EOTFS
colour.OETFS_REVERSE
...
Colour 0.3.11
Colour 0.3.11 - Alpha Milestone
This release is an important milestone on The Road to Stable. The spectral backend has been entirely overhauled and is based on a continuous signal implementation. It is backward incompatible but we think that the ease of use and speed improvements are worth it.
It requires minimal code changes from an usage standpoint compared to previous version, e.g. colour.SpectralPowerDistribution
instantiation now requires spectral data as first argument:
Colour 0.3.11
>>> data = {
... 500: 0.0651,
... 520: 0.0705,
... 540: 0.0772,
... 560: 0.0870,
... 580: 0.1128,
... 600: 0.1360
... }
>>> SpectralPowerDistribution(data)
Colour 0.3.10
>>> data = {
... 500: 0.0651,
... 520: 0.0705,
... 540: 0.0772,
... 560: 0.0870,
... 580: 0.1128,
... 600: 0.1360
... }
>>> SpectralPowerDistribution('Sample', data)
The documentation has been entirely rewritten with an improved presentation and layout, the bibliography and cross-references have been fixed and overall it should be much easier and accessible than the interim automatic version previously used. It still misses a lot of context content but we will be gradually addressing that in future versions.
As part of some import API changes, a deprecation system has been implement so that only key objects are exposed at the colour
top level namespace. The colour.plotting
sub-package is also affected. As a result you might see warnings as such:
>>> import colour
>>> colour.tsplit
/Users/kelsolaar/Documents/Development/colour-science/colour/colour/utilities/verbose.py:141: ColourWarning: "colour.tsplit" object access is deprecated and will change to "colour.utilities.tsplit" in a future release.
warn(*args, **kwargs)
<function tsplit at 0x103152c08>
Please adjust your access accordingly to the warnings and the updated documentation. You can also find the related API changes exposed into the colour.API_CHANGES
and colour.plotting.API_CHANGES
attributes.
We have also started to use Invoke to provide automation in our regular maintenance tasks.
Features
colour.adaptation
- Implement
colour.chromatic_adaptation
definition wrapping the following definitions: (@KelSolaar)colour.adaptation.chromatic_adaptation_CIE1994
colour.adaptation.chromatic_adaptation_CMCCAT2000
colour.adaptation.chromatic_adaptation_Fairchild1990
colour.adaptation.chromatic_adaptation_VonKries
colour.algebra
- Implement
colour.NullInterpolator
class: a call within given tolerances will return existingy
variable values ordefault
if outside tolerances. (@KelSolaar) - Implement
colour.kernel_nearest_neighbour
,colour.kernel_linear
,colour.kernel_sinc
,colour.kernel_lanczos
, andcolour.kernel_cardinal_spline
interpolating kernel definitions for use with the newcolour.KernelInterpolator
class performing interpolation of a 1-D function. (@KelSolaar)
colour.appearance
- Implement support for CAM16 colour appearance model with
colour.XYZ_to_CAM16
andcolour.CAM16_to_XYZ
definitions. (@KelSolaar)
colour.continuous
- Implement
colour.continuous.AbstractContinuousFunction
,colour.continuous.Signal
andcolour.continuous.MultiSignal
classes implementing support for continuous functions/signals representation. (@KelSolaar, @MichaelMauderer)
colour.difference
Implement support for Li et al. (2017) CAM16 based uniform colourspaces colour difference with colour.difference.delta_E_CAM16LCD
, colour.difference.delta_E_CAM16SCD
, and colour.difference.delta_E_CAM16UCS
definitions. (@KelSolaar)
colour.delta_E
wrapper definition has been improved and accepts the following methods: (@KelSolaar)CIE 1976
CIE 1994
CIE 2000
CMC
CAM02-LCD
CAM02-SCD
CAM02-UCS
CAM16-LCD
CAM16-SCD
CAM16-UCS
colour.models
- Implement support for ITU-R BT.2100 transfer functions with the following definitions: (@KelSolaar, @nick-shaw)
colour.models.oetf_BT2100_PQ
colour.models.oetf_reverse_BT2100_PQ
colour.models.eotf_BT2100_PQ
colour.models.eotf_reverse_BT2100_PQ
colour.models.ootf_BT2100_PQ
colour.models.ootf_reverse_BT2100_PQ
colour.models.oetf_BT2100_HLG
colour.models.oetf_reverse_BT2100_HLG
colour.models.eotf_BT2100_HLG
colour.models.eotf_reverse_BT2100_HLG
colour.models.ootf_BT2100_HLG
colour.models.ootf_reverse_BT2100_HLG
- Implement support for SMPTE 240M transfer functions with
colour.models.oetf_SMPTE240M
andcolour.models.eotf_SMPTE240M
definitions. (@KelSolaar) - Implement
colour.oetf_reverse
andcolour.eotf_reverse
definitions andcolour.OETFS_REVERSE
andcolour.EOTFS_REVERSE
attributes defining relevant reverse OETF and EOTF conversions. (@KelSolaar, @nick-shaw, @KevinJW) - Implement
colour.legal_to_full
andcolour.full_to_legal
definitions providing conversions between full range and legal range. (@KelSolaar) - Implement
colour.CV_range
definition returning the Code Value range for given bit depth, range legality and representation. (@nick-shaw) - Implement support for Li et al. (2017) CAM16 based uniform colourspaces with
colour.JMh_CAM16_to_CAM16LCD
,colour.CAM16LCD_to_JMh_CAM16
,colour.JMh_CAM16_to_CAM16SCD
,colour.CAM16SCD_to_JMh_CAM16
,colour.JMh_CAM16_to_CAM16UCS
,CAM16UCS_to_JMh_CAM16
definitions. (@KelSolaar) - Implement
colour.RGB_Colourspace.__str__
andcolour.RGB_Colourspace.__repr__
methods.
(@KelSolaar)
colour.recovery
- Implement
colour.XYZ_to_spectral
definition wrapping the following definitions: (@KelSolaar)colour.recovery.XYZ_to_spectral_Meng2015
colour.recovery.RGB_to_spectral_Smits1999
colour.utilities
- Implement
colour.utilities.closest_indexes
definition that returnsa
array closest element indexes to referenceb
array elements. (@KelSolaar) - Implement
colour..utilities.fill_nan
definition that fills given array NaNs either through linear interpolation or with given constant value. (@KelSolaar) - Implement
colour.utilities.ndarray_write
context manager that sets given array writeable to perform an operation and then read-only. (@KelSolaar) - Implement
colour.utilities.first_item
definition that returns the first item of given iterable. (@KelSolaar)
Fixes
colour.models
colour.models.log_encoding_CanonLog3
andcolour.models.log_decoding_CanonLog3
definitions implementation was slightly incorrect, they have been reimplemented correctly. (@nick-shaw, @KelSolaar)colour.models.log_encoding_SLog2
andcolour.models.log_decoding_SLog2
definitions implementation was incorrect, they have been reimplemented correctly. (@nick-shaw, @KelSolaar)
colour.plotting
colour.plotting.display
definition was raising an exception when attempting to save a figure. (@KelSolaar)
colour.recovery
colour.recovery.XYZ_to_spectral_Meng2015
definition recovered spectral power distribution has been scaled by 100. (@KelSolaar)
colour.temperature
colour.temperature.uv_to_CCT_Ohno2013
definition was incorrectly using parabolic solution. (@brandondube, @KelSolaar)- As a consequence correlated colour temperature computations using Ohno (2013) method are slightly affected:
- CCT: 6507.51282029, 0.00322336 ---> 6507.47380460, 0.00322335
- CQS: 75.3424278440688 ---> 75.342591389578701
- As a consequence correlated colour temperature computations using Ohno (2013) method are slightly affected:
colour.utilities
colour.utilities.is_iterable
definition does not consume consumes the first item of given iterator. (@KelSolaar, @MichaelMauderer)
colour.volume
- MacAdam (1935) Optimal Colour Stimuli data for D65 illuminant taken from Centore (2012) had a reproduction error.
Changes
colour.adaptation
colour.adaptation.chromatic_adaptation_CMCCAT2000
: (@KelSolaar)- Signature:
chromatic_adaptation_CMCCAT2000(XYZ, XYZ_w, XYZ_wr, L_A1, L_A2, surround=CMCCAT2000_VIEWING_CONDITIONS['Average'], direction='Forward')
- Signature:
colour.colorimetry
-
: (@KelSolaar)colour.DEFAULT_WAVELENGTH_DECIMALS
- Remove
-
: (@KelSolaar)colour.SpectralMapping
- Remove
-
colour.SpectralPowerDistribution
: (@KelSolaar)- Signature:
__init__(self, data=None, domain=None, **kwargs)
- Signature:
-
: (@KelSolaar)colour.SpectralPowerDistribution.data
- Remove
-
colour.SpectralPowerDistribution.title
: (@KelSolaar)- Name:
SpectralPowerDistribution.strict_name
- Name:
-
: (@KelSolaar)colour.SpectralPowerDistribution.items
- Remove
-
: (@KelSolaar)colour.SpectralPowerDistribution.__iter__
- Remove
-
: (@KelSolaar)colour.SpectralPowerDistribution.get
- Remove
-
colour.SpectralPowerDistribution.extrapolate
: (@KelSolaar)- Signature:
extrapolate(self, shape, extrapolator=None, extrapolator_args=None)
- Signature:
-
colour.SpectralPowerDistribution.interpolate
: (@KelSolaar)- Signature:
interpolate(self, shape, interpolator=None, interpolator_args=None)
- Signature:
-
colour.SpectralPowerDistribution.align
: (@KelSolaar)- Signature:
align(self, shape, interpolator=None, interpolator_args=None, extrapolator=None, extrapolator_args=None)
- Signature:
-
colour.SpectralPowerDistribution.trim_wavelengths
: (@KelSolaar)- Name:
SpectralPowerDistribution.trim
- Name:
-
: (@KelSolaar)colour.SpectralPowerDistribution.zeros
- Remove
-
colour.SpectralPowerDistribution.clone
: (@KelSolaar)- Name:
SpectralPowerDistribution.copy
- Name:
-
`colo...
Colour 0.3.10
Colour 0.3.10 - Alpha Milestone
Colour is now formatted using Yapf, the current configuration is subject to change but this will help contributors not using PyCharm to use their favourite editor while having the capability to format the contributed code to our Colour standard.
Features
colour.biochemistry
- Implement support for Michaelis–Menten kinetics, a model of enzyme kinetics with
colour.reaction_rate_MichealisMenten
andcolour.substrate_concentration_MichealisMenten
definitions. (@KelSolaar)
colour.colorimetry
- Implement support for yellowness computation with colour.yellowness_ASTMD1925 and colour.yellowness_ASTME313 definitions. (@KelSolaar)
- Implement support for Fairchild and Wyble (2010) lightness computation with colour.lightness_Fairchild2010 definition. (@KelSolaar)
- Implement support for Fairchild and Wyble (2010) luminance computation with colour.luminance_Fairchild2010 definition. (@KelSolaar)
colour.models
- Implement support for ARIB STD-B67 (Hybrid Log-Gamma) EOTF and OETF with
colour.eotf_ARIBSTDB67
andcolour.oetf_ARIBSTDB67
definitions. (@KelSolaar) - Implement support for DICOM - Grayscale Standard Display Function EOTF and OETF with
colour.eotf_DICOMGSDF
andcolour.oetf_DICOMGSDF
definitions. (@KelSolaar) - Implement support for Protune Native colourspace with
colour.PROTUNE_NATIVE_COLOURSPACE
colourspace class. (@KelSolaar) - Implement support for Protune log curves with
colour.log_encoding_Protune
andcolour.log_decoding_Protune
definitions. (@KelSolaar) - Implement support for Prismatic colourspace with
colour.RGB_to_Prismatic
andcolour.Prismatic_to_RGB
definitions. (@KelSolaar) - Implement support for hdr-CIELab and hdr-IPT colourspaces with
colour.XYZ_to_hdr_CIELab
,colour.hdr_CIELab_to_XYZ
,colour.XYZ_to_hdr_IPT
andcolour.hdr_IPT_to_XYZ
definitions. (@KelSolaar)
colour.recovery
- Implement support for Meng et al. reflectance recovery method with
colour.XYZ_to_spectral_Meng2015
definition. (@KelSolaar)
colour.utilities
- Implement
colour.as_namedtuple
definition that attempts to convert given array_like, Mapping or Numpy structured array to namedtuple. (@KelSolaar)
Fixes
colour.appearance
colour.XYZ_to_CIECAM02
andcolour.CIECAM02_to_XYZ
definitions handles negative numbers gracefully as per CIECAM02 and Its Recent Developments (@crowsonkb)
colour.colorimetry.
colour.TriSpectralPowerDistribution.items
method was broken. (@KelSolaar)
colour.models
colour.eotf_BT1886
andcolour.oetf_BT1886
definitions default argumentsL_B
andL_W
had their default values changed from respectively 64 and 940 to 0 and 1. (@KelSolaar, @nick-shaw)
Changes
colour.appearance
- colour.CIECAM02_to_XYZ: (@KelSolaar, @crowsonkb)
- Signature:
CIECAM02_to_XYZ(CIECAM02_specification, XYZ_w, L_A, Y_b, surround=CIECAM02_VIEWING_CONDITIONS['Average'], discount_illuminant=False)
- Signature:
colour.colorimetry
- colour.whiteness_ASTM313: (@KelSolaar)
- Name:
whiteness_ASTME313
- Name:
colour.models
colour.eotf_BT1886
: (@KelSolaar, @nick-shaw)- Signature:
eotf_BT1886(V, L_B=0, L_W=1)
- Signature:
colour.oetf_BT1886
: (@KelSolaar, @nick-shaw)- Signature:
oetf_BT1886(L, L_B=0, L_W=1)
- Signature:
colour.gamma_function
: (@KelSolaar)- Name:
function_gamma
- Name:
colour.linear_function
: (@KelSolaar)- Name:
function_linear
- Name:
Colour 0.3.9
Colour 0.3.9 - Alpha Milestone
Features
colour.characterisation
- Add camera spectral sensitivities for Nikon 5100 and Sigma SDMerill measured by the National Physical Laboratory and available from
colour.CAMERAS_RGB_SPECTRAL_SENSITIVITIES
attribute. (@KelSolaar)
colour.colorimetry
colour.SpectralPowerDistribution
andcolour.TriSpectralPowerDistribution
classes have been optimised and are now 6.5 times faster on usual computations. (@KelSolaar)
colour.difference
- Implement support for Luo et al. (2006) CIECAM02 based uniform colourspaces colour difference with
colour.delta_E_CAM02LCD
,colour.delta_E_CAM02SCD
, andcolour.delta_E_CAM02UCS
definitions. (@KelSolaar)
colour.plotting
- Implement
colour.plotting.colour_plotting_defaults
definition that installs Colour default plotting parameters, this implies that Colour will now not override Matplotlib rc parameters on import. (@KelSolaar)
colour.quality
colour.colour_quality_scale
definition has been optimised and is now 10.5 times faster, its return value is minorly altered. (@KelSolaar)colour.colour_rendering_index
definition has been optimised and is now 13.1 times faster, its return value is minorly altered. (@KelSolaar)
colour.models
- Implement support for Luo et al. (2006) CIECAM02 based uniform colourspaces with
colour.JMh_CIECAM02_to_CAM02LCD
,colour.CAM02LCD_to_JMh_CIECAM02
,colour.JMh_CIECAM02_to_CAM02SCD
,colour.CAM02SCD_to_JMh_CIECAM02
,colour.JMh_CIECAM02_to_CAM02UCS
andcolour.CAM02UCS_to_JMh_CIECAM02
definitions. (@KelSolaar) - Implement support for Dolby ICTCP colourspace with
colour.RGB_to_ICTCP
andcolour.ICTCP_to_RGB
definitions. (@KelSolaar) - Implement support for two sets of transformations matrices in
colour.RGB_Colourspace
class whose purpose is to support both literature defined dataset and accurate computations enabling transformations without loss of precision.colour.RGB_Colourspace.use_derived_RGB_to_XYZ_matrix
andcolour.RGB_Colourspace.use_derived_XYZ_to_RGB_matrix
attributes and thecolour.RGB_Colourspace.use_derived_transformation_matrices
method have been introduced to alter the behaviour of the class on a per user need basis. (@KelSolaar, @KevinJW, @nick-shaw, @MichaelMauderer) - Implement support for Canon Log 2 and Canon Log 3 log curves with
colour.log_encoding_CanonLog2
,colour.log_decoding_CanonLog2
,colour.log_encoding_CanonLog3
andcolour.log_decoding_CanonLog3
definitions. (@KelSolaar) - Implement support for RedWideGamut RGB colourspace and Log3G10, Log3G12 log curves with respectively
colour.RED_WIDE_GAMUT_RGB
colourspace class andcolour.log_encoding_Log3G10
,colour.log_decoding_Log3G10
,colour.log_encoding_Log3G12
,colour.log_decoding_Log3G12
definitions. (@nick-shaw) - Implement support for ACEScct colourspace and ACEScct log curves with respectively
colour.ACES_CCT_COLOURSPACE
colourspace class andcolour.log_encoding_ACEScct
,colour.log_encoding_ACEScct
definitions. (@scooperxyz) - Implement
colour.RGB_to_RGB_matrix
definition computing the matrix converting from given input RGB colourspace to output RGB colourspace. (@KelSolaar, @KevinJW)
colour.temperature
- Implement support for Krystek (1985) correlated colour temperature to chromaticity coordinates uv computation with colour.CCT_to_uv_Krystek1985 definition. (@KelSolaar)
colour.uv_to_CCT_Ohno2013
definition has been optimised and is now 15.7 times faster. (@KelSolaar)colour.CCT_to_uv_Ohno2013
definition has been optimised and is now ? times faster. (@KelSolaar)
colour.utilities
- Implement
colour.linear_conversion
definition performing a simple linear conversion of given array between the old and new range. (@KelSolaar)
Changes
colour.algebra
colour.cartesian_to_cylindrical
: (@KelSolaar)- Returns: Cylindrical coordinates array (radial distance ρ, azimuth φ, and height z)
colour.cylindrical_to_cartesian
: (@KelSolaar)- Signature:
cylindrical_to_cartesian(a)
, cylindrical coordinates array (radial distance ρ, azimuth φ, and height z)
- Signature:
colour.characterisation
colour.characterisation.dataset.colour_checkers.chromaticity_coordinates.ColourChecker_Specification
: (@KelSolaar)- Signature:
ColourChecker_Specification('index', 'name', 'xyY')
- Signature:
colour.colorimetry
colour.DEFAULT_SPECTRAL_SHAPE
: (@KelSolaar)- Value:
SpectralShape(360, 780, 1)
- Value:
colour.models
colour.log_encoding_ACESproxy
: (@KelSolaar)- Signature:
log_encoding_ACESproxy(lin_AP1, bit_depth='10 Bit')
- Signature:
colour.log_encoding_ACEScc
: (@KelSolaar)- Signature:
log_encoding_ACEScc(lin_AP1)
- Signature:
colour.oetf_ROMMRGB
: (@KelSolaar)- Signature:
oetf_ROMMRGB(X, I_max=255)
- Signature:
colour.eotf_ROMMRGB
: (@KelSolaar)- Signature:
eotf_ROMMRGB(X_p, I_max=255)
- Signature:
- The following RGB colourspaces XYZ to RGB matrix have been replaced by their specified one if existing: (@KelSolaar)
- ACES Primaries 0
- Adobe RGB (1998)
- ALEXA Wide Gamut RGB
- CIE RGB
- ROMM RGB
- sRGB
- V-Gamut
colour.RGB_to_RGB
: (@KelSolaar, @scooperxyz)- Signature:
RGB_to_RGB(RGB, input_colourspace, output_colourspace, chromatic_adaptation_transform='CAT02', apply_decoding_cctf=False, apply_encoding_cctf=False)
- Signature:
colour.plotting
colour.plotting.multi_colour_plot
: (@KelSolaar)- Signature:
multi_colour_plot(colour_parameters, width=1, height=1, spacing=0, across=3, text_display=True, text_size='large', text_offset=0.075, background_colour=(1.0, 1.0, 1.0), **kwargs)
- Signature:
colour.temperature
colour.CCT_to_uv
: (@KelSolaar)- Signature:
CCT_to_uv(CCT, method='Ohno 2013', **kwargs)
- Signature:
Colour 0.3.8
Colour 0.3.8 - Alpha Milestone
This release introduces important backward incompatible changes on various spectral computations, illuminants chromaticity coordinates and RGB colourspace model related objects, please carefully refer to the Changes section.
A Jupyter Notebook is available to illustrate the expected computational differences: they should remain orders of magnitude under visual discrimination threshold however they will likely create computational discrepancies.
With Colour 0.3.8, SciPy is now a requirement.
@MichaelMauderer and I would like to thanks all the contributors for that release whether they contribute to the code or participate in discussions.
Features
colour.algebra
- Implement
colour.lagrange_coefficients
definition computing Lagrange Coefficients at given point for given degree. (@KelSolaar) - Implement
colour.normalise_vector
definition performing vector normalisation. (@KelSolaar) - Implement
colour.euclidean_distance
definition computing the euclidean distance between two vector arrays. (@KelSolaar) - Implement
colour.intersect_line_segments
definition performing line segment intersections computations. (@KelSolaar)
colour.characterisation
- Implement
colour.RGB_DisplayPrimaries
class providing support for RGB displays primaries tri-spectral power distributions. (@KelSolaar)
colour.characterisation.dataset
- Add Apple Studio Display RGB display primaries tri-spectral power distributions.(@KelSolaar)
- Add Typical CRT Brainard 1997 RGB display primaries tri-spectral power distributions.(@KelSolaar)
colour.colorimetry
- Implement
colour.CIE_standard_illuminant_A_function
definition computing CIE Standard Illuminant A value at given wavelength range. (@KelSolaar) - Implement
colour.SpectralShape.boundaries
method returning the boundaries start and end values of given shape. (@KelSolaar) - Implement
colour.SpectralPowerDistribution.trim_wavelengths
andcolour.TriSpectralPowerDistribution.trim_wavelengths
methods trimming their respective classes wavelength range to given shape. (@KelSolaar, @MichaelMauderer, @Ron024) - Implement
colour.dominant_wavelength
definition computing the dominant wavelength of a given colour stimulus xy chromaticity coordinates. (@KelSolaar) - Implement
colour.complementary_wavelength
definition computing the complementary wavelength of a given colour stimulus xy chromaticity coordinates. (@KelSolaar) - Implement
colour.excitation_purity
definition computing the excitation purity of a given colour stimulus xy chromaticity coordinates. (@KelSolaar) - Implement
colour.colorimetric_purity
definition computing the colorimetric purity of a given colour stimulus xy chromaticity coordinates. (@KelSolaar) - Implement
colour.tristimulus_weighting_factors_ASTME202211
definition computing tristimulus weighting factors tables using practise ASTM E2022–11 method. (@KelSolaar, @MichaelMauderer ) - Implement
colour.spectral_to_XYZ_integration
definition converting given spectral power distribution to CIE XYZ tristimulus values using given colour matching functions and illuminant accordingly to classical integration method. (@KelSolaar) - Implement
colour.spectral_to_XYZ_tristimulus_weighting_factors_ASTME30815
definition converting given spectral power distribution to CIE XYZ tristimulus values using given colour matching functions and illuminant accordingly to practise ASTM E308–15 method. (@KelSolaar, @MichaelMauderer ) - Implement
colour.spectral_to_XYZ_ASTME30815
definition converting given spectral power distribution to CIE XYZ tristimulus values accordingly to practise ASTM E308–15 method. (@KelSolaar, @MichaelMauderer ) - Implement
colour.luminous_efficiency
definition computing Luminous Efficiency of given spectral power distribution. (@KelSolaar, @canavandl)
colour.colorimetry.dataset
- Add Smith & Pokorny 1975 Normal Trichromats colour matching functions. (@KelSolaar)
- Add various HunterLab illuminants data. Please refer to the
colour.colorimetry.dataset.illuminants.hunterlab
documentation references for links to more information. (@KelSolaar, @Ron024)
colour.corresponding
- Implement
colour.corresponding_chromaticities_prediction
generic corresponding chromaticities prediction definition. (@KelSolaar)
colour.models
- Implement support for Hunter L,a,b and Hunter Rd,a,b colour scales with
colour.XYZ_to_Hunter_Lab
,colour.Hunter_Lab_to_XYZ
andcolour.XYZ_to_Hunter_Rdab
definitions. (@KelSolaar, @Ron024) - Implement support for YCbCr and YcCbcCrc colour encodings with
colour.RGB_to_YCbCr
,colour.YCbCr_to_RGB
,colour.RGB_to_YcCbcCrc
andcolour.YcCbcCrc_to_RGB
definitions. (@nick-shaw, @KelSolaar, @KevinJW) - Implement support for BT 1886 EOTF and OETF with
colour.eotf_BT1886
andcolour.eotf_BT1886
definitions. (@KelSolaar) - Implement support for ST 2084 EOTF and OETF with
colour.eotf_ST2084
andcolour.oetf_ST2084
definitions. (@KelSolaar) - Implement explicit support for REDLog log encoding curve with
colour.log_encoding_REDLog
andcolour.log_decoding_REDLog
definitions. (@nick-shaw, @KelSolaar) - Implement support for ACESproxy log encoding curve with
colour.log_encoding_ACESproxy
andcolour.log_decoding_ACESproxy
definitions. (@KelSolaar) - Implement complete support for RIMM / ROMM / ERIMM encodings with
colour.oetf_ROMMRGB
,colour.eotf_ROMMRGB
,colour.oetf_RIMMRGB
,colour.eotf_RIMMRGB
,colour.log_encoding_ERIMMRGB
andcolour.log_decoding_ERIMMRGB
definitions andcolour.ROMM_RGB_COLOURSPACE
,colour.RIMM_RGB_COLOURSPACE
,colour.ERIMM_RGB_COLOURSPACE
andcolour.PROPHOTO_RGB_COLOURSPACE
classes. (@KelSolaar) - Implement support for generic gamma encoding / decoding function with
colour.gamma_function
definition. (@KelSolaar) - Implement support for generic linear encoding / decoding function with
colour.linear_function
definition. (@KelSolaar) - Implement
colour.oetf
andcolour.eotf
definitions andcolour.OETFS
andcolour.EOTFS
attributes providing single point access to supported OETFs and EOTFs. (@KelSolaar)
colour.utilities
- Implement
colour.centroid
definition computing array centroid indexes. - Implement
colour.orient
definition performing array rotation, flip and flop. - Implement
colour.filter_kwargs
definition filtering incompatible keyword arguments with given function signature. - Implement
colour.filter_warnings
definition filtering API warnings.
Fixes
colour.colorimetry
colour.luminous_efficiency
definition was incorrectly returning the luminous efficacy and has been renamed accordingly. The currentcolour.luminous_efficiency
definition now properly returns luminous efficiency. (@KelSolaar, @canavandl)
colour.plotting
colour.plotting.nadir_grid
had various issues and wasn't working properly since Colour 0.3.7. (@KelSolaar)
colour.io
colour.write_spds_to_csv_file
definition now correctly writes CSV files without extra line breaks on Windows. (@Ron024)
colour.models
colour.linear_to_red_log_film
andcolour.red_log_film_to_linear
definitions are now properly based on the Cineon curve. (@nick-shaw, @KelSolaar)
Changes
colour.adaptation
colour.CMCCAT2000_forward
: (@KelSolaar)- Name:
colour.chromatic_adaptation_forward_CMCCAT2000
- Name:
colour.CMCCAT2000_reverse
: (@KelSolaar)- Name:
colour.chromatic_adaptation_reverse_CMCCAT2000
- Name:
colour.algebra
colour.is_identity
: (@KelSolaar)- Signature:
colour.is_identity(a, n=3)
- Signature:
colour.cartesian_to_spherical
: (@KelSolaar)- Signature:
colour.cartesian_to_spherical(a)
- Signature:
colour.spherical_to_cartesian
: (@KelSolaar)- Signature:
colour.spherical_to_cartesian(a)
- Signature:
colour.cartesian_to_cylindrical
: (@KelSolaar)- Signature:
colour.cartesian_to_cylindrical(a)
- Signature:
colour.cylindrical_to_cartesian
: (@KelSolaar)- Signature:
colour.cylindrical_to_cartesian(a)
- Signature:
colour.characterisation
colour.first_order_colour_fit
: (@KelSolaar)- Signature:
colour.first_order_colour_fit(m_1, m_2)
- Signature:
colour.colorimetry
colour.ILLUMINANTS['CIE 1931 2 Degree Standard Observer']['D50']
: (@KelSolaar)- Value:
(0.34570, 0.35850)
- Value:
colour.ILLUMINANTS['CIE 1931 2 Degree Standard Observer']['D65']
: (@KelSolaar)- Value:
(0.31270, 0.32900)
- Value:
colour.SpectralShape.steps
: (@KelSolaar)- Name:
colour.SpectralShape.interval
- Name:
colour.SpectralPowerDistribution
andcolour.TriSpectralPowerDistribution
classes arithmetical operations such
as addition, subtraction, multiplication, division and exponentiation are not happening in-place anymore. This behaviour is now supported through augmented assignment operators:spd /= np.max(spd.values)
instead ofspd / np.max(spd.values)
. (@KelSolaar)colour.SpectralPowerDistribution.align
: (@KelSolaar)- Signature:
colour.SpectralPowerDistribution.align(self, shape, interpolation_method=None, extrapolation_method='Constant', extrapolation_left=None, extrapolation_right=None)
- Signature:
colour.TriSpectralPowerDistribution.align
: (@KelSolaar)- Signature:
colour.TriSpectralPowerDistribution.align(self, shape, interpolation_method=None, extrapolation_method='Constant', extrapolation_left=None, extrapolation_right=None)
- Signature:
colour.spectral_to_XYZ
: (@KelSolaar)- Behaviour:
colour.spectral_to_XYZ
definition will now use practise ASTM E308–15 method instead of classical integration. - Signature: `colour.spectral_to_XYZ(spd, cmfs=STANDARD_OBSERVERS_CMFS.get('CIE 1931 2 Degree Standard Observer'), illuminant=ones_spd(...
- Behaviour:
Colour 0.3.7
Colour 0.3.7 - Alpha Milestone
Features
API Reference
- The documentation is now hosted on Read the Docs.
Distribution
- Python 2.7 and 3.5 wheels are now available on Pypi.
colour.models
- Implement
colour.chromatically_adapted_primaries
definition performing chromatic adaptation of a given RGB colourspace primaries. (@KelSolaar) colour.REC_709_COLOURSPACE.EOCF
definition will issue a warning when used. (@KevinJW, @KelSolaar)
colour.plotting
colour.plotting.image_plot
definition can now plot single channel images. (@KelSolaar)
colour.utilities
- Implement
colour.ArbitraryPrecisionMapping
class based providing support for floating point keys by rounding them at a specific decimals count. (@KelSolaar)
Fixes
colour.colorimetry.dataset
- Add missing F11 illuminant chromaticity coordinates for CIE 1931 2 Degree Standard Observer. (@henczati, @KelSolaar)
colour.models.dataset
- ACEScg colourspace was using the incorrect transfer function. (@KelSolaar)
- ACESproxy colourspace was using the incorrect primaries. (@nick-shaw, @KelSolaar)
- RED colourspaces were using the incorrect whitepoint. (@nick-shaw, @KelSolaar)
Changes
colour.algebra
colour.Extrapolator1d
: (@KelSolaar)- Name:
colour.Extrapolator
- Name:
colour.models
colour.RGB_Colourspace
: (@KelSolaar)- Methods:
transfer_function
:- Name:
OECF
(Opto-electronic conversion function)
- Name:
inverse_transfer_function
:- Name:
EOCF
(Electro-optical conversion function)
- Name:
- Methods:
colour.XYZ_to_RGB
: (@KelSolaar)- Signature:
colour.XYZ_to_RGB(XYZ, illuminant_XYZ, illuminant_RGB, XYZ_to_RGB_matrix, chromatic_adaptation_transform='CAT02', OECF=None)
- Signature:
colour.RGB_to_XYZ
: (@KelSolaar)- Signature:
colour.RGB_to_XYZ(RGB, illuminant_RGB, illuminant_XYZ, RGB_to_XYZ_matrix, chromatic_adaptation_transform='CAT02', EOCF=None)
- Signature:
colour.XYZ_to_sRGB
: (@KelSolaar)- Signature:
colour.XYZ_to_sRGB(XYZ, illuminant=RGB_COLOURSPACES.get('sRGB').whitepoint, chromatic_adaptation_transform='CAT02', apply_OECF=True)
- Signature:
colour.sRGB_to_XYZ
: (@KelSolaar)- Signature:
colour.sRGB_to_XYZ(RGB, illuminant=RGB_COLOURSPACES.get('sRGB').whitepoint, chromatic_adaptation_method='CAT02', apply_EOCF=True)
- Signature:
colour.plotting
colour.plotting.single_transfer_function_plot
: (@KelSolaar)- Name:
colour.plotting.single_conversion_function_plot
- Signature:
colour.plotting.single_conversion_function_plot(colourspace='Rec. 709', EOCF=False, **kwargs)
- Name:
colour.plotting.multi_transfer_function_plot
: (@KelSolaar)- Name:
colour.plotting.multi_conversion_function_plot
- Signature:
colour.plotting.multi_conversion_function_plot(colourspaces, EOCF=False, **kwargs)
- Name:
: (@KelSolaar)colour.plotting.colour_parameter
- Remove
- Note:
colour.plotting.ColourParameter
class should be used instead.
Colour 0.3.6
Colour 0.3.6 - Alpha Milestone
Colour 0.3.6 is the last API version to support Python 2.6.
Features
colour.colorimetry
- Implement
colour.SpectralPowerDistribution.interpolate
andcolour.TriSpectralPowerDistribution.interpolate
methods now also support Piecewise Cubic Hermite Interpolation. (@KelSolaar) - Implement
colour.wavelength_to_XYZ
definition supports all the API interpolation methods: (@KelSolaar)- Cubic Spline
- Linear
- Pchip
- Sprague (1880)
colour.colorimetry.dataset
- Add Kinoton 75P spectral power distribution and associated chromaticity coordinates. (@KelSolaar)
colour.models
- Implement
colour.xy_to_xyY
andcolour.xyY_to_xy
definitions to provide support for illuminant arguments with Luminance value in variouscolour.models
objects. (@KelSolaar)
colour.plotting
- Implement
colour.plotting.RGB_colourspaces_gamuts_plot
definition to visualise RGB colourspaces gamuts. (@KelSolaar) - Implement
colour.plotting.RGB_scatter_plot
definition to visualise RGB values within RGB colourspaces gamuts. (@KelSolaar) - Implement
colour.plotting.quad
geometry plotting helper definition. (@KelSolaar) - Implement
colour.plotting.grid
geometry plotting helper definition. (@KelSolaar) - Implement
colour.plotting.cube
geometry plotting helper definition. (@KelSolaar) - Implement
colour.plotting.multi_spd_colour_rendering_index_bars_plot
definition to visualise colour rendering index of multiple illuminants or light sources spectral power distributions. (@henczati, @KelSolaar) - Implement
colour.plotting.multi_spd_colour_quality_scale_bars_plot
definition to visualise colour quality scale of multiple illuminants or light sources spectral power distributions. (@henczati, @KelSolaar)
colour.utilities
- Implement
colour.ArbitraryPrecisionMapping
class based providing support for floating point keys by rounding them at a specific decimals count. (@KelSolaar)
colour.volume
- Implement
colour.is_within_mesh_volume
definition returning if given points are within given mesh volume using Delaunay triangulation. (@KelSolaar) - Implement
colour.is_within_pointer_gamut
definition returning if given tristimulus values are within Pointer's Gamut. (@KelSolaar) - Implement
colour.is_within_visible_spectrum
definition returning if given tristimulus values are within Visible Spectrum. (@KelSolaar) - Implement
colour.RGB_colourspace_pointer_gamut_coverage_MonteCarlo
definition returning given RGB colourspace percentage coverage of Pointer's Gamut using Monte Carlo method. (@KelSolaar) - Implement
colour.RGB_colourspace_visible_spectrum_coverage_MonteCarlo
definition returning given RGB colourspace percentage coverage of Visible Spectrum using Monte Carlo method. (@KelSolaar)
Fixes
colour.colorimetry
- Ensure
colour.SpectralPowerDistribution.zeros
method raises an exception if unsuccessful. - Implement
colour.SpectralMapping
class based oncolour.ArbitraryPrecisionMapping
class providing better support for floating point wavelengths keys by rounding them at a specific decimals count. (@KelSolaar)
Changes
colour.algebra
colour.LinearInterpolator1d
: (@KelSolaar)- Name:
colour.LinearInterpolator
- Name:
colour.SplineInterpolator
: (@KelSolaar)- Name:
colour.CubicSplineInterpolator
- Name:
colour.colorimetry.dataset
colour.wavelength_to_XYZ
: (@KelSolaar)- Signature:
colour.wavelength_to_XYZ(wavelength, cmfs=STANDARD_OBSERVERS_CMFS.get('CIE 1931 2 Degree Standard Observer'), method=None)
- Signature:
- Rename D63 illuminant to DCI-P3. (@KelSolaar)
- Remove
D63spectral power distribution and associated chromaticity coordinates. (@KelSolaar)
colour.models
colour.XYZ_to_Lab
: (@KelSolaar)- Arguments:
illuminant
: Reference illuminant xy chromaticity coordinates or CIE xyY colourspace array.
- Arguments:
colour.Lab_to_XYZ
: (@KelSolaar)- Arguments:
illuminant
: Reference illuminant xy chromaticity coordinates or CIE xyY colourspace array.
- Arguments:
colour.XYZ_to_Luv
: (@KelSolaar)- Arguments:
illuminant
: Reference illuminant xy chromaticity coordinates or CIE xyY colourspace array.
- Arguments:
colour.Luv_to_XYZ
: (@KelSolaar)- Arguments:
illuminant
: Reference illuminant xy chromaticity coordinates or CIE xyY colourspace array.
- Arguments:
colour.Luv_to_uv
: (@KelSolaar)- Arguments:
illuminant
: Reference illuminant xy chromaticity coordinates or CIE xyY colourspace array.
- Arguments:
colour.XYZ_to_UVW
: (@KelSolaar)- Arguments:
illuminant
: Reference illuminant xy chromaticity coordinates or CIE xyY colourspace array.
- Arguments:
colour.XYZ_to_RGB
: (@KelSolaar)- Arguments:
illuminant_XYZ
: CIE XYZ tristimulus values illuminant xy chromaticity coordinates or CIE xyY colourspace array.illuminant_RGB
: RGB colourspace illuminant xy chromaticity coordinates or CIE xyY colourspace array.
- Arguments:
colour.RGB_to_XYZ
: (@KelSolaar)- Arguments:
illuminant_RGB
: RGB colourspace illuminant xy chromaticity coordinates or CIE xyY colourspace array.illuminant_XYZ
: CIE XYZ tristimulus values illuminant xy chromaticity coordinates or CIE xyY colourspace array.
- Arguments:
colour.plotting
colour.plotting.single_spd_plot
: (@henczati, @fangjy88, @KelSolaar)- Arguments:
out_of_gamut_clipping
: Out of gamut colours will be clipped if True otherwise, the colours
will be offset by the absolute minimal colour leading to a rendering on
gray background, less saturated and smoother.
- Arguments:
colour.plotting.visible_spectrum_plot
: (@henczati, @fangjy88, @KelSolaar)- Arguments:
out_of_gamut_clipping
: Out of gamut colours will be clipped if True otherwise, the colours
will be offset by the absolute minimal colour leading to a rendering on
gray background, less saturated and smoother.
- Arguments:
colour.plotting.colour_rendering_index_bars_plot
: (@henczati, @KelSolaar)- Name:
colour.plotting.single_spd_colour_rendering_index_bars_plot
- Name:
colour.plotting.colour_quality_scale_bars_plot
: (@henczati, @KelSolaar)- Name:
colour.plotting.single_spd_colour_quality_scale_bars_plot
- Name:
colour.volume
colour.volume.rgb.sample_RGB_colourspace_volume_MonteCarlo
: (@KelSolaar)- Code vectorisation.
Colour 0.3.5
Colour 0.3.5 - Alpha Milestone
The focus on this major milestone has been vectorisation of most of the API code, more details are available in this Google Docs Spreadsheet and the derivation of RED colourspaces.
Features
colour.adaptation.cie1994
colour.chromatic_adaptation_CIE1994
definition has been vectorised, handles n-dimensional arrays and is now 250.7 times faster. (@KelSolaar)
colour.adaptation.cmccat2000
colour.colour.CMCCAT2000_forward
definition has been vectorised, handles n-dimensional arrays and is now 372.9 times faster. (@KelSolaar)colour.colour.CMCCAT2000_reverse
definition has been vectorised, handles n-dimensional arrays and is now 360.1 times faster. (@KelSolaar)
colour.adaptation.fairchild1990
colour.chromatic_adaptation_Fairchild1990
definition has been vectorised, handles n-dimensional arrays and is now 92.7 times faster. (@KelSolaar)
colour.adaptation.vonkries
colour.chromatic_adaptation_matrix_VonKries
definition has been vectorised, handles n-dimensional arrays and is now 77.8 times faster. (@KelSolaar)colour.chromatic_adaptation_VonKries
definition has been vectorised, handles n-dimensional arrays and is now 60.0 times faster. (@KelSolaar)
colour.algebra
colour.cartesian_to_spherical
definition has been vectorised, handles n-dimensional arrays and is now 165.0 times faster. (@KelSolaar)colour.spherical_to_cartesian
definition has been vectorised, handles n-dimensional arrays and is now 97.2 times faster. (@KelSolaar)colour.cartesian_to_cylindrical
definition has been vectorised, handles n-dimensional arrays and is now 151.8 times faster. (@KelSolaar)colour.cylindrical_to_cartesian
definition has been vectorised, handles n-dimensional arrays and is now 123.1 times faster. (@KelSolaar)
colour.appearance
colour.XYZ_to_ATD95
definition has been vectorised, handles n-dimensional arrays and is now 17.5 times faster. (@KelSolaar, @MichaelMauderer)colour.XYZ_to_CIECAM02
definition has been vectorised, handles n-dimensional arrays and is now 77.4 times faster. (@KelSolaar, @MichaelMauderer)colour.CIECAM02_to_XYZ
definition has been vectorised, handles n-dimensional arrays and is now 16.3 times faster. (@KelSolaar, @MichaelMauderer)colour.XYZ_to_Hunt
definition has been vectorised, handles n-dimensional arrays and is now 130.2 times faster. (@KelSolaar, @MichaelMauderer)colour.XYZ_to_LLAB
definition has been vectorised, handles n-dimensional arrays and is now 34 times faster. (@KelSolaar)colour.XYZ_to_Nayatani95
definition has been vectorised, handles n-dimensional arrays and is now 111.7 times faster. (@KelSolaar, @MichaelMauderer)colour.XYZ_to_RLAB
definition has been vectorised, handles n-dimensional arrays and is now 53.6 times faster. (@KelSolaar, @MichaelMauderer)
colour.colorimetry.blackbody
colour.planck_law
definition has been vectorised, handles n-dimensional arrays and is now 162.1 times faster. (@KelSolaar)
colour.colorimetry.lefs
colour.mesopic_weighting_function
definition has been vectorised and now handles n-dimensional arrays. (@KelSolaar)
colour.colorimetry.lightness
colour.lightness_Glasser1958
definition has been vectorised, handles n-dimensional arrays and is now 16.0 times faster. (@KelSolaar)colour.lightness_Wyszecki1963
definition has been vectorised, handles n-dimensional arrays and is now 48.3 times faster. (@KelSolaar)colour.lightness_1976
definition has been vectorised, handles n-dimensional arrays and is now 33.3 times faster. (@KelSolaar)
colour.colorimetry.luminance
colour.luminance_Newhall1943
definition has been vectorised, handles n-dimensional arrays and is now 24.1 times faster. (@KelSolaar)colour.luminance_ASTMD153508
definition has been vectorised, handles n-dimensional arrays and is now 26.3 times faster. (@KelSolaar)colour.luminance_1976
definition has been vectorised, handles n-dimensional arrays and is now 35.7 times faster. (@KelSolaar)
colour.colorimetry.spectrum
colour.SpectralShape.__contains__
now accepts array_like input. (@KelSolaar)colour.SpectralPowerDistribution.__getitem__
now accepts array_like and slice inputs. (@KelSolaar)colour.SpectralPowerDistribution.__setitem__
now accepts array_like and slice inputs. (@KelSolaar)colour.SpectralPowerDistribution.__contains__
now accepts array_like inputs. (@KelSolaar)colour.SpectralPowerDistribution.get
now accepts array_like inputs. (@KelSolaar)colour.TriSpectralPowerDistribution.__getitem__
now accepts array_like and slice inputs. (@KelSolaar)colour.TriSpectralPowerDistribution.__setitem__
now accepts array_like and slice inputs. (@KelSolaar)colour.TriSpectralPowerDistribution.__contains__
now accepts array_like inputs. (@KelSolaar)colour.TriSpectralPowerDistribution.get
now accepts array_like inputs (@KelSolaar)
colour.colorimetry.transformations
colour.RGB_2_degree_cmfs_to_XYZ_2_degree_cmfs
definition has been vectorised and now handles n-dimensional arrays. (@KelSolaar)colour.RGB_10_degree_cmfs_to_XYZ_10_degree_cmfs
definition has been vectorised and now handles n-dimensional arrays. (@KelSolaar)colour.RGB_10_degree_cmfs_to_LMS_10_degree_cmfs
definition has been vectorised and now handles n-dimensional arrays. (@KelSolaar)colour.LMS_2_degree_cmfs_to_XYZ_2_degree_cmfs
definition has been vectorised and now handles n-dimensional arrays. (@KelSolaar)colour.LMS_10_degree_cmfs_to_XYZ_10_degree_cmfs
definition has been vectorised and now handles n-dimensional arrays. (@KelSolaar)
colour.colorimetry.tristimulus
colour.wavelength_to_XYZ
definition has been vectorised, handles n-dimensional arrays and is now 131.0 times faster. (@KelSolaar)
colour.colorimetry.whiteness
colour.whiteness_Berger1959
definition has been vectorised, handles n-dimensional arrays and is now 277.6 times faster. (@KelSolaar)colour.whiteness_Taube1960
definition has been vectorised, handles n-dimensional arrays and is now 440.6 times faster. (@KelSolaar)colour.whiteness_Stensby1968
definition has been vectorised, handles n-dimensional arrays and is now 358.3 times faster. (@KelSolaar)colour.whiteness_ASTM313
definition has been vectorised, handles n-dimensional arrays and is now 305.5 times faster. (@KelSolaar)colour.whiteness_Ganz1979
definition has been vectorised, handles n-dimensional arrays and is now 194.1 times faster. (@KelSolaar)colour.whiteness_CIE2004
definition has been vectorised, handles n-dimensional arrays and is now 388.9 times faster. (@KelSolaar)
colour.difference
colour.delta_E_CIE1976
definition has been vectorised, handles n-dimensional arrays and is now 283.2 times faster. (@KelSolaar)colour.delta_E_CIE1994
definition has been vectorised, handles n-dimensional arrays and is now 256 times faster. (@KelSolaar)colour.delta_E_CIE2000
definition has been vectorised, handles n-dimensional arrays and is now 140.3 times faster. (@KelSolaar)colour.delta_E_CMC
definition has been vectorised, handles n-dimensional arrays and is now 115.4 times faster. (@KelSolaar)
colour.io
- Implement
colour.read_image
definition providing image read support using OpenImageIO. (@KelSolaar) - Implement
colour.write_image
definition providing image write support using OpenImageIO. (@KelSolaar)
colour.models.cie_xyy
colour.XYZ_to_xyY
definition has been vectorised, handles n-dimensional arrays and is now 15.5 times faster. (@KelSolaar)colour.xyY_to_XYZ
definition has been vectorised, handles n-dimensional arrays and is now 70.8 times faster. (@KelSolaar)colour.xy_to_XYZ
definition has been vectorised, handles n-dimensional arrays and is now 74.5 times faster. (@KelSolaar)colour.XYZ_to_xy
definition has been vectorised, handles n-dimensional arrays and is now 17.7 times faster. (@KelSolaar)
colour.models.cie_lab
colour.XYZ_to_Lab
definition has been vectorised, handles n-dimensional arrays and is now 49.2 times faster. (@KelSolaar)colour.Lab_to_XYZ
definition has been vectorised, handles n-dimensional arrays and is now 52.3 times faster. (@KelSolaar)colour.Lab_to_LCHab
definition has been vectorised, handles n-dimensional arrays and is now 171.2 times faster. (@KelSolaar)colour.LCHab_to_Lab
definition has been vectorised, handles n-dimensional arrays and is now 173.5 times faster. (@KelSolaar)
colour.models.cie_luv
colour.XYZ_to_Luv
definition has been vectorised, handles n-dimensional arrays and is now 205.8 times faster. (@KelSolaar)colour.Luv_to_XYZ
definition has been vectorised, handles n-dimensional arrays and is now 175.2 times faster. (@KelSolaar)colour.Luv_to_uv
definition has been vectorised, handles n-dimensional arrays and is now 183 times faster. (@KelSolaar)colour.Luv_uv_to_xy
definition has been vectorised, handles n-dimensional arrays and is now 218.7 times faster. (@KelSolaar)colour.Luv_to_LCHuv
definition has been vectorised, handles n-dimensional arrays and is now 144.1 times faster. (@KelSolaar)colour.LCHuv_to_Luv
definition has been vectorised, handles n-dimensional arrays and is now 168.7 times faster. (@KelSolaar)
colour.models.cie_ucs
colour.XYZ_to_UCS
definition has been vectorised, hand...
Colour 0.3.4
Colour 0.3.4 - Alpha Milestone
Features
colour.colorimetry
- Add new CIE D Series Illuminant D63 to accomodate DCI-P3 whitepoint. (@KelSolaar)
- Implement Luminous Efficacy computation
colour.luminous_efficacy
definition. (@canavandl)
colour.models
- Implement support for S-Gamut3 and S-Gamut3.Cine RGB colourspaces. (@KelSolaar)
- Implement support for DCI-P3+ and Cinema Gamut RGB colourspaces. (@KelSolaar)
- Implement support for various linear to log and log to linear definitions: (@KelSolaar)
- Cineon:
colour.linear_to_cineon
,colour.cineon_to_linear
- Panalog:
colour.linear_to_panalog
,colour.panalog_to_linear
- REDLog:
colour.linear_to_red_log
,colour.red_log_to_linear
- ViperLog:
colour.linear_to_viper_log
,colour.viper_log_to_linear
- PLog:
colour.linear_to_pivoted_log
,colour.pivoted_log_to_linear
- C-Log:
colour.linear_to_c_log
,colour.c_log_to_linear
- ACEScc:
colour.linear_to_aces_cc
,colour.aces_cc_to_linear
- ALEXA Log C:
colour.linear_to_alexa_log_c
,colour.alexa_log_c_to_linear
- DCI-P3:
colour.linear_to_dci_p3_log
,colour.dci_p3_log_to_linear
- S-Log:
colour.linear_to_s_log
,colour.s_log_to_linear
- S-Log2:
colour.linear_to_s_log2
,colour.s_log2_to_linear
- S-Log3:
colour.linear_to_s_log3
,colour.s_log3_to_linear
- Cineon:
colour.plotting
- Implement several objects to plot spectral power distribution chromaticity coordinates on chromaticity diagrams: (@KelSolaar)
colour.plotting.spds_CIE_1931_chromaticity_diagram_plot
colour.plotting.spds_CIE_1960_UCS_chromaticity_diagram_plot
colour.plotting.spds_CIE_1976_UCS_chromaticity_diagram_plot
colour.volume
- Implement multi-process Monte Carlo brute force RGB colourspace volume computation:
colour. RGB_colourspace_volume_MonteCarlo
. (@KelSolaar, @MichaelMauderer)
Fixes
colour.plotting
colour.plotting.single_spd_plot
definition was using incorrect abscissa ticker values. (@naavis, @KelSolaar)
Changes
colour.models
colour.models.dataset.aces_rgb
module objects have been conformed to latest ACES 1.0 specification and naming convention, thus it is highly recommended to study the module and the references: (@KelSolaar)- Name:
colour.models.dataset.aces
- Name:
colour.models.dataset.dci_p3.DCI_P3_COLOURSPACE
now uses CIE D Series Illuminant D63 whitepoint.colour.models.dataset.s-log.S_LOG_COLOURSPACE
: (@KelSolaar)- Name:
colour.models.dataset.s-gamut.S_GAMUT_COLOURSPACE
- Name:
: (@KelSolaar)colour.models.dataset.c-log
- Remove
colour.optimal
colour.optimal
: (@KelSolaar)- Name:
colour.volume
- Name: