chromatictools.colors module

Utilities for color handling

chromatictools.colors.hsv2rgb(h: float, s: float, v: float) Tuple[int, int, int]

Convert HSV to RGB

Parameters
  • h (float) – Hue (degrees)

  • s (float) – Saturation (between 0 and 1)

  • v (float) – Value (between 0 and 1)

Returns

tuple of int: RGB values (between 0 and 255)

chromatictools.colors.rgb2hex(r: int, g: int, b: int) str

Convert RGB integers to hexadecimal string

Parameters
  • r (int) – Red (between 0 and 255)

  • g (int) – Green (between 0 and 255)

  • b (int) – Blue (between 0 and 255)

Returns

str: Hexadecimal string