colour.describe_conversion_path#

colour.describe_conversion_path(source: str, target: str, mode: Literal['Short', 'Long', 'Extended'] | str = 'Short', width: int = 79, padding: int = 3, print_callable: Callable = print, **kwargs: Any)[source]#

Describe the conversion path from source colour representation to target colour representation using the automatic colour conversion graph.

Parameters:
  • source (str) – Source colour representation, i.e., the source node in the automatic colour conversion graph.

  • target (str) – Target colour representation, i.e., the target node in the automatic colour conversion graph.

  • mode (Literal['Short', 'Long', 'Extended'] | str) – Verbose mode: Short describes the conversion path, Long provides details about the arguments, definitions signatures and output values, Extended appends the definitions’ documentation.

  • width (int) – Message box width.

  • padding (int) – Padding on each side of the message.

  • print_callable (Callable) – Callable used to print the message box.

  • kwargs (Any) – {colour.convert()}, See the documentation of the previously listed definition.

Examples

>>> describe_conversion_path("Spectral Distribution", "sRGB", width=75)
===========================================================================
*                                                                         *
*   [ Conversion Path ]                                                   *
*                                                                         *
*   "sd_to_XYZ" --> "XYZ_to_sRGB"                                         *
*                                                                         *
===========================================================================