title: Giving grayscale image color
body: <p><img src="https://i.stack.imgur.com/ek9ME.png" alt="edited image after assignment statement"></p>
  
  <p>I want to add color to a black and white image, I assume that changing the values of the pixels should work.</p>
  
  <pre class="lang-py prettyprint-override"><code>for rows in rgb:
      for e in rows:
          for i in range(len(e)):
              max_val = e.max()
              min_val = e.min()
              if e[i] == max_val:
                  e[i] * 2.5
              if e[i] == min_val:
                  e[i] * 0.75
              else:
                  e[i] * 1.5
  </code></pre>
  
  <p>the code doesnt return an error, but it also doesnt change the values. I want the numbers to be multiplied and reassigned by  the same array</p>