When you enable lighting, the color is determined by the current material properties, not the current color. Your material’s ambient and diffuse properties are a light gray, and your specular highlights are pure white. If you want it blue, try setting the diffuse and ambient material properties to blue.
Let me see if I got this right. Soo, if you´re basically gonna use lighting for all your scenes, you can basically throw glColor out the window and stick with glMaterial?
That’s the way, right. But also be sure your light will ‘light up’ your scene and not the void and that it matches what you wanted (directional vs positional lights). Also ensure you specify normals (not needed with most of glut drawing routines like glutSolidCube) and that they are normalized.
Finally, check that the intensities of lights and materials are suffisant enough to see something.