A color blind/friendly color cycle for Matplotlib line plots.

Might want to shuffle it around a bit more,but already not it gives kinda good contrasts between subsequent colors, and shows reasonably well in colorblind filters (though not in pure monochrome). (original) (raw)

And if you want to convert to rgba for e.g., plotly, here are the rgb values:

opacity = 0.5
colors = {
    'blue':   [55,  126, 184],  #377eb8 
    'orange': [255, 127, 0],    #ff7f00
    'green':  [77,  175, 74],   #4daf4a
    'pink':   [247, 129, 191],  #f781bf
    'brown':  [166, 86,  40],   #a65628
    'purple': [152, 78,  163],  #984ea3
    'gray':   [153, 153, 153],  #999999
    'red':    [228, 26,  28],   #e41a1c
    'yellow': [222, 222, 0]     #dede00
}  
c_str = {k:f'rgba({v[0]},{v[1]},{v[2]},{opacity})'
         for (k, v) in colors.items()}
c_str['yellow']  # Gives the rgba string for 'yellow'