class_docstr: RGB represents a regularly spaced 2D grid of an underlying
  continuous space of RGB(A) (red, green, blue and alpha) color
  space values. The definition of the grid closely matches the
  semantics of an Image and in the simplest case the grid may be
  specified as a NxMx3 or NxMx4 array of values along with a bounds,
  but it may also be defined through explicit and regularly spaced
  x/y-coordinate arrays. The two most basic supported constructors
  of an RGB element therefore include:
  
      RGB((X, Y, R, G, B))
  
  where X is a 1D array of shape M, Y is a 1D array of shape N and
  R/G/B are 2D array of shape NxM, or equivalently:
  
      RGB(Z, bounds=(x0, y0, x1, y1))
  
  where Z is a 3D array of stacked R/G/B arrays with shape NxMx3/4
  and the bounds define the (left, bottom, top, right) edges of the
  four corners of the grid. Other gridded formats which support
  declaring of explicit x/y-coordinate arrays such as xarray are
  also supported.
  
  Note that the interpretation of the orientation changes depending
  on whether bounds or explicit coordinates are used.
class_docstr_tok: ["RGB","represents","a","regularly","spaced","2D","grid","of","an","underlying","continuous","space","of","RGB","(","A",")","(","red",",","green",",","blue","and","alpha",")","color","space","values",".","The","definition","of","the","grid","closely","matches","the","semantics","of","an","Image","and","in","the","simplest","case","the","grid","may","be","specified","as","a","NxMx3","or","NxMx4","array","of","values","along","with","a","bounds",",","but","it","may","also","be","defined","through","explicit","and","regularly","spaced","x\/y-coordinate","arrays",".","The","two","most","basic","supported","constructors","of","an","RGB","element","therefore","include",":","RGB","(","(","X",",","Y",",","R",",","G",",","B",")",")","where","X","is","a","1D","array","of","shape","M",",","Y","is","a","1D","array","of","shape","N","and","R\/G\/B","are","2D","array","of","shape","NxM",",","or","equivalently",":","RGB","(","Z",",","bounds=","(","x0",",","y0",",","x1",",","y1",")",")","where","Z","is","a","3D","array","of","stacked","R\/G\/B","arrays","with","shape","NxMx3\/4","and","the","bounds","define","the","(","left",",","bottom",",","top",",","right",")","edges","of","the","four","corners","of","the","grid",".","Other","gridded","formats","which","support","declaring","of","explicit","x\/y-coordinate","arrays","such","as","xarray","are","also","supported",".","Note","that","the","interpretation","of","the","orientation","changes","depending","on","whether","bounds","or","explicit","coordinates","are","used","."]
docstr: Returns the corresponding RGB element.
  
  Other than the updating parameter definitions, this is the
  only change needed to implemented an arbitrary colorspace as a
  subclass of RGB.
docstr_tok: ["Returns","the","corresponding","RGB","element",".","Other","than","the","updating","parameter","definitions",",","this","is","the","only","change","needed","to","implemented","an","arbitrary","colorspace","as","a","subclass","of","RGB","."]
code: def rgb(self):
      """
      Returns the corresponding RGB element.
  
      Other than the updating parameter definitions, this is the
      only change needed to implemented an arbitrary colorspace as a
      subclass of RGB.
      """
      return self
  
imports: import colorsys
  from copy import deepcopy
  from operator import itemgetter
  import numpy
  import param
  from ..core import Dataset, Dimension, Element2D, Overlay, config, util
  from ..core.boundingregion import BoundingBox, BoundingRegion
  from ..core.data import ImageInterface
  from ..core.data.interface import DataError
  from ..core.dimension import dimension_name
  from ..core.sheetcoords import SheetCoordinateSystem, Slice
  from .chart import Curve
  from .geom import Selection2DExpr
  from .graphs import TriMesh
  from .tabular import Table
  from .util import categorical_aggregate2d, compute_slice_bounds
label_desc: Use image node_id 1 for calling the RGB obj's underlying member method code with example usage: obj.rgb() and returns: self