!pip install colors
########
def make_Ramp( ramp_colors ):
from colour import Color
from matplotlib.colors import LinearSegmentedColormap
color_ramp = LinearSegmentedColormap.from_list( 'my_list', [ Color( c1 ).rgb for c1 in ramp_colors ] )
plt.figure( figsize = (15,3))
plt.imshow( [list(np.arange(0, len( ramp_colors ) , 0.1)) ] , interpolation='nearest', origin='lower', cmap= color_ramp )
plt.xticks([])
plt.yticks([])
return color_ramp
custom_ramp = make_Ramp( ['#0000ff','#00ffff','#ffff00','#ff0000' ] )
#nice 10 colour ramp
#custom_ramp = make_Ramp( ['#00188f','#00bcf2','#00b294','#009e49','#bad80a', '#fff100', '#ff8c00','#e81123','#ec008c', '#68217a' ] )