class_docstr: An array of colors
  
  Parameters
  ----------
  color : str | tuple | list of colors
      If str, can be any of the names in ``vispy.color.get_color_names``.
      Can also be a hex value if it starts with ``'#'`` as ``'#ff0000'``.
      If array-like, it must be an Nx3 or Nx4 array-like object.
      Can also be a list of colors, such as
      ``['red', '#00ff00', ColorArray('blue')]``.
  alpha : float | None
      If no alpha is not supplied in ``color`` entry and ``alpha`` is None,
      then this will default to 1.0 (opaque). If float, it will override
      any alpha values in ``color``, if provided.
  clip : bool
      Clip the color value.
  color_space : 'rgb' | 'hsv'
     'rgb' (default) : color tuples are interpreted as (r, g, b) components.
     'hsv' : color tuples are interpreted as (h, s, v) components.
  
  Examples
  --------
  There are many ways to define colors. Here are some basic cases:
  
      >>> from vispy.color import ColorArray
      >>> r = ColorArray('red')  # using string name
      >>> r
      <ColorArray: 1 color ((1.0, 0.0, 0.0, 1.0))>
      >>> g = ColorArray((0, 1, 0, 1))  # RGBA tuple
      >>> b = ColorArray('#0000ff')  # hex color
      >>> w = ColorArray()  # defaults to black
      >>> w.rgb = r.rgb + g.rgb + b.rgb
      >>>hsv_color = ColorArray(color_space="hsv", color=(0, 0, 0.5))
      >>>hsv_color
      <ColorArray: 1 color ((0.5, 0.5, 0.5, 1.0))>
      >>> w == ColorArray('white')
      True
      >>> w.alpha = 0
      >>> w
      <ColorArray: 1 color ((1.0, 1.0, 1.0, 0.0))>
      >>> rgb = ColorArray(['r', (0, 1, 0), '#0000FFFF'])
      >>> rgb
      <ColorArray: 3 colors ((1.0, 0.0, 0.0, 1.0) ... (1.0, 0.0, 0.0, 1.0))>
      >>> rgb == ColorArray(['red', '#00ff00', ColorArray('blue')])
      True
  
  Notes
  -----
  Under the hood, this class stores data in RGBA format suitable for use
  on the GPU.
class_docstr_tok: ["An","array","of","colors","Parameters","--","--","--","--","--","color",":","str","|","tuple","|","list","of","colors","If","str",",","can","be","any","of","the","names","in","``","vispy.color.get_color_names","``",".","Can","also","be","a","hex","value","if","it","starts","with","``","'","#","'","``","as","``","'","#","ff0000","'","``",".","If","array-like",",","it","must","be","an","Nx3","or","Nx4","array-like","object",".","Can","also","be","a","list","of","colors",",","such","as","``","[","'red","'",",","'","#","00ff00","'",",","ColorArray","(","'blue","'",")","]","``",".","alpha",":","float","|","None","If","no","alpha","is","not","supplied","in","``","color","``","entry","and","``","alpha","``","is","None",",","then","this","will","default","to","1.0","(","opaque",")",".","If","float",",","it","will","override","any","alpha","values","in","``","color","``",",","if","provided",".","clip",":","bool","Clip","the","color","value",".","color_space",":","'rgb","'","|","'hsv'","'rgb","'","(","default",")",":","color","tuples","are","interpreted","as","(","r",",","g",",","b",")","components",".","'hsv","'",":","color","tuples","are","interpreted","as","(","h",",","s",",","v",")","components",".","Examples","--","--","--","--","There","are","many","ways","to","define","colors",".","Here","are","some","basic","cases",":",">",">",">","from","vispy.color","import","ColorArray",">",">",">","r","=","ColorArray","(","'red","'",")","#","using","string","name",">",">",">","r","<","ColorArray",":","1","color","(","(","1.0",",","0.0",",","0.0",",","1.0",")",")",">",">",">",">","g","=","ColorArray","(","(","0",",","1",",","0",",","1",")",")","#","RGBA","tuple",">",">",">","b","=","ColorArray","(","'","#","0000ff","'",")","#","hex","color",">",">",">","w","=","ColorArray","(",")","#","defaults","to","black",">",">",">","w.rgb","=","r.rgb","+","g.rgb","+","b.rgb",">",">",">","hsv_color","=","ColorArray","(","color_space=","''","hsv","''",",","color=","(","0",",","0",",","0.5",")",")",">",">",">","hsv_color","<","ColorArray",":","1","color","(","(","0.5",",","0.5",",","0.5",",","1.0",")",")",">",">",">",">","w","==","ColorArray","(","'white","'",")","True",">",">",">","w.alpha","=","0",">",">",">","w","<","ColorArray",":","1","color","(","(","1.0",",","1.0",",","1.0",",","0.0",")",")",">",">",">",">","rgb","=","ColorArray","(","[","'","r","'",",","(","0",",","1",",","0",")",",","'","#","0000FFFF","'","]",")",">",">",">","rgb","<","ColorArray",":","3","colors","(","(","1.0",",","0.0",",","0.0",",","1.0",")","...","(","1.0",",","0.0",",","0.0",",","1.0",")",")",">",">",">",">","rgb","==","ColorArray","(","[","'red","'",",","'","#","00ff00","'",",","ColorArray","(","'blue","'",")","]",")","True","Notes","--","--","-","Under","the","hood",",","this","class","stores","data","in","RGBA","format","suitable","for","use","on","the","GPU","."]
docstr: Set the color using an Nx4 array of RGBA floats
docstr_tok: ["Set","the","color","using","an","Nx4","array","of","RGBA","floats"]
code: def rgba(self, val):
      """Set the color using an Nx4 array of RGBA floats"""
      # Note: all other attribute sets get routed here!
      # This method is meant to do the heavy lifting of setting data
      rgba = _user_to_rgba(val, expand=False)
      if self._rgba is None:
          self._rgba = rgba  # only on init
      else:
          self._rgba[:, : rgba.shape[1]] = rgba
  
imports: from __future__ import division
  import numpy
  from copy import deepcopy
  from ..util import logger
  from ._color_dict import _color_dict
  from .color_space import _hex_to_rgba, _rgb_to_hex, _rgb_to_hsv, _hsv_to_rgb, _rgb_to_lab, _lab_to_rgb
label_desc: Use image node_id 12 for calling the ColorArray obj's underlying member method code with example usage: obj.rgba(val) without return types