why is hexadecimal used as a shorthand for binary?

There are various implementations where representing a binary sequence in hexadecimal is preferred over its binary equivalent. The main reason for this is that long sequences of binary digits are hard to read and understand for humans. Programmers often use hexadecimal as a shorthand for binary.

For example, the colours on a web page are represented in binary by 24-bit codes, i.e. combining 8 bits for a shade of red, 8 bits for a shade of green, and 8 bits for a shade of blue. In hexadecimal, the same colour can be represented by only 6 hexadecimal digits. For example, the colour orange can be depicted as FFA500start subscript, 16, end subscript,16 instead of 111111111010010100000000, start subscript, 2, end subscript,1111111110100101000000002.