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.
6-digit color
3-digit color
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.
#FFCC00can be shortened exactly to#FC0.#553311can be shortened exactly to#531.#523611does 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.
#531corresponds to#553311.#FC0corresponds to#FFCC00.#FFFcorresponds 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.