rgb to hex function now ignores case