RGB to HEX — Enter red, green, and blue channel values from 0 to 255 and get the matching HEX code, ready to paste into CSS or a design tool. A live swatch shows the color as you type.
Conversion runs locally in your browser.
Was RGB to HEX useful?
What is rgb to hex?
Enter red, green, and blue channel values from 0 to 255 and get the matching HEX code, ready to paste into CSS or a design tool. A live swatch shows the color as you type.
Out-of-range or non-numeric channels are flagged instead of silently clamped, so you always know what you are copying.
How to use it
-
Enter R, G, B values
Whole numbers from 0 to 255.
-
Copy the HEX
The code appears next to the preview swatch.
Examples
A familiar indigo
Common channel values map to a tidy code.
79, 70, 229
Result: #4f46e5
Frequently asked questions
Related guides
The 8 Best Free Color Tools for Designers in 2026 (No Upload)
Color pickers, palette generators, contrast checkers, color name finders, and converters — eight free color tools that run in your browser, do not upload your images or palettes, and cover every color task a designer actually has.
What Is the Name of That Color? A Field Guide to CSS Color Naming
A practical guide to CSS color naming: the difference between HEX, RGB, HSL, and named colors; why "tomato" looks the way it does; how to find the right name for a color you can see; the most useful CSS named colors by category; and how to find them in your browser without uploading anything.
5 Rules for a Color Palette That Actually Works in 2026
A practical guide to choosing a color palette: the 5 rules that separate a working palette from a decorative one (60-30-10 distribution, start with one color, neutrals are colors, contrast beats hue, test in context), common mistakes, and how to use a browser-based palette generator without uploading anything.
Related tools
Last reviewed: 2026-09-18