Convert RGB values to a HEX color code — instantly, 100% local
Type or paste RGB values (as rgb(59, 130, 246) or just three numbers) and get the lowercase HEX code ready to use in HTML, CSS, or design tools. No upload, no account, everything runs in your browser.
Need HEX ↔ RGB ↔ HSL ↔ OKLCH all at once?
Open the full Color Converter →Design tools like Figma, Photoshop, and Sketch often export colors as RGB triplets. When you paste those values into HTML or a CSS stylesheet, you need the equivalent HEX code. HTML color attributes, some SVG attributes, and older CSS require hex notation. This tool converts in one step.
You can type rgb(59, 130, 246), 59, 130, 246, or 59 130 246. The tool extracts the three numbers automatically.
CSS is case-insensitive for hex, but lowercase is the convention recommended by Prettier, Stylelint, and most style guides. Both #3b82f6 and #3B82F6 are identical to the browser.
This focused page converts RGB only. For full format support, use the full Color Converter.
No. HEX colors only support 0–255 per channel in the sRGB gamut. Values outside this range are flagged as invalid.