Image.colordict2list#

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

Convert a color dictionary to a list of color plane names

Parameters:

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

Returns:

list of color channels in plane order

Return type:

list

Example:

>>> from machinevisiontoolbox import Image
>>> Image.colordict2list({'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:

colordict2str colororder2dict