Skip to content

Instantly share code, notes, and snippets.

@KelSolaar
Last active March 24, 2026 06:09
Show Gist options
  • Select an option

  • Save KelSolaar/4a6ebe9ec3d389f0934b154fec8df51d to your computer and use it in GitHub Desktop.

Select an option

Save KelSolaar/4a6ebe9ec3d389f0934b154fec8df51d to your computer and use it in GitHub Desktop.
Colour 0.4.8 - Current Changes

Colour 0.4.8 - Alpha Milestone

Features

colour.characterisation

  • Implement support for TPS-3D colour correction method with colour.characterisation.colour_correction_TPS3D definition. (#1391, @mojaravscki)

    Method 24 ctrl 48 ctrl 140 ctrl
    Uncorrected 0.1055 - -
    Cheung 2004 0.0371 (65% ↓) - -
    Finlayson 2015 0.0353 (67% ↓) 0.0379 0.0359
    TPS-3D 0.0145 (86% ↓) 0.0089 (92% ↓) 0.0000

image

colour.colorimetry

  • Implement support for gaussian-based spectral recovery with colour.recovery.RGB_to_sd_Gaussian definition following Smits (1999) method. (#1384, @KelSolaar)
  • Implement support for gaussian-based multi-spectral recovery with colour.recovery.RGB_to_msds_Smits1999, colour.recovery.RGB_to_msds_Gaussian and colour.XYZ_to_msds definitions. (#1385, @KelSolaar)

colour.difference

  • Implement support for metamerism index computation using spectral distributions with colour.difference.sd_to_metamerism_index definition. (#1382, 0e0676ed92d003937f374913552a47464816f741, @lassefschmidt)
  • Enable DIN99 method selection in colour.difference.delta_E_DIN99 definition and add function-name-keyed kwargs support to colour.difference.delta_E definition. (#1393, @lassefschmidt)

colour.phenomena

  • Implement the CIE Standard General Sky luminance distribution model (CIE S 011/E:2003, ISO 15469:2004(E)) with colour.phenomena.sky_luminance_gradation_CIE2003, colour.phenomena.sky_scattering_indicatrix_CIE2003, colour.phenomena.sky_luminance_distribution_CIE2003, and colour.phenomena.sky_luminance_distribution_overcast_CIE2003 definitions. (@KelSolaar)

image

image

  • Implement the Prague Sky Model (Wilkie et al. 2021, Vevoda et al. 2022) for physically-based sky radiance, sun radiance, transmittance and polarisation with colour.phenomena.sky.SkyDataset_Wilkie2021, colour.phenomena.sky.sky_radiance_Wilkie2021, colour.phenomena.sky.sun_radiance_Wilkie2021, colour.phenomena.sky.sky_polarisation_Wilkie2021, and colour.phenomena.sky.sky_transmittance_Wilkie2021 definitions. Dataset auto-downloaded from Zenodo (record 19140728). (@KelSolaar)

image

image

image

colour.plotting

  • Implement colour.plotting.plot_sky_luminance_distribution_CIE2003 definition with polar and lat-long projections. (@KelSolaar)
  • Implement colour.plotting.plot_sky_radiance_Wilkie2021 and colour.plotting.plot_sky_colour_Wilkie2021 definitions for single-wavelength radiance and true colour sky rendering. (@KelSolaar)

colour.models

  • Add colour.SCALES_YCBCR mapping and S chroma scaling parameter to colour.matrix_YCbCr, colour.RGB_to_YCbCr, and colour.YCbCr_to_RGB definitions. (#1395, @KelSolaar)
  • Implement OPPO O-Log log encoding and decoding support with colour.models.log_encoding_OPPOOLog and colour.models.log_decoding_OPPOOLog definitions. (#1396, @Jackchou00)

colour.notation

  • Refactor colour.notation.munsell from a single module into a package and add ONNX-based Munsell Renotation System conversions with colour.notation.munsell.munsell_specification_to_xyY_Onnx, colour.notation.munsell.munsell_colour_to_xyY_Onnx, colour.notation.munsell.xyY_to_munsell_specification_Onnx, and colour.notation.munsell.xyY_to_munsell_colour_Onnx definitions using pre-trained neural networks from the colour-science/learning-munsell HuggingFace repository. (#1397, @KelSolaar)

    Conversion Speedup
    xyY -> Munsell Colour ~742x
    Munsell Colour -> xyY ~27x

image

colour.algebra

  • Add colour.algebra.linear_interpolation_index_and_factor definition for computing piecewise linear interpolation bin index and factor. (@KelSolaar)

colour.geometry

  • Add colour.geometry.intersect_ray_circle_2d definition for vectorised 2D ray-circle intersection. (@KelSolaar)

colour.utilities

  • Add colour.ROOT_COLOUR_SCIENCE constant for the Colour data root directory (~/.colour-science).
  • Add colour.utilities.hash_sha256 and colour.utilities.url_download definitions with SHA-256 verification and exponential backoff retries for downloading and caching remote files.

Fixes

colour.graph

  • Ensure that polar conversion wrapper functions have complete type annotations. (2e7fac6733dbf73a79342377f7dbac98ad003009, #1392, @KelSolaar, @lassefschmidt)

Changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment