How can I change the intensity of a colormap in matplotlib?
<p>I use <a href="http://matplotlib.org/api/pyplot_api.html?highlight=pcolor#matplotlib.pyplot.pcolor" rel="noreferrer">matplotlib.pyplot.pcolor()</a> to plot a heatmap with matplotlib:</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='RdBu', vmin=0.0, vmax=1.0)
plt.colorbar(c)
plt.show()
</code></pre>

<p><a href="https://i.stack.imgur.com/n34iL.png" rel="noreferrer"><img src="https://i.stack.imgur.com/n34iL.png" alt="enter image description here"></a></p>

<p>How can I change the intensity of the <code>'RdBu'</code> colormap? E.g., if the color is <code>(0, 0, 1)</code>, it should be transformed into <code>(0, 0, 0.8)</code>. More generally, 
if the color is <code>(x, y, z)</code>, it should be transformed into <code>(ax, ay, az)</code>, where <code>a</code> is some scalar between zero and one.</p>