RGB to HEX Converter

Turn RGB values into the HEX code you need for CSS, design tools or brand guides.

How to convert RGB to HEX

  1. Paste a colour in any format — or pick it on the colour square or from your screen.
  2. Read the result and every other format; fine-tune with the channel sliders.
  3. Copy the value or code, or convert a whole list.

About RGB to HEX Converter

Convert RGB and RGBA values to HEX colour codes instantly.

Everything works in your browser, so it is instant and private. Your recent colours and settings are remembered on this device, and the address bar keeps your colour so you can share or bookmark it.

Good for

  • Web and app design
  • Matching brand colours across tools
  • Front-end development and design tokens

Tip: Press the arrow keys on the colour square or sliders for fine steps; hold Shift for bigger ones.

Frequently asked questions

How do I convert RGB to HEX?

Write each channel (0–255) as two hexadecimal digits and join them: rgb(46, 139, 87) → 2E 8B 57 → #2E8B57. Alpha becomes a fourth pair.

Which colour formats can I paste?

Any CSS format: HEX (#rgb, #rrggbb, with alpha), rgb() / rgba(), hsl() / hsla(), hwb(), lab(), lch(), oklab(), oklch(), color(display-p3 …), HSV/HSB, CMYK, the 148 CSS colour names and plain numbers like “79, 110, 247”.

Can I pick a colour from my screen?

Yes — in Chrome and Edge, click the eyedropper next to the colour square and click anywhere on your screen, even outside the browser.

Can I convert many colours at once?

Yes — open “Convert a list of colours”, paste one colour per line in any format and copy or download the results as CSV.

What are OKLCH and OKLab?

Modern perceptual colour spaces: equal steps look equally different to the eye, which makes them ideal for palettes and design tokens. All current browsers support oklch() in CSS.

← Back to all tools