Added color conversion functions.