docstr: Construct a new Colorscale object
  
  Parameters
  ----------
  arg
      dict of properties compatible with this constructor or
      an instance of
      :class:`plotly.graph_objs.sankey.link.Colorscale`
  cmax
      Sets the upper bound of the color domain.
  cmin
      Sets the lower bound of the color domain.
  colorscale
      Sets the colorscale. The colorscale must be an array
      containing arrays mapping a normalized value to an rgb,
      rgba, hex, hsl, hsv, or named color string. At minimum,
      a mapping for the lowest (0) and highest (1) values are
      required. For example, `[[0, 'rgb(0,0,255)'], [1,
      'rgb(255,0,0)']]`. To control the bounds of the
      colorscale in color space, use`cmin` and `cmax`.
      Alternatively, `colorscale` may be a palette name
      string of the following list: Greys,YlGnBu,Greens,YlOrR
      d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H
      ot,Blackbody,Earth,Electric,Viridis,Cividis.
  label
      The label of the links to color based on their
      concentration within a flow.
  name
      When used in a template, named items are created in the
      output figure in addition to any items the figure
      already has in this array. You can modify these items
      in the output figure by making your own item with
      `templateitemname` matching this `name` alongside your
      modifications (including `visible: false` or `enabled:
      false` to hide it). Has no effect outside of a
      template.
  templateitemname
      Used to refer to a named item in this array in the
      template. Named items from the template will be created
      even without a matching item in the input figure, but
      you can modify one by making an item with
      `templateitemname` matching its `name`, alongside your
      modifications (including `visible: false` or `enabled:
      false` to hide it). If there is no template or no
      matching item, this item will be hidden unless you
      explicitly show it with `visible: true`.
  
  Returns
  -------
  Colorscale
