In windows (I'm assuming your using windows) the origin (0,0) is at the top left of the screen, but with glReadPixels the origin is at the
bottom left so you may have to adjust the mouse coords before you use them with the function.
Also you may want to do something more like this:
Picking Tutorial[
^]
It's more effort but it would allow you to pick between objects of the same colour.