Ticket #8: auto-lighting.diff

File auto-lighting.diff, 0.7 kB (added by jae@…, 4 years ago)

color.py patch adjusting colorscheme lightness

  • color.py

     
    4848            clamp(0.0, 1.0, g + amount), 
    4949            clamp(0.0, 1.0, b + amount)) 
    5050     
    51 def generateColorscheme(masterColor, keys, light=0.098): 
     51def generateColorscheme(masterColor, keys): 
    5252    """Generates a dictionary where the keys match the keys argument and 
    5353    the values are colors derivated from the masterColor. 
    5454 
     
    5858    The masterColor is given in a hex string format. 
    5959    """ 
    6060    r, g, b = hex2rgb(masterColor) 
     61    light = 1.0 / (len(keys)*2) 
    6162    return dict([(key, lighten(r, g, b, light * i)) 
    6263                 for i, key in enumerate(keys)]) 
    6364