Essential cookies keep Huevex running. With your permission we also measure how the site is used. Nothing optional loads until you choose. Cookie Policy
Enter a red, green and blue value and read the hex code instantly, with every other format alongside it.
An RGB value describes a color as three amounts of light: red, green and blue, each measured on a scale from 0 to 255. A hex code says exactly the same thing, written in base 16. Each channel becomes a two-character pair, so 255 is FF, 0 is 00, and 91 is 5B. Put the three pairs together and you have the six-digit code a browser, a design file and a brand document all understand.
Converting is therefore exact, not approximate. RGB 91, 141, 239 is 5B, 8D, EF, which is #5B8DEF. If a channel is a single digit after conversion, it is padded with a leading zero: 10 becomes 0A, not A. That padding is the only step people usually get wrong by hand.
Designers usually receive color as RGB from a screenshot tool, a developer handoff, a canvas API or a camera reading, and then need it as hex to use it. Hex is what CSS, Figma, Illustrator, Tailwind config and most brand guidelines expect. It is also shorter and easier to copy, which is why it is the form a palette gets shared in.
Hex has two abbreviations: #5B8DEF can also be written #5B8DEF in full, and a code whose pairs repeat, such as #FFCC00, can be shortened to #FC0. Only repeating pairs can be shortened, so #5B8DEF has no short form. If you are producing a palette for other people, the full six digits are safer.
Hex assumes the sRGB colour space. Converting RGB values captured from a wider gamut, such as Display P3 from a phone photo, will produce a code that looks correct on an sRGB screen and duller or darker on a wide-gamut display, and vice versa. If colour accuracy matters, convert from sRGB values rather than from raw device readings.
Hex also has no transparency. The eight-digit form, such as #5B8DEFCC, is hex with an alpha channel, not a separate format, and the last pair is opacity. If the RGB you are converting came with an alpha value, keep it and append it rather than dropping it.
Either six digits, or three when every pair repeats - #FFCC00 and #FC0 are the same color. Huevex always shows the six-digit form so the code can be pasted anywhere.
The value is exact, but color management is not. Apps that read the same hex inside a different profile, or on a wide-gamut display, can render it differently. Compare both on the same screen before assuming the conversion is wrong.
RGB channels do not go above 255. Anything higher is clamped, which quietly changes the color, so it is worth checking the number you pasted.
Not directly. Print uses CMYK, and turning RGB into ink involves a profile and a press. Convert to CMYK, then proof it - the screen value is only a starting point.
Take these colors into the Color Engine and build a full palette, gradient set and interface system around them.
Open Color Engine