Convert 6-Digit HEX to 3-Digit HEX

Convert a 6-digit HEX color to its exact shorthand equivalent or the closest 3-digit color.

Choose a conversion direction.
Example: #523611
Example: #531

How do you convert a 6-digit HEX color to 3 digits?

A 6-digit HEX color uses two characters for each red, green and blue component: #RRGGBB.

The shorthand version uses one character per component: #RGB.

An exact conversion is only possible when both characters in each pair are identical.

  • #FFCC00 can be shortened exactly to #FC0.
  • #553311 can be shortened exactly to #531.
  • #523611 does not have an exact 3-digit equivalent.

When an exact conversion is not possible, the tool calculates the nearest available 3-digit HEX color. You can then adjust the result visually using the color pickers and RGB sliders.

What is the difference between #RGB and #RRGGBB?

In shorthand HEX notation, each character is repeated to create the 6-digit value.

  • #531 corresponds to #553311.
  • #FC0 corresponds to #FFCC00.
  • #FFF corresponds to #FFFFFF.

The shorthand format therefore supports fewer possible colors than the full format, but it can be useful for shortening compatible CSS color codes.