import matplotlib.pyplot as plt cmap = plt.cm.get_cmap('Spectral') rgba = cmap(0.75) print(rgba) # (0.5273356401384084, 0.8106113033448674, 0.6452133794694349, 1.0)