🔒 No upload — converts in your browser

RGB to HEX Converter

Convert RGB, RGBA, HEX and HSL colour values into each other — with sliders, a live preview and one-click copy of every value.

Red
Green
Blue
Live preview
HEX#FF0000
RGBrgb(255, 0, 0)
RGBA (2 decimals)rgba(255, 0, 0, 1.00)
HSLhsl(0, 100%, 50%)
HSVhsv(0, 100%, 100%)
Accepts #RGB, #RGBA, #RRGGBB and #RRGGBBAA, rgb()/rgba() with commas, and hsl()/hsla(). Channels are clamped to 0-255, alpha to 0-1 and shown with two decimals. Values without a valid format are rejected with a message instead of being applied.

How the RGB to HEX Converter Works

This converter translates between the colour notations you paste into CSS, HTML and design tools. Type a HEX value such as #3366CC, an RGB value such as rgb(255, 0, 0) or an HSL value such as hsl(0, 100%, 50%) into the matching field and the other two are filled in straight away. The red, green, blue and alpha sliders build a colour by hand, and the preview swatch and the read-out lines update while you drag. Values are clamped and rounded instead of being passed through: rgb(300, -5, 0) becomes rgb(255, 0, 0), and alpha is always shown with two decimals. Short forms like #F00, four and eight digit HEX with transparency, and rgba() with a percentage alpha are understood as well. Every result can be copied with one click. Colour names such as tomato are not supported, and colours are not read from images.

More free tools

Free online utility tools. No signup. No tracking.

Impressum · Sitemap · Some links contain affiliate advertising