RGB to HEX converter.
Type RGB values, as rgb(), rgba() or plain numbers, and get the hex code at once, with each channel's base-16 pair shown.
RGB to HEX converter.
Need the UI around it? With Pro, your AI agent builds the form, the result card and the rest of the page from a prompt.
Get ProHow it works
3 steps, no account. It runs in your browser and nothing is uploaded.
Type the RGB
As rgb(59 130 246), rgba() or three numbers.
Read the hex
The hex code appears under it, with each channel's pair.
Copy it
One press copies it; the other notations are below.
Related tools
More color tools. Every one free, in the browser.
Pricing
Build it with Pro
The tool is free. Pro adds 6,000+ blocks, premium templates and the MCP server, so your AI editor builds the product around it.
4.9/5 out of 5 · 150+ reviewsfrom 150+ founders and developers.
- Secure checkout via Stripe
- Code lives in your repo
- Keep what you've shipped if you cancel
- License terms
Questions and answers
Before you trust the result: what to know about the format, the limits, your data and the tools next to it.
Write each channel, 0 to 255, as two base-16 digits: 59 is 3 × 16 + 11, so 3b; 130 is 8 × 16 + 2, so 82; 246 is 15 × 16 + 6, so f6. Put them together after a # and rgb(59 130 246) is #3b82f6.
As a fourth pair: an alpha of 0.5 is 128 of 255, which is 80 in hex, so rgba(59, 130, 246, 0.5) is #3b82f680. Every current browser reads 8-digit hex.
Lowercase, as Tailwind and most style guides write it; CSS doesn't care, #3B82F6 and #3b82f6 are the same color.
rgb(59 130 246), rgb(59, 130, 246), rgba() with alpha, percentages like rgb(23% 51% 96%), or just the three numbers: 59, 130, 246. Values above 255 are clamped, as CSS does.
Yes: HSL, OKLCH, Lab, Display P3 and the rest are in the rows below, each editable.
No. Everything happens in your browser.
No. The RGB to HEX converter is free and opens without a sign-in, an account or an install.
Nothing. The RGB to HEX converter holds your input in the page's memory, so closing or reloading the tab clears it, and it saves nothing in this browser.
Closest to the RGB to HEX converter: HEX to RGB converter, RGB to HSL converter, Color converter, RGB to CMYK converter. Each opens on its own page, free and in the browser.
The RGB to HEX converter is one of 17 in its group. The group's page, /tools/color, lists them all.
The tool is free. Its interface is built from shadcn.io's own components (Button, Input, Slider and the rest of the registry under /ui), which come in React, Vue, Svelte and Solid. Pro adds the blocks and templates for the product around it.
4.9 out of 5 from 150+ developers
Build the product around it
Every block, template and icon, installed by your AI agent in your theme. The tools stay free.
Get Pro



