Skip to content

Instantly share code, notes, and snippets.

@KelSolaar
Last active April 22, 2024 08:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KelSolaar/4a6ebe9ec3d389f0934b154fec8df51d to your computer and use it in GitHub Desktop.
Save KelSolaar/4a6ebe9ec3d389f0934b154fec8df51d to your computer and use it in GitHub Desktop.
Colour 0.4.5 - Current Changes

Colour 0.4.5 - Alpha Milestone

Features

Environment (#1239, @KelSolaar)

It is now possible to create a ~/.colour-science/colour-science.jenv JSON file from which Colour will load environment variables from:

{
  "COLOUR_SCIENCE__COLOUR__SHOW_WARNINGS_WITH_TRACEBACK": 1
}

The following new environment variables are now supported:

  • COLOUR_SCIENCE__FILTER_RUNTIME_WARNINGS: Filter Colour runtime warnings.
  • COLOUR_SCIENCE__FILTER_USAGE_WARNINGS: Filter Colour usage warnings.
  • COLOUR_SCIENCE__FILTER_COLOUR_WARNINGS: Filter Colour warnings, this also filters Colour usage and runtime warnings.
  • COLOUR_SCIENCE__FILTER_PYTHON_WARNINGS: Filter Python warnings.

Input and Output

  • The definitions reading from and writing to files now support the pathlib.Path type. (#ff4fe99337cc3ba0e4d1b9071bc22afb4db3c7f5, @KelSolaar)

colour.characterisation

  • Add the ColorChecker SG chromaticity coordinates with the colour.CCS_COLOURCHECKERS["ColorCheckerSG - Before November 2014"] and colour.CCS_COLOURCHECKERS["ColorCheckerSG - After November 2014"] attribute keys.

image image

colour.colorimetry

  • PR: Use shape if passed, to also reshape the colour.continuous.AbstractContinuousSignal sub-classes in colour.colorimetry.sd_to_XYZ_integration definition. (#1250, @KelSolaar)

Fixes

colour.colorimetry

  • Fix issue where colour.colorimetry.sds_and_msds_to_msds definition did not always copy the converted spectral distributions and was causing seemingly random unit tests failure. (#891d364f1dd167d8ed0be0cc0c9bc10bd06281b2, @KelSolaar)

colour.models

  • Change Canon Cinema Gamut whitepoint to D55. (#c25934eabc39152b0182daca063561ed218a4068, @MrLixm, @KelSolaar)

colour.utilities

  • Ensure that caches are systematically cleared when changing dtype: It was causing seemingly random unit tests failure. (#8faeb095dc0706f21ffe5adaf1861010b3771e71, @KelSolaar)

Changes

colour.plotting

Object Signature Author
colour.plotting. plot_RGB_colourspace_section(colourspace: (RGB_Colourspace | LiteralRGBColourspace | str | Sequence[RGB_Colourspace | LiteralRGBColourspace | str]) ,model: LiteralColourspaceModel | str = "CIE xyY", axis: Literal["+z", "+x", "+y"] | str = "+z", origin: float = 0.5, normalise: bool = True,size: float = 1.0, show_section_colours: bool = True, show_section_contour: bool = True, segments: int = 64, **kwargs: Any) -> Tuple[Figure, Axes] @KelSolaar
@JGoldstone
Copy link

from colour/models/rgb/datasets/__init__.py there's this snippet:

# ----------------------------------------------------------------------------#
# ---                API Changes and Deprecation Management                ---#
# ----------------------------------------------------------------------------#
# v0.4.2
def _alexa_wide_gamut():
    usage_warning(
        'The "ALEXA Wide Gamut" RGB colourspace has been renamed to '
        '"ARRI Wide Gamut 3" for consistency with "ARRI" new naming '
        "convention."
    )

    return RGB_COLOURSPACE_ARRI_WIDE_GAMUT_3

What were you trying to do there with the "ARRI" in quotes like that (fourth-from-last world in warning)? If it's the business entity that you meant, then it would be "ARRI's", i.e. the possessive, without the surrounding double-quotes. Or was it something else you meant?

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