Included the colour function, and matched the code on palette.php