code: def _rgb_vector(color):
      """Return RGB color as (1, 3) array.
  
      This RGB array gets multiplied by masked regions of an RGB image, which are
      partially flattened by masking (i.e. dimensions 2D + RGB -> 1D + RGB).
  
      Parameters
      ----------
      color : str or array
          Color name in ``skimage.color.color_dict`` or RGB float values between [0, 1].
      """
      if isinstance(color, str):
          color = color_dict[color]
      # Slice to handle RGBA colors.
      return np.array(color[:3])
  
file_path: scikit-image/skimage/color/colorlabel.py
imports: import itertools
  import numpy
  from .._shared.utils import _supported_float_type, warn
  from ..util import img_as_float
  from .None import rgb_colors
  from .colorconv import gray2rgb, rgb2hsv, hsv2rgb
label_desc: Use image node_id 1 for calling a global function with example usage: _rgb_vector(color) and returns: np