RGB to Hex via Binary Shifting We know it converts an RGB value to it's hexadecimal equivalent, but how? It's doing some crazy stuff with binary, but when broken down it's actually incredibly simple and very clever. view source