title: How to make the color of one end of colorbar darker in matplotlib?
body: <p>Say I have the following plot:</p>
  
  <pre><code>import numpy as np
  import matplotlib.pyplot as plt    
  
  np.random.seed(1)
  data =  np.sort(np.random.rand(8,12))
  plt.figure()
  c = plt.pcolor(data, edgecolors='k', linewidths=4, cmap='Blues', vmin=0.0, vmax=1.0)
  plt.colorbar(c)
  plt.show()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/rRHlS.png" rel="noreferrer"><img src="https://i.stack.imgur.com/rRHlS.png" alt="enter image description here"></a></p>
  
  <p>The colorbar has the (almost) white color assigned to the lowest values. How do I make it slightly darker? I want that instead of the colorbar ranging from white to blue, it should range from light blue to dark blue. Like, the color for the value 0 should be something like what it is for the value 0.4 in the plot above.</p>
  
  <p>I found <a href="https://stackoverflow.com/questions/37517587/how-can-i-change-the-intensity-of-a-colormap-in-matplotlib">this</a> when searching about it, but the question (and the solutions) is about making all the colors darker, which is not what I am looking for.</p>