(folder, width=720, height=80)
Save each colour map as a gradient in a folder.
Save each colour map as a gradient in a folder.
Save each colour map as a gradient in a folder .
def gradient_preview(folder, width=720, height=80):
    """Save each colour map as a gradient in a folder."""
    
    for map_lowercase, data in iteritems(parse_colour_file()['Maps']):
        colours = calculate_colour_map(map_lowercase)
        image = ColourRange(0, 1, colours)._preview_gradient(width, height)
        if data['Type']['tracks']:
            image.save(join_path((folder, 'Tracks', '{}.png'.format(data['UpperCase'])), create=True))
        if data['Type']['clicks']:
            image.save(join_path((folder, 'Clicks', '{}.png'.format(data['UpperCase'])), create=True))
        if data['Type']['keyboard']:
            image.save(join_path((folder, 'Keyboard', '{}.png'.format(data['UpperCase'])), create=True))
def gradient_preview ( folder , width = 720 , height = 80 ) : for map_lowercase , data in iteritems ( parse_colour_file ( ) [ 'Maps' ] ) : colours = calculate_colour_map ( map_lowercase ) image = ColourRange ( 0 , 1 , colours ) . _preview_gradient ( width , height ) if data [ 'Type' ] [ 'tracks' ] : image . save ( join_path ( ( folder , 'Tracks' , '{}.png' . format ( data [ 'UpperCase' ] ) ) , create = True ) ) if data [ 'Type' ] [ 'clicks' ] : image . save ( join_path ( ( folder , 'Clicks' , '{}.png' . format ( data [ 'UpperCase' ] ) ) , create = True ) ) if data [ 'Type' ] [ 'keyboard' ] : image . save ( join_path ( ( folder , 'Keyboard' , '{}.png' . format ( data [ 'UpperCase' ] ) ) , create = True ) )