code: def color_val(color):
      """Convert various input to color tuples.
  
      Args:
          color (:obj:`Color`/str/tuple/int/ndarray): Color inputs
  
      Returns:
          tuple[int]: A tuple of 3 integers indicating BGR channels.
      """
      if is_str(color):
          return Color[color].value
      elif isinstance(color, Color):
          return color.value
      elif isinstance(color, tuple):
          assert len(color) == 3
          for channel in color:
              assert 0 <= channel <= 255
          return color
      elif isinstance(color, int):
          assert 0 <= color <= 255
          return color, color, color
      elif isinstance(color, np.ndarray):
          assert color.ndim == 1 and color.size == 3
          assert np.all((color >= 0) & (color <= 255))
          color = color.astype(np.uint8)
          return tuple(color)
      else:
          raise TypeError(f"Invalid type for color: {type(color)}")
  
imports: from enum import Enum
  import numpy
  from annotator.uniformer.mmcv.utils import is_str
label_desc: Use image node_id 1 for calling a global function with example usage: color_val(color) and returns: Color, color, color, color,  color,  color, tuple