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
Eight free browser-based color tools for designers: picker, harmony palette generator, WCAG contrast checker, CSS name finder, and gradient builder.
What Is the Name of That Color? CSS Color Naming Guide
Learn how CSS’s 148 named colors work, why names like rebeccapurple and tomato exist, and how to match any hex code to a color name.
Why Most Color Pickers Are Wrong About 1 Pixel
Why single-pixel eyedroppers mislead you due to anti-aliasing, subpixel rendering, JPEG compression, and color profiles—plus how 5×5 averaging helps.