title: Make color scale for numbers in dictionary [Python]
body: <p>I have a dictionary with different values, like this:</p>
  
  <pre><code>  colormap_coms=
    {0.10208554259455638: rgb(179, 56, 79), 0.0: rgb(121, 28, 149), 
    0.10870219813309245: rgb(44, 147, 200), 0.12623481073520415: rgb(78, 170, 
    98), 0.10298102981029811: rgb(150, 87, 91), 0.044263775971093045: rgb(223, 
    39, 33), 0.13340724316334074: rgb(194, 205, 92), 0.10034049058439304: 
    rgb(99, 41, 106), 0.08040984519434236: rgb(97, 51, 26), 
    0.008130081300813009: rgb(106, 148, 70), 0.07158437438032918: rgb(54, 159, 
    37)}
  </code></pre>
  
  <p>I used this function:</p>
  
  <pre><code> colormap_coms = {x : 
   RGB(random.randrange(0,256),random.randrange(0,256),random.randrange(0,256)) 
                   for x in list(set(communities))}
  </code></pre>
  
  <p>Here I have random color assignment, but i want to assign color scale (for ex. from dark to light) based on values(from smaller to bigher). </p>
  
  <p>Is there a simple way to do this?
  Thanks</p>