Convert RGB to hexadecimal color

Enter the RGB color value [e.g. 255 255 255]
Red
Green
Blue
The hexadecimal colors are:

Here is your color.

What is RGB to Hex?

  • It’s converting colors from the RGB (Red, Green, Blue) format — like rgb(34, 139, 230) — into a Hexadecimal color code like #228BE6.
  • Both describe the same color, just in different formats.

Why convert RGB to Hex?

  • Hex is more compact and cleaner for use in HTML and CSS.
  • It’s easier to copy-paste and recognize common colors (like #000000 for black, #FFFFFF for white).
  • Some design tools and platforms prefer Hex codes.

How to convert RGB to Hex?
Let’s say you’ve got an RGB color like rgb(34, 139, 230):

  1. Convert each decimal value (0–255) to hexadecimal (00–FF):
    • 34 → 22
    • 139 → 8B
    • 230 → E6
  2. Combine them: #228BE6.

When do you use it?

  • Writing CSS for websites — Hex is common in stylesheets.
  • Sharing colors between design tools and code.
  • Keeping color palettes simple and consistent.