Tool
RGB to HEX Converter
Drag the R, G, B sliders or type values directly. Your HEX code updates live and is ready to copy straight into CSS.
#1C60F6color: #1c60f6;Convert RGB to HEX in three steps
No sign-up. Works instantly in any browser.
Enter RGB values
Input red, green, and blue values from 0 to 255.
Get the hex code
The hex color code appears instantly as you type.
Copy the hex code
Click to copy #RRGGBB for CSS or design tools.
RGB to HEX
Instant conversion
Type R, G, B values and the hex code updates live.
Color preview
See the actual color rendered to confirm the right shade.
CSS-ready output
Copies as #RRGGBB ready to paste into CSS or a design tool.
About the RGB to HEX Converter
RGB and HEX are two formats for the same colour model. RGB expresses colours as three numbers from 0–255 (red, green, blue) — the format used by design tools like Figma, Photoshop, and most programming environments. HEX is the six-character shorthand used in CSS and HTML.
Converting RGB to HEX is straightforward: each channel value (0–255) is converted to a two-digit base-16 (hexadecimal) number, then the three are concatenated with a # prefix. For example, rgb(28, 96, 246) becomes #1c60f6.
Use the sliders for a visual approach or type values directly. The colour preview updates in real time so you always see exactly what you're working with.
You'll use this conversion when you've chosen a colour in Figma, Photoshop or another design tool that gives you RGB values, and you need the hex code to use in CSS or HTML. Both formats describe exactly the same colour — hex is just a compact notation.
Need the reverse? Convert HEX to RGB →
Explore more free tools: HEX to RGB · Color Picker · JPG to PNG
More Color Tools
Frequently Asked Questions
How do I convert RGB to hex manually?
Convert each decimal (0–255) to a 2-digit hex number. 255→FF, 128→80, 0→00. rgb(255, 128, 0) → #FF8000.
What range can each RGB value be?
0 to 255. Each channel (Red, Green, Blue) is a whole number in this range. Values outside it are invalid.
Can I convert RGBA to 8-digit hex?
RGBA adds an alpha channel (0–1). The 8-digit hex equivalent is #RRGGBBAA where the last two digits represent opacity. Not all tools support 8-digit hex.
What does rgb(0,0,0) and rgb(255,255,255) convert to?
rgb(0,0,0) = #000000 (black). rgb(255,255,255) = #FFFFFF (white).