Colour

Convert RGB to a hex colour

Paste RGB values to get the hex. Both the old comma form and the modern space form are accepted, with or without alpha.

#ff8800

HEX

255, 136, 0

RGB

32, 100%, 50%

HSL

HEX

Preview

White text on thisBlack text on this

Contrast

  • Against white2.39:1Fails
  • Against black8.77:1AAA

WCAG asks for 4.5:1 for body text and 3:1 for large text. The ratio is computed from relative luminance, which is not the same as how bright a colour looks.

  • Runs in your browser
  • No account required
  • Free to use

How it works

01

Two notations, both current

CSS accepts `rgb(255, 136, 0)` and `rgb(255 136 0 / 50%)`. The second is the modern syntax and the one newer stylesheets use, so both are read here rather than only the older one.

02

Out-of-range values are clamped, not rejected

A channel above 255 or below 0 is not valid, but it is a common result of arithmetic in a build step. Clamping gives you the colour a browser would show rather than an error you have to work around.

What it does

Both CSS notations

Comma-separated and space-separated, with alpha as a number or a percentage.

Alpha becomes an 8-digit hex

Only when it is less than fully opaque, so an ordinary colour stays six digits.

Percentages accepted

`rgb(100%, 50%, 0%)` converts as readily as the 0-255 form.

Runs in your browser

No account and no upload — what you type is never sent anywhere. Analytics records that the tool was opened, never what you put into it.

Practical advice

Getting a better result

  • Hex is more compact and more portable; rgb() is easier to compute with. Both render identically.
  • If you are generating colours programmatically, clamping before conversion avoids surprises — this tool clamps, but the code producing the values may not.

Questions

Things people ask

Can hex represent transparency?

Yes, with 8 digits — the last pair is alpha. Every current browser supports it, so there is rarely a reason to convert to rgba() instead.

Who builds these

Free tools by day. Websites that earn their keep by trade.

KuConvert is built by KUDUY, a web design and development agency. From custom WordPress builds to SEO and e-commerce, everything they do is engineered to bring you more qualified traffic and turn it into revenue.

  • Fixed scope, no surprise invoices

    Most sites ship in four to eight weeks with the scope and the price agreed up front.

  • SEO from day one

    Search is designed into the build — structure, schema and Core Web Vitals — not retrofitted.

  • A team, not a ticket queue

    A project manager, a designer and a developer you can actually reach.

Need your whole site to load this fast?

Images are usually the heaviest thing on a page and the easiest win. KUDUY works on site speed, image delivery and Core Web Vitals for teams who would rather not do it by hand.

This tool runs entirely in your browser. Your files are never uploaded.