Introduction - If you have any usage issues, please Google them yourself
opengl Advanced Programming Guide, I will tell you how to use color. You will understand the two kinds of colored patterns, in left, the triangle is used for smooth shading, using a quadrilateral flat shading.