RGB to Hex


Enter red, green and blue color levels (0-255) and press the Convert button:

Red color (R):
Green color (G):
Blue color (B):
Color preview:
 
Hex color code:
RGB color code:
HSL color code:

About RGB to Hex

RGB to Hex Converter: Convert RGB Color Values to HEX

Enter the Red, Green, and Blue levels (each from 0 to 255) and press Convert. The tool shows a color preview and gives you the Hex, RGB, and HSL color codes.

How to Use the Tool

  1. Type a number from 0 to 255 for Red (R), Green (G), and Blue (B).
  2. Press Convert.
  3. Read the Hex, RGB, and HSL codes and check the color preview.
  4. Press Reset to start again.

How RGB Becomes HEX

Each channel number is turned into two hexadecimal digits. For example, 255 is FF and 0 is 00. So rgb(52, 152, 219) becomes #3498DB. Together the three channels can describe 16,777,216 different colors (256 x 256 x 256).

Tips

  • Each value must be between 0 and 255.
  • RGB and HEX are for screens. Print designs use a different system (CMYK), so colors may look different on paper.
  • Keep enough contrast between text and background so that it is easy to read.

Frequently Asked Questions

What is the difference between HEX and RGB?

Both describe the same color. RGB uses three numbers, and HEX packs them into a short code that starts with #.

Is this tool free?

Yes, it is free to use. To convert in the other direction, try our Hex to RGB Converter.