Color & Design

RGB to HEX Converter

Enter red, green and blue values from 0 to 255 and get the matching HEX code with a live preview.

Color & design

RGB to HEX

Local only
#2563EBrgb(37, 99, 235)
HEX#2563eb
HEX (uppercase)#2563EB
RGBrgb(37, 99, 235)
HSLhsl(221, 83.2%, 53.3%)
No uploads

Values are converted on your device as you drag the sliders.

Turning channels into a HEX code

Each channel from 0 to 255 becomes a two-digit hexadecimal number, padded with a leading zero when needed. Red 37 becomes 25, green 99 becomes 63 and blue 235 becomes EB, producing #2563EB.

When to use which format

  • HEX is compact and the default in design handoffs.
  • RGB is easier to tweak channel by channel and supports an alpha value.
  • HSL is the friendliest when you need a lighter or darker variant of the same hue.

Good to know

Frequently asked questions

What range do RGB values use?

0 to 255 for each channel. Anything outside that range is clamped automatically.

Can I enter decimals?

Values are rounded to whole numbers because HEX codes only represent integers between 0 and 255.

How do I add transparency?

Copy the RGB value and add an alpha, for example rgba(37, 99, 235, 0.5). An eight-digit HEX also works in modern browsers.

Is the conversion exact?

Yes. Every whole RGB value maps to exactly one HEX pair, with no loss in either direction.