title: IndexError: pixel index out of range for my pygame paint program (Python 3.2.3)
body: <p>I'm making a paint program using pygame, that requires a color palette. </p>
  
  <p>My code is basically:</p>
  
  <pre><code>from pygame import *
  screen = display.set_mode((1152,864))
  color = (0,0,0)
  
  palette = image.load("images/palette.jpg")
  
  paletteRect=Rect(0,675,150,200)
  running = True
  while running:
      finish = False
      for e in event.get():
          if e.type == QUIT:
              running = False
  
      screen.blit(palette,paletteRect)
      if mb[0] == 1 and paletteRect.collidepoint(mx,my):
          color = spectrum.get_at((mx,my))
  </code></pre>
  
  <p>What happens is it says:     color = palette.get_at((mx,my)) IndexError: pixel index out of range</p>
  
  <p>However, if I change it to paletteRect = palette.get_rect(), my color palette works perfectly fine. Anyone know how to fix this? Thank you.</p>