how to make glutSolidCube sixfaces different color

how to make glutSolidCube sixfaces have different color

Do the cube yourself.
6 quads can be done in code very easily. So you have control of the colors.

Thank you You mean glutsolidcube’s face can’t have different color

You have to understand that glut/glu is only for basic helper things. Look up the source code to see how it is done, and modify or recode it to your needs.