Skip to main content
Tool Factory
  • English
  • Español · Review pending
  • Français · Review pending
  • Deutsch · Review pending
  • Português · Review pending
  • 日本語 · Review pending
  • 简体中文 · Review pending

Images & QR

RGB to Hex and Hex to RGB Converter

Convert RGB to hex or hex to RGB. Enter a three-channel RGB color, #RGB, or #RRGGBB and copy the exact CSS color values.

Tool workspace

Your input stays in this browser.

The tool is ready to run.

Ready

Run the tool when your input is ready.

Ready for a result

Convert RGB to hex or hex to RGB. Enter a three-channel RGB color, #RGB, or #RRGGBB and copy the exact CSS color values.

RGB and hexadecimal color codes describe the same three color channels. Each channel ranges from 0 through 255. Hex writes each channel as two base-16 digits, so RGB 255, 128, 0 equals #FF8000.

You receive a six-digit hex code, a CSS rgb() value, and the individual red, green, and blue channels.

  • Convert RGB design specifications into CSS hex codes.
  • Read the red, green, and blue components of a hex color.
  • Expand shorthand hex colors before comparing values.

Instructions

  1. Enter #RGB, #RRGGBB, or three comma-separated integers.
  2. Select Convert.
  3. Copy the RGB or hex value into your stylesheet or design document.

Example

Input: rgb(255, 128, 0)

Settings: Three integer channels

Result: #FF8000

The shorthand #F80 represents #FF8800 instead, because each shorthand digit repeats.

Limits

  • Use integer RGB channels from 0 through 255.
  • Alpha, HSL, percentages, named colors, and image color sampling are not supported.
  • This converter changes notation, not color profiles or display calibration.