Coordinates of each point in the cube is used to find it's color on the RGB (Red Green Blue) scale. For example the corner point with coordinate (0, 0, 255) has color R=0, G=0, B=255 which is pure blue.
The 3D interface is a based on a projection algorithm I developed some years ago to make Geometer's Sketchpad display 3D curves.
I learned a tremendous amount from
@Mr_Pyro_ 3D Wireframe Engine project about optimizing rendering and keyboard effects. Much much thanks.