Real World Maths Busters

The Maths Behind Everyday Life

The story, the formula and a worked example — see exactly where this maths shows up in the world around you.

Back to all stories
Technology 3 min read

Decoding Hex Colour Codes

#FF5733 is just three numbers in disguise.

Web colours use hexadecimal — base 16. #FF5733 splits into FF (red=255), 57 (green=87), 33 (blue=51). Each pair converts from base-16 to a 0–255 value.

Hex to Decimal

Each hex digit is 0–F (0–15). Two digits: first × 16 + second.

Value=d1×16+d0\text{Value} = d_1 \times 16 + d_0

Decode #FF5733

  1. 1

    FF (Red)

    15×16+15=25515 \times 16 + 15 = 255
  2. 2

    57 (Green)

    5×16+7=875 \times 16 + 7 = 87
  3. 3

    33 (Blue)

    3×16+3=513 \times 16 + 3 = 51
Answer

RGB(255, 87, 51) — a vivid orange-red

The takeaway

Hex colours are just three base-16 numbers packed together — red, green, blue.

Back to all stories