Using GD to draw a rainbow

I explain here how to use the GD library with C to draw a rainbow (or HSV scale).

palette-based image of a HSV scale