docstr_tok: ["Construct","a","new","Colorscale","object","Parameters","--","--","--","--","--","arg","dict","of","properties","compatible","with","this","constructor","or","an","instance","of",":","class",":","`","plotly.graph_objs.sankey.link.Colorscale","`","cmax","Sets","the","upper","bound","of","the","color","domain",".","cmin","Sets","the","lower","bound","of","the","color","domain",".","colorscale","Sets","the","colorscale",".","The","colorscale","must","be","an","array","containing","arrays","mapping","a","normalized","value","to","an","rgb",",","rgba",",","hex",",","hsl",",","hsv",",","or","named","color","string",".","At","minimum",",","a","mapping","for","the","lowest","(","0",")","and","highest","(","1",")","values","are","required",".","For","example",",","`","[","[","0",",","'rgb","(","0,0,255",")","'","]",",","[","1",",","'rgb","(","255,0,0",")","'","]","]","`",".","To","control","the","bounds","of","the","colorscale","in","color","space",",","use","`","cmin","`","and","`","cmax","`",".","Alternatively",",","`","colorscale","`","may","be","a","palette","name","string","of","the","following","list",":","Greys",",","YlGnBu",",","Greens",",","YlOrR","d",",","Bluered",",","RdBu",",","Reds",",","Blues",",","Picnic",",","Rainbow",",","Portland",",","Jet",",","H","ot",",","Blackbody",",","Earth",",","Electric",",","Viridis",",","Cividis",".","label","The","label","of","the","links","to","color","based","on","their","concentration","within","a","flow",".","name","When","used","in","a","template",",","named","items","are","created","in","the","output","figure","in","addition","to","any","items","the","figure","already","has","in","this","array",".","You","can","modify","these","items","in","the","output","figure","by","making","your","own","item","with","`","templateitemname","`","matching","this","`","name","`","alongside","your","modifications","(","including","`","visible",":","false","`","or","`","enabled",":","false","`","to","hide","it",")",".","Has","no","effect","outside","of","a","template",".","templateitemname","Used","to","refer","to","a","named","item","in","this","array","in","the","template",".","Named","items","from","the","template","will","be","created","even","without","a","matching","item","in","the","input","figure",",","but","you","can","modify","one","by","making","an","item","with","`","templateitemname","`","matching","its","`","name","`",",","alongside","your","modifications","(","including","`","visible",":","false","`","or","`","enabled",":","false","`","to","hide","it",")",".","If","there","is","no","template","or","no","matching","item",",","this","item","will","be","hidden","unless","you","explicitly","show","it","with","`","visible",":","true","`",".","Returns","--","--","--","-","Colorscale"]
code: def __init__(
      self,
      arg=None,
      cmax=None,
      cmin=None,
      colorscale=None,
      label=None,
      name=None,
      templateitemname=None,
      **kwargs,
  ):
      """
      Construct a new Colorscale object
  
      Parameters
      ----------
      arg
          dict of properties compatible with this constructor or
          an instance of
          :class:`plotly.graph_objs.sankey.link.Colorscale`
      cmax
          Sets the upper bound of the color domain.
      cmin
          Sets the lower bound of the color domain.
      colorscale
          Sets the colorscale. The colorscale must be an array
          containing arrays mapping a normalized value to an rgb,
          rgba, hex, hsl, hsv, or named color string. At minimum,
          a mapping for the lowest (0) and highest (1) values are
          required. For example, `[[0, 'rgb(0,0,255)'], [1,
          'rgb(255,0,0)']]`. To control the bounds of the
          colorscale in color space, use`cmin` and `cmax`.
          Alternatively, `colorscale` may be a palette name
          string of the following list: Greys,YlGnBu,Greens,YlOrR
          d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H
          ot,Blackbody,Earth,Electric,Viridis,Cividis.
      label
          The label of the links to color based on their
          concentration within a flow.
      name
          When used in a template, named items are created in the
          output figure in addition to any items the figure
          already has in this array. You can modify these items
          in the output figure by making your own item with
          `templateitemname` matching this `name` alongside your
          modifications (including `visible: false` or `enabled:
          false` to hide it). Has no effect outside of a
          template.
      templateitemname
          Used to refer to a named item in this array in the
          template. Named items from the template will be created
          even without a matching item in the input figure, but
          you can modify one by making an item with
          `templateitemname` matching its `name`, alongside your
          modifications (including `visible: false` or `enabled:
          false` to hide it). If there is no template or no
          matching item, this item will be hidden unless you
          explicitly show it with `visible: true`.
  
      Returns
      -------
      Colorscale
      """
      super(Colorscale, self).__init__("colorscales")
  
      if "_parent" in kwargs:
          self._parent = kwargs["_parent"]
          return
  
      # Validate arg
      # ------------
      if arg is None:
          arg = {}
      elif isinstance(arg, self.__class__):
          arg = arg.to_plotly_json()
      elif isinstance(arg, dict):
          arg = _copy.copy(arg)
      else:
          raise ValueError(
              """\
  The first argument to the plotly.graph_objs.sankey.link.Colorscale 
  constructor must be a dict or 
  an instance of :class:`plotly.graph_objs.sankey.link.Colorscale`"""
          )
  
      # Handle skip_invalid
      # -------------------
      self._skip_invalid = kwargs.pop("skip_invalid", False)
      self._validate = kwargs.pop("_validate", True)
  
      # Populate data dict with properties
      # ----------------------------------
      _v = arg.pop("cmax", None)
      _v = cmax if cmax is not None else _v
      if _v is not None:
          self["cmax"] = _v
      _v = arg.pop("cmin", None)
      _v = cmin if cmin is not None else _v
      if _v is not None:
          self["cmin"] = _v
      _v = arg.pop("colorscale", None)
      _v = colorscale if colorscale is not None else _v
      if _v is not None:
          self["colorscale"] = _v
      _v = arg.pop("label", None)
      _v = label if label is not None else _v
      if _v is not None:
          self["label"] = _v
      _v = arg.pop("name", None)
      _v = name if name is not None else _v
      if _v is not None:
          self["name"] = _v
      _v = arg.pop("templateitemname", None)
      _v = templateitemname if templateitemname is not None else _v
      if _v is not None:
          self["templateitemname"] = _v
  
      # Process unknown kwargs
      # ----------------------
      self._process_kwargs(**dict(arg, **kwargs))
  
      # Reset skip_invalid
      # ------------------
      self._skip_invalid = False
  
file_path: catboost/contrib/python/plotly/py2/plotly/graph_objs/sankey/link/_colorscale.py
imports: from plotly.basedatatypes import BaseTraceHierarchyType
  import copy
label_desc: Use image node_id 14 to create a new Colorscale object from inherited base classes: _BaseTraceHierarchyType with example: obj = Colorscale(arg, cmax, cmin, colorscale, label, name, templateitemname)