More Accurate RGB to HEX Function