title: TypeError when changing colors in pygame
body: <p>So I'm experimenting in pygame and wrote some code for a rectangle that slowly changes color</p>
  
  <pre><code>a = 4
  b = 3
  c = 2
  
  #some irrelevant code later
  
      if color[0]+a &lt; 255:
          color[0] += a
      else:
          a *= -1
      if color[1]+b &lt; 255:
          color[1] += b
      else:
          b *= -1
      if color[2]+c &lt; 255:
          color[2] += c
      else:
          c *= -1
  </code></pre>
  
  <p>a, b, and c as the speed of change for red, green, and, blue.</p>
  
  <p>The problem is that for some reason it will give me a TypeError: Invalid color argument after a few seconds of the program running, usually when the color is very blue. I don't see any reason an invalid color argument would appear.</p>