The Red Book samples included a short demo on OpenGL materials. The demo is quite old but is still valuable when considering the Phong lighting equation. In the original C source file several materials are defined and the resulting app produces an image such as the icon of this post.
This post contains a WebGL demo where the different materials can be applied to a model.
(0.0215 ,0.1745 ,0.0215)
(0.07568 ,0.61424 ,0.07568)
(0.633 ,0.727811 ,0.633)
The demo also uses two third party libs:
The first library contains two functions which are really useful: WebGLUtils.setupWebGL and window.requestAnimFrame. jsMatrix is a great lib that supports the most common matrix and vector operations, namely in the context of GL, such as setting the projection matrix, placing the camera, and performing geometric transformations.