code: def _rgb_to_hex(rgbs):
      """Convert rgb to hex triplet"""
      rgbs, n_dim = _check_color_dim(rgbs)
      return np.array(
          [
              "#%02x%02x%02x" % tuple((255 * rgb[:3]).astype(np.uint8))
              for rgb in rgbs
          ],
          "|U7",
      )
  
file_path: vispy/vispy/color/color_space.py
imports: from __future__ import division
  import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: _rgb_to_hex(rgbs) and returns: np