code: def _as_rgba(intensity_or_color, default_rgb=(1.0, 1.0, 1.0)):
      """Create an RGBA color from a color or a scalar intensity.
  
      Examples
      --------
      >>> # Specify the full RGBA color.
      >>> _as_rgba((0.2, 0.3, 0.4, 0.25))
      ... <Color: (0.2, 0.3, 0.4, 0.25)>
      >>> # Specify an RGB color. (Default intensity `1.0` is used.)
      >>> _as_rgba((0.2, 0.3, 0.4))
      ... <Color: (0.2, 0.3, 0.4, 1.0)>
      >>> # Specify an intensity only. (Default color `(1.0, 1.0, 1.0)` is used.)
      >>> _as_rgba(0.25)
      ... <Color: (1.0, 1.0, 1.0, 0.25)>
      """
      if isinstance(intensity_or_color, numbers.Number):
          intensity = intensity_or_color
          return Color(default_rgb, alpha=intensity)
      color = intensity_or_color
      return Color(color)
  
imports: import numbers
  import numpy
  from vispy.gloo import Texture2D, VertexBuffer
  from vispy.visuals.shaders import Function, Varying
  from vispy.visuals.filters import Filter, PrimitivePickingFilter
  from ...color import Color
label_desc: Use image node_id 1 for calling a global function with example usage: _as_rgba(intensity_or_color, default_rgb) and returns: Color, Color