embcol.color.pairwise_color_diffs¶
- embcol.color.pairwise_color_diffs(oklabs, *, squared=False)[source]¶
Measure color differences among a set of colors.
- Parameters:
oklabs (array-like of
float) – Set of Oklab colors. The shape must be(N, 3), whereNis the number of colors.squared (
bool, optional) – IfTrueis given, squared values are returned.
- Returns:
numpy.ndarrayoffloat– Color differences. If squared isTrue, values are squared color differences instead. The shape is((N-1)*N//2,): only off-diagonal elements above the main diagonal of a distance matrix is returned. Items are in row-major order.