to_xyz

to_xyz(color, space='hcl')[source]

Translate color in any format to a tuple of channel values in any colorspace. This is the inverse of to_rgb.

Parameters
  • color (color-spec) – The color. Sanitized with to_rgba.

  • space ({'hcl', 'hpl', 'hsl', 'hsv', 'rgb'}, optional) – The colorspace for the output channel values.

Returns

color (3-tuple) – Tuple of channel values for the colorspace space.