Colour calculations are now much faster 2nd time around

Implemented GCD to cache the result of the colour generation. This has
proven to be anywhere from 20 to 80 times faster for subsequent calls.
Merge pull request #137 from KiranPanesar/master

Colour calculations are now much faster 2nd time around