If the lighting is on, then instead of the color of the vertices, the color of the material (well, colors - there are several of them for different types of response to light). The color of the material is set by the glMaterial* functions.
If you want to reuse your code, you can use glEnable(GL_COLOR_MATERIAL) and glColorMaterial(GL_AMBIENT_AND_DIFFUSE) so that your old glColor* calls appear automatically in the material color.
(And please switch to shaders as soon as possible - the shader approach will become simpler and more powerful)
source share