Common Lisp code for colour calculations and manipulations