added colour conversion functions