class_docstr: convert images from one color-space to another, like BGR ↔ Gray, BGR ↔ HSV, etc.
  Args:
      mode (`str`):
          The target color space type, for example, 'RGB'.
  
  Returns (`numpy.ndarray`):
      The coverted image.
  
  Raise:
      ValueError:
          ValueError occurs if the color conversion is not supported.
  
  Examples:
  
  >>> import numpy as np
  >>> from towhee.operator import PyOperator
  >>> from towhee.types import Image, arg, to_image_color
  >>> class ExtractRed(PyOperator):
  ...     def __init__(self) -> None:
  ...         super().__init__()
  ...     @arg(0, to_image_color('BGR'))
  ...     def __call__(self, img):
  ...         red_img = Image(np.zeros(img.shape), 'BGR')
  ...         red_img[:,:,2] = img[:,:,2]
  ...         return red_img
class_docstr_tok: ["convert","images","from","one","color-space","to","another",",","like","BGR","\u2194","Gray",",","BGR","\u2194","HSV",",","etc",".","Args",":","mode","(","`","str","`",")",":","The","target","color","space","type",",","for","example",",","'RGB","'",".","Returns","(","`","numpy.ndarray","`",")",":","The","coverted","image",".","Raise",":","ValueError",":","ValueError","occurs","if","the","color","conversion","is","not","supported",".","Examples",":",">",">",">","import","numpy","as","np",">",">",">","from","towhee.operator","import","PyOperator",">",">",">","from","towhee.types","import","Image",",","arg",",","to_image_color",">",">",">","class","ExtractRed","(","PyOperator",")",":","...","def","__init__","(","self",")","-",">","None",":","...","super","(",")",".__init__","(",")","...","@","arg","(","0",",","to_image_color","(","'BGR","'",")",")","...","def","__call__","(","self",",","img",")",":","...","red_img","=","Image","(","np.zeros","(","img.shape",")",",","'BGR","'",")","...","red_img","[",":",",",":",",2","]","=","img","[",":",",",":",",2","]","...","return","red_img"]
code: def __call__(self, img):
      # pylint: disable=import-outside-toplevel
      from towhee.types import image_utils
  
      return image_utils.to_image_color(img, self._mode)
  
imports: from functools import wraps
  from typing import Callable
label_desc: Use image node_id 2 for calling the to_image_color obj's underlying member method code with example usage: obj.__call__(img) and returns: image_utils