Skip to content

Conversation

DevTGHa
Copy link
Collaborator

@DevTGHa DevTGHa commented Sep 2, 2025

Fix deprecated colour.XYZ_to_RGB

Summary

Existing colour.XYZ_to_RGB has been deprecated and need to be updated.

old version (before 0.4.3)

Parameters:

  • XYZ (ArrayLike) – CIE XYZ tristimulus values.
  • illuminant_XYZ (ArrayLike) – CIE xy chromaticity coordinates or CIE xyY colourspace array of the illuminant for the input CIE XYZ tristimulus values.
  • illuminant_RGB (ArrayLike) – CIE xy chromaticity coordinates or CIE xyY colourspace array of the illuminant for the output RGB colourspace array.
  • matrix_XYZ_to_RGB (ArrayLike) – Matrix converting the CIE XYZ tristimulus values to RGB colourspace array, i.e. the inverse Normalised Primary Matrix (NPM).
  • chromatic_adaptation_transform (Literal['Bianco 2010', 'Bianco PC 2010', 'Bradford', 'CAT02 Brill 2008', 'CAT02', 'CAT16', 'CMCCAT2000', 'CMCCAT97', 'Fairchild', 'Sharp', 'Von Kries', 'XYZ Scaling'] | str | None) – Chromatic adaptation transform, if None no chromatic adaptation is performed.
  • cctf_encoding (Callable | None) – Encoding colour component transfer function (Encoding CCTF) or opto-electronic transfer function (OETF).

new version (from 0.4.3)

Parameters:

  • XYZ (ArrayLike) – CIE XYZ tristimulus values.
  • colourspace (RGB_Colourspace | LiteralRGBColourspace | str) – Output RGB colourspace.
  • illuminant (ArrayLike | None) – CIE xy chromaticity coordinates or CIE xyY colourspace array of the illuminant for the input CIE XYZ tristimulus values.
  • chromatic_adaptation_transform (LiteralChromaticAdaptationTransform | str | None) – Chromatic adaptation transform, if None no chromatic adaptation is performed.
  • apply_cctf_encoding (bool) – Apply the RGB colourspace encoding colour component transfer function / opto-electronic transfer function.
  • args (Any) – Arguments for deprecation management.
  • kwargs (Any) – Keywords arguments for deprecation management.

existing colour.XYZ_to_RGB has been deprecated and need to be updated.

old version (before 0.4.3)
Parameters:
- XYZ (ArrayLike) – CIE XYZ tristimulus values.
- illuminant_XYZ (ArrayLike) – CIE xy chromaticity coordinates or CIE xyY colourspace array of the illuminant for the input CIE XYZ tristimulus values.
- illuminant_RGB (ArrayLike) – CIE xy chromaticity coordinates or CIE xyY colourspace array of the illuminant for the output RGB colourspace array.
- matrix_XYZ_to_RGB (ArrayLike) – Matrix converting the CIE XYZ tristimulus values to RGB colourspace array, i.e. the inverse Normalised Primary Matrix (NPM).
- chromatic_adaptation_transform (Literal['Bianco 2010', 'Bianco PC 2010', 'Bradford', 'CAT02 Brill 2008', 'CAT02', 'CAT16', 'CMCCAT2000', 'CMCCAT97', 'Fairchild', 'Sharp', 'Von Kries', 'XYZ Scaling'] | str | None) – Chromatic adaptation transform, if None no chromatic adaptation is performed.
- cctf_encoding (Callable | None) – Encoding colour component transfer function (Encoding CCTF) or opto-electronic transfer function (OETF).

new version (from 0.4.3)
- XYZ (ArrayLike) – CIE XYZ tristimulus values.
- colourspace (RGB_Colourspace | LiteralRGBColourspace | str) – Output RGB colourspace.
- illuminant (ArrayLike | None) – CIE xy chromaticity coordinates or CIE xyY colourspace array of the illuminant for the input CIE XYZ tristimulus values.
- chromatic_adaptation_transform (LiteralChromaticAdaptationTransform | str | None) – Chromatic adaptation transform, if None no chromatic adaptation is performed.
- apply_cctf_encoding (bool) – Apply the RGB colourspace encoding colour component transfer function / opto-electronic transfer function.
- args (Any) – Arguments for deprecation management.
- kwargs (Any) – Keywords arguments for deprecation management.
@DevTGHa DevTGHa requested a review from davisadam10 September 2, 2025 13:49
@DevTGHa DevTGHa self-assigned this Sep 2, 2025
@DevTGHa DevTGHa added the bug Something isn't working label Sep 2, 2025
@davisadam10 davisadam10 merged commit 51fd637 into main Sep 4, 2025
12 checks passed
@davisadam10 davisadam10 deleted the fix-colour-XYZ-to-RGB branch September 4, 2025 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants