Image.colordict2str#

static Image.colordict2str(cdict: dict[str, int]) str[source][source]#

Convert a color dictionary to a color order string

Parameters:

cdict (dict) – dictionary mapping color names to plane indices

Returns:

color channel names in plane order as a colon-separated string

Return type:

str

Example:

>>> from machinevisiontoolbox import Image
>>> Image.colordict2str({'R': 0, 'G': 1, 'B': 2})
'R:G:B'

Note

The color planes are sorted by their index value. There is no check that the lowest plane index is zero.

Seealso:

colordict2list colororder2dict

AUTO_EDIT