RelicRELIC

RGB to HEX Converter

Move between RGB values and a HEX color code, both ways, with a live swatch. Free and private, right in your browser.

Runs entirely in your browser. Nothing you type is uploaded.
#B5832A
R (0 to 255)
G (0 to 255)
B (0 to 255)
HEX
CSS rgb()
rgb(181, 131, 42)

RGB and HEX are the same color, written two ways

RGB describes a color as three numbers from 0 to 255, one each for red, green, and blue light. HEX writes those same three numbers in base 16 and bolts them together behind a hash, so rgb(181, 131, 42) and #b5832a are the exact same shade. This RGB to HEX converter keeps both sides linked: nudge a slider or type a hex code and the other format, plus the live swatch, updates with it. Everything runs in your browser, so nothing is uploaded.

Keep the color you just dialed in

The brand hex you finally got right is the kind of value you copy once and need on every screen after. Relic is an encrypted, permanent memory for everything you copy, so that color, that palette, and that one gradient stay searchable on every device, forever, end-to-end encrypted so only you can read them. The converter is free. Never re-picking the same color twice is the upgrade.

Frequently asked questions

How do I convert RGB to hex?

Type your red, green, and blue values (each from 0 to 255) and the hex code updates instantly, with a live swatch. It works both ways too: paste a hex code and the R, G, and B values fill in for you.

How does RGB map to a hex code?

A hex color is just the three RGB numbers written in base 16 and joined behind a hash. Each channel becomes two hex digits, so rgb(181, 131, 42) is b5, 83, 2a stuck together as #b5832a. Same color, two notations.

Can I convert hex back to RGB?

Yes. Paste a hex code into the HEX field and the R, G, and B sliders and numbers snap to match. Both 3-digit shorthand like #fff and full 6-digit codes like #b5832a are accepted.

Why is my hex code showing an error?

A hex color needs exactly 3 or 6 hexadecimal digits (0 to 9 and a to f), optionally with a leading hash, like #b5832a. Anything with other characters or the wrong length is flagged so you can fix it.

Is anything uploaded when I convert a color?

No. The conversion runs entirely in your browser, so the colors you enter never leave your device.

More free tools
Color Contrast Checker
color contrast checker
CSS Gradient Generator
css gradient generator
Color Picker
color picker online
JSON Formatter
json formatter
Base64 Encode / Decode
base64 decode
Diff Checker
diff checker
All tools