I can convert an image from RGB color space to LAB color space using skimage.color.rgb2lab(). But when I try converting a single RGB triplet to LAB triplet
rgb_color = [0.1,0.2,0.3]
lab_color = color.rgb2lab(rgb_color)
ValueError: the input array must be have a shape == (.., ..,[ ..,] 3)), got (3)
rgb2lab() expects a 3D (or 4D) image; you're passing it a 1D list of numbers.
Try giving it a one-pixel image:
rgb_color = [[[0.1,0.2,0.3]]] lab_color = color.rgb2lab(rgb_color)