Free Developer Tool

RGB to HEX Converter

Instantly translate RGB color values into web-ready HEX codes for your CSS stylesheets.

RGB Values

R — Red
G — Green
B — Blue
Or use the picker:
#E84D1C

Output Formats

HEX#E84D1C
RGBrgb(232, 77, 28)
RGBArgba(232, 77, 28, 1)
CSScolor: #E84D1C;

Get Results in Seconds

1

Enter your R, G, B values

Each channel is a number from 0–255. Red=255, Green=0, Blue=0 gives you #FF0000 (pure red).

2

HEX updates instantly

The HEX code refreshes as you type. Values outside 0–255 are automatically clamped to the valid range.

3

Preview the colour

The colour swatch shows you the exact colour so you can verify before copying.

4

Copy the HEX code

Click Copy to grab the HEX value — ready to paste straight into your CSS, Figma, or any other tool.

Common Questions

How do I convert RGB to HEX manually?

Convert each channel from decimal to hexadecimal. For example, RGB(255, 128, 0) → FF (255), 80 (128), 00 (0) → #FF8000. This tool does it instantly so you don't have to do the maths.

Why does my RGB produce an unexpected HEX?

Make sure each value is within 0–255. Negative numbers or values over 255 will be clamped. Also, RGB(0, 0, 0) is black (#000000) and RGB(255, 255, 255) is white (#FFFFFF) — these are common reference points.

Does CSS use RGB or HEX?

CSS supports both. rgb(255, 128, 0) and #FF8000 produce identical results. HEX is more compact; RGB is more readable. Use RGBA for transparency: rgba(255, 128, 0, 0.5) for 50% opacity.

Related Tools

More Design & Utility Tools

View all tools
Chat with us on WhatsApp