RGB to HEX Converter
Convert RGB (Red, Green, Blue) color values to hexadecimal color codes with this simple tool.
Enter RGB Color Values
How to use this tool:
- Enter RGB values (0-255) for Red, Green, and Blue
- Alternatively, enter an RGB string (e.g., rgb(74, 144, 226)) and click Parse
- Click Convert to HEX to see the hexadecimal color code
- View the color preview and HEX values breakdown
- Use the Copy button to copy the HEX format
- Click Generate Random Color to try different colors
Please enter a valid RGB color string.
HEX Color Code
.my-element {
background-color: rgb(74, 144, 226);
background-color: #4a90e2;
}
Recent Conversions
About RGB and HEX Colors
RGB Color Format
RGB (Red, Green, Blue) is a color model that represents colors by specifying the intensity of red, green, and blue components. Each component ranges from 0 to 255, where 0 means no intensity and 255 means full intensity.
HEX Color Format
Hexadecimal color codes are used in HTML, CSS, and other applications to represent colors. They start with a # followed by 6 hexadecimal digits (0-9, A-F). The first two digits represent red, the middle two represent green, and the last two represent blue.