Finding Pixel Color for flood-fill

How do you find the color of a single pixel? I’m using GLUT w/ VC++ and I’ve been trying to do a flood-fill but still can’t figure out the gl function to use to return the color of a single pixel. I’d like to compare the color returned for a single pixel the mouse is at currently to the background color and tell it to fill until they don’t match. Thanks.

You can use glReadPixels.