Online RGB ↔ hex color

Convert rgb(r, g, b) values to #RRGGBB hex codes and back for CSS, design tokens, and UI work.

About online RGB and hex colors

Convert rgb(r, g, b) values to #RRGGBB hex codes and back for CSS, design tokens, and UI work.

Online RGB ↔ hex color capabilities

Channels 0–255

Each of red, green, and blue is one byte in sRGB—the same range CSS uses in rgb() and eight-bit hex pairs.

Hex pairs

#RRGGBB is two hex digits per channel: #FF8000 is red 255, green 128, blue 0. Shorthand #RGB duplicates each nibble (#F80 → #FF8800).

Not covered here

  • Alpha/transparency (rgba, #RRGGBBAA)
  • HSL/HWB color spaces
  • P3 or CMYK print colors

Common use cases

Design handoff

Match Figma rgb() specs with hex tokens in Tailwind or CSS variables.

Debug computed styles

Copy rgb() from DevTools and get hex for design docs or Slack.

Palette tables

Build a quick reference of brand colors in both notations.

Frequently asked questions

Why do designers use hex while CSS allows rgb()?
Both describe the same sRGB triple. Hex is compact in style guides; rgb() is readable when tweaking individual channels in code.
Is #FF0000 the same as rgb(255, 0, 0)?
Yes—they are identical sRGB red. Case of hex letters does not change the color (#ff0000 equals #FF0000).
Does this tool support #RGB shorthand?
Paste six-digit hex or rgb(); shorthand #RGB is expanded mentally (#F80 → #FF8800) if you type the full form or use rgb() input.