RGB to HEX Converter
Convert any RGB color to a HEX code instantly. Click any result to copy it.
Try These Example Colors
Click any color to load it into the converter.
What is RGB to HEX Conversion?
What is RGB?
RGB stands for Red, Green, Blue. Each channel is a number from 0–255 that controls how much of that color is mixed. For example, rgb(255, 87, 51) is a vivid orange-red.
What is a HEX color?
A HEX color is a 6-character code (e.g. #FF5733) used in CSS and design tools. Each pair of characters represents the Red, Green, and Blue channels in base-16 (hexadecimal).
How to convert?
Convert each RGB channel (0–255) to a 2-digit hexadecimal value and concatenate them with a # prefix. For example, R=255 → FF, G=87 → 57, B=51 → 33 → #FF5733.
How It Works
Three steps to convert any RGB color to HEX, HSL, and CMYK.
Enter your RGB values
Type the Red, Green, and Blue values (each 0–255) into the input fields. You can also click any example color below to load it automatically.
Get HEX, HSL, and CMYK instantly
The tool converts as you type — no button to press. You get six outputs at once: HEX code, RGB string, CSS rgb(), HSL, CSS hsl(), and CMYK. A live color swatch updates in real time so you can visually confirm the color before copying.
Click any result to copy
Click any result box to copy it to your clipboard. Paste directly into CSS, Figma, Tailwind, Adobe XD, or any tool that accepts color values.
Need to go the other way? Use the HEX to RGB converter to convert a HEX code back to RGB, HSL, and CMYK.
Common Questions About RGB to HEX
Answers to what people search for most.
color: rgb(255, 87, 51) and color: #FF5733 produce identical results. HEX is more compact and widely used in design tools and stylesheets.