Working on a web design project or a UI mockup? You will run into two common ways to represent colors: RGB decimal values and hexadecimal codes. Our RGB to Hex Converter lets you switch between them instantly with a live color preview that updates as you type.

RGB uses three numbers from 0 to 255 that represent the intensity of red, green, and blue channels. Pure red is R=255, G=0, B=0. White is all channels at 255. Black is all at 0. Hex uses a six-digit base-16 number starting with #, where the first two digits are red, the middle two are green, and the last two are blue. So #FF0000 is pure red, #FFFFFF is white, and #000000 is black.

You can type values in either direction. Adjust the RGB sliders and the hex code updates automatically. Type a hex code like #3498db and the RGB values update right away. The color preview bar shows the exact color so you can confirm it looks right before using it in your project. Click the copy button next to the hex field to copy the code to your clipboard in one click.

Designers use this to translate brand colors from design tools into CSS. Developers use it to match a hex code from a mockup to RGB values for use in canvas or SVG. The bidirectional conversion means you never have to do the math yourself or look up a conversion table.

Everything runs locally in your browser. No data is sent anywhere.