embcol.color.gamut_map

embcol.color.gamut_map(oklab, *, copy=True)[source]

Map Oklab colors into the gamut of the sRGB color space.

Parameters:
  • oklab (array-like of float) – Oklab colors to be mapped. The shape must be (3,) or (N, 3), where N is the number of colors. A given object can be overwritten with an output if copy is not True.

  • copy (bool or None, optional) – If True is given, oklab is always copied. If None is given, oklab is copied only if needed. If False is given, oklab is not copied and an error is raised if copying is needed.

Returns:

numpy.ndarray of float – Mapped Oklab colors. The shape is the same as oklab.