~/hex-to-rgb 200 OK

Last updated: 2026-06-19

Hex to RGB Color Converter

Turn a hex color code into R, G, B values instantly.

A hex to RGB converter turns a hex color code like #00FF80 into separate red, green, and blue values (each 0–255). RGB values are handy for design tools and for the rgb() CSS function. Enter a hex code below — both three-digit and six-digit forms work, and the # is optional.

How to convert hex to RGB

  1. Type or paste your hex color code into the Hex color field (3 or 6 digits, # optional).
  2. The Red, Green, and Blue values appear instantly.
  3. Use the copy buttons to grab each channel value.

Worked example: #00ff80

The code splits into pairs: 00, ff, 80. Each pair converts from hex to decimal: 00 → 0, ff → 255, 80 → 128, giving rgb(0, 255, 128).

Reference table

Common colors in hex and RGB
ColorHexRGB
Black#0000000, 0, 0
White#ffffff255, 255, 255
Red#ff0000255, 0, 0
Green#0080000, 128, 0
Blue#0000ff0, 0, 255
Yellow#ffff00255, 255, 0
Orange#ffa500255, 165, 0
Gray#808080128, 128, 128

Frequently asked questions

How do I convert hex to RGB?
Split the six-digit hex code into three pairs and convert each pair from hexadecimal to a decimal value from 0 to 255. This tool does it instantly.
What is #ffffff in RGB?
#ffffff in RGB is rgb(255, 255, 255), which is white.
Does this support three-digit hex codes?
Yes. Shorthand codes like #f09 are expanded automatically (to #ff0099) before conversion.
Is the # required?
No. The # prefix is optional — both 00ff80 and #00ff80 work.

Related tools

Learn more