RGB 转 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 转 HEX useful?
RGB 转 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.
使用方法
-
Enter R, G, B values
Whole numbers from 0 to 255.
-
Copy the HEX
The code appears next to the preview swatch.
示例
A familiar indigo
Common channel values map to a tidy code.
79, 70, 229
结果: #4f46e5
常见问题
相关指南
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.
Why Most Color Pickers Are Wrong About 1 Pixel (and Why It Matters)
A color picker tells you the color of a single pixel. But a pixel is not a color — it is a sample of a continuous function, and the sample is usually wrong. Here is why, when it matters, and what to do about it.
相关工具
Last reviewed: 2026-11-21