You are offline. Tools you have opened before keep working.
RGB to HEX converter
Enter red, green and blue values and get the hex code for CSS, design tools and brand guidelines.
Free and private. Everything runs in your browser, nothing is uploaded.
Report a problem
How it works
Enter the colorType or paste the value in the input.
Copy the resultThe converted value is at the top of the list.
Explore moreOther formats, contrast and shades are below.
Three numbers, one code
Type the values as 13, 107, 87, as 13 107 87 or as a full rgb() or rgba() function. Each channel from 0 to 255 becomes two hexadecimal digits, so 13, 107, 87 becomes #0D6B57. With transparency, the alpha value becomes a fourth pair.
Hex codes are the most compact way to share a color: they work in CSS, HTML attributes, Figma, Sketch, Photoshop and most brand guidelines. Copy the code in uppercase from the top of the list.
Check before you use it
Below the result you can test the color against a background for WCAG contrast and generate lighter and darker shades for hover states and borders.
Frequently asked questions
Can I paste values separated by spaces?
Yes. 13 107 87, 13,107,87 and rgb(13, 107, 87) all work.
Which color formats can I type?
Anything valid in CSS: HEX with 3, 4, 6 or 8 digits, rgb(), hsl(), hwb(), lab(), oklch() and color names.
Is the CMYK value exact for printing?
It is a simple conversion without a printer profile. For professional print use the CMYK values from your print shop's profile.
What contrast ratio do I need?
WCAG AA asks for 4.5:1 for normal text and 3:1 for large text and interface parts.
Why does OKLCH matter?
It matches how people see lightness, so palettes and gradients made in OKLCH look even.