def cubehelix(start=0.5, rot=1, gamma=1.0, reverse=True, nlev=256.0, minSat=1.2, maxSat=1.2, minLight=0.0, maxLight=1.0, **kwargs):
 if (kwargs is not None):
  if ('startHue' in kwargs):
   start = (((kwargs.get('startHue') / 360.0) - 1.0) * 3.0)
  if ('endHue' in kwargs):
   rot = (((kwargs.get('endHue') / 360.0) - (start / 3.0)) - 1.0)
  if ('sat' in kwargs):
   minSat = kwargs.get('sat')
   maxSat = kwargs.get('sat')
 fract = np.linspace(minLight, maxLight, nlev)
 angle = ((2.0 * pi) * (((start / 3.0) + (rot * fract)) + 1.0))
 fract = (fract ** gamma)
 satar = np.linspace(minSat, maxSat, nlev)
 amp = (((satar * fract) * (1.0 - fract)) / 2.0)
 red = (fract + (amp * (((-0.14861) * np.cos(angle)) + (1.78277 * np.sin(angle)))))
 grn = (fract + (amp * (((-0.29227) * np.cos(angle)) - (0.90649 * np.sin(angle)))))
 blu = (fract + (amp * (1.97294 * np.cos(angle))))
 red[np.where((red > 1.0))] = 1.0
 grn[np.where((grn > 1.0))] = 1.0
 blu[np.where((blu > 1.0))] = 1.0
 red[np.where((red < 0.0))] = 0.0
 grn[np.where((grn < 0.0))] = 0.0
 blu[np.where((blu < 0.0))] = 0.0
 if (reverse is True):
  red = red[::(-1)]
  blu = blu[::(-1)]
  grn = grn[::(-1)]
 return np.array((red, grn, blu)).T

def cubehelix ( start = 0.5 , rot = 1 , gamma = 1.0 , reverse = True , nlev = 256.0 , minSat = 1.2 , maxSat = 1.2 , minLight = 0.0 , maxLight = 1.0 , ** kwargs ) : if ( kwargs is not None ) : if ( 'startHue' in kwargs ) : start = ( ( ( kwargs . get ( 'startHue' ) / 360.0 ) - 1.0 ) * 3.0 ) if ( 'endHue' in kwargs ) : rot = ( ( ( kwargs . get ( 'endHue' ) / 360.0 ) - ( start / 3.0 ) ) - 1.0 ) if ( 'sat' in kwargs ) : minSat = kwargs . get ( 'sat' ) maxSat = kwargs . get ( 'sat' ) fract = np . linspace ( minLight , maxLight , nlev ) angle = ( ( 2.0 * pi ) * ( ( ( start / 3.0 ) + ( rot * fract ) ) + 1.0 ) ) fract = ( fract ** gamma ) satar = np . linspace ( minSat , maxSat , nlev ) amp = ( ( ( satar * fract ) * ( 1.0 - fract ) ) / 2.0 ) red = ( fract + ( amp * ( ( ( - 0.14861 ) * np . cos ( angle ) ) + ( 1.78277 * np . sin ( angle ) ) ) ) ) grn = ( fract + ( amp * ( ( ( - 0.29227 ) * np . cos ( angle ) ) - ( 0.90649 * np . sin ( angle ) ) ) ) ) blu = ( fract + ( amp * ( 1.97294 * np . cos ( angle ) ) ) ) red [ np . where ( ( red > 1.0 ) ) ] = 1.0 grn [ np . where ( ( grn > 1.0 ) ) ] = 1.0 blu [ np . where ( ( blu > 1.0 ) ) ] = 1.0 red [ np . where ( ( red < 0.0 ) ) ] = 0.0 grn [ np . where ( ( grn < 0.0 ) ) ] = 0.0 blu [ np . where ( ( blu < 0.0 ) ) ] = 0.0 if ( reverse is True ) : red = red [ : : ( - 1 ) ] blu = blu [ : : ( - 1 ) ] grn = grn [ : : ( - 1 ) ] return np . array ( ( red , grn , blu ) ) . T
return custom data dictionary of conversion functions .