← All toolsColor utility

RGB to HEX

Convert red, green, and blue channel values into a CSS hexadecimal color.

RGB 91, 76, 230

Image Tools guide

How to use RGB to Hex

Translate integer RGB channels into the hexadecimal color notation commonly used in CSS and design tools.

Three simple steps

  1. Enter whole-number red, green, and blue values from 0 to 255.
  2. Review the generated color swatch and hexadecimal code.
  3. Copy the code into your stylesheet or design document.

Color notation

  • Each RGB channel maps to two hexadecimal digits.
  • The output uses the #RRGGBB format.
  • This conversion does not include an alpha or opacity channel.

Frequently asked questions

What RGB values are valid?

Each channel must be a whole number from 0 through 255.

Why does each channel use two hex digits?

Two hexadecimal digits represent the same 256 possible values as one 8-bit RGB channel.

Does the result include opacity?

No. The result is a six-digit #RRGGBB color without alpha.