Functions Discussed with This Tutorial

OpenGL Functions

We set the current drawing color with a call to glColor. There are basically two forms of the function. We can set the color with its red, green and blue components (3f) or with these components and its alpha value (4f). The alpha value sets the transparency of the color and is applied only when alpha blending is enabled (see the tutorial Texture Transformations). Each of the two forms also has two variations where the parameters are passed as individual components or as an array of values, as seen with the following.
void glColor3f(float red, float green, 
               float blue)
void glColor3fv(float[] v)

void glColor4f(float red,  float green, 
               float blue, float alpha)
void glColor4fv(float[] v)

Functions in Utils (Tools.h)

As noted in the tutorial, mixing colors using the HSV model is at times more intuitive. However, OpenGL requires color to be given in the RGB model. The following two functions are provided in the Utils library for converting between the two models.
HSVtoRGB(float hsv[], float rgb[])

RGBtoHSV(float rgb[], float hsv[])