title: How to use correct cmap colors in nested pie chart in matplotlib
body: <p>How do I use the correct np.array of cmap that the inside colors correspond to shades of the outside colors in a nested pie chart in matplotlib? </p>
  
  <p>I tried using different arrays of cmap, but I don't understand how the arrays get transformed into cmap colors.   </p>
  
  <pre><code>import numpy as np
  import matplotlib.pyplot as plt
  
  y =np.array([17, 16, 10, 8 ,6, 5, 5, 4, 3,  17 ,2 ,1, 1, 3, 2 ])
  x = np.array([74 ,21 ,5])
  
  fig, ax = plt.subplots()
  
  size = 0.3
  
  cmap = plt.get_cmap("tab20c")
  
  outer_colors = cmap(np.arange(3)*4)
  inner_colors = cmap(np.array([1, 2, 5, 6, 9, 10]))
  
  ax.pie(x, radius=1, colors=outer_colors,
         wedgeprops=dict(width=size, edgecolor='w'))
  
  ax.pie(y, radius=1-size, colors=inner_colors,
         wedgeprops=dict(width=size, edgecolor='w'))
  
  ax.set(aspect="equal", title='Pie plot with `ax.pie`')
  plt.show()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/fEqnB.png" rel="noreferrer"><img src="https://i.stack.imgur.com/fEqnB.png" alt="enter image description here"></a></p>
  
  <p>I want the inside colors to be shades of the outside colors (greenish, blueish and orangish), but I have no idea how to change them accordingly. </p>
  
  <p>Thanks!</p>