class_docstr: Parametric Style base class for all the parametric operations
docstr: Initialization of the parametric style.
  
  This takes several parameters:
    * a `step` which correspond on how many colors will be needed
    * a `max_` which defines the maximum amplitude of the color effect
    * a `base_style` which will be taken as default for everything
      except colors
    * any keyword arguments setting other style parameters
docstr_tok: ["Initialization","of","the","parametric","style",".","This","takes","several","parameters",":","*","a","`","step","`","which","correspond","on","how","many","colors","will","be","needed","*","a","`","max_","`","which","defines","the","maximum","amplitude","of","the","color","effect","*","a","`","base_style","`","which","will","be","taken","as","default","for","everything","except","colors","*","any","keyword","arguments","setting","other","style","parameters"]
code: def __init__(
      self, color, step=10, max_=None, base_style=None, **kwargs
  ):
      """
      Initialization of the parametric style.
  
      This takes several parameters:
        * a `step` which correspond on how many colors will be needed
        * a `max_` which defines the maximum amplitude of the color effect
        * a `base_style` which will be taken as default for everything
          except colors
        * any keyword arguments setting other style parameters
      """
  
      if self._op is None:
          raise RuntimeError("ParametricStyle is not instanciable")
  
      defaults = {}
      if base_style is not None:
          if isinstance(base_style, type):
              base_style = base_style()
          defaults.update(base_style.to_dict())
      defaults.update(kwargs)
  
      super(ParametricStyleBase, self).__init__(**defaults)
  
      if max_ is None:
          violency = {
              "darken": 50,
              "lighten": 50,
              "saturate": 100,
              "desaturate": 100,
              "rotate": 360,
          }
          max_ = violency[self._op]
  
      def modifier(index):
          percent = max_ * index / (step - 1)
          return getattr(colors, self._op)(color, percent)
  
      self.colors = list(map(modifier, range(0, max(2, step))))
  
imports: from __future__ import division
  from itertools import chain
  from pygal import colors
  from pygal.colors import darken, is_foreground_light, lighten
label_desc: Use image node_id 1 to create a new ParametricStyleBase object from inherited base classes: Style with example: obj = ParametricStyleBase(color, step, max_, base_style)