colorsys

Subset of CPython module colorsys for use in CircuitPython.

Conversion functions between RGB and other color systems

  • Author(s): Python Software Foundation

Implementation Notes

Software and Dependencies:

colorsys.hls_to_rgb(hue: float, light: float, sat: float) Tuple[float, float, float]

Converts HLS to RGB values

Parameters:
  • hue (float) – The hue of the color to convert

  • light (float) – The lightness of the color to convert

  • sat (float) – The saturation of the color to convert

colorsys.hsv_to_rgb(hue: float, sat: float, val: float) Tuple[float, float, float]

Converts HSV to RGB values

Parameters:
  • hue (float) – The hue of the color to convert

  • sat (float) – The saturation of the color to convert

  • val (float) – The value (or brightness) of the color to convert