Fix Colour energy function and fix Colour hex parsing