Skip to content
Color & Design

HEX and RGB Colour Converter

Converts in both directions between hex and RGB. Useful because design tools and code tend to disagree about which format they want — a colour picker gives you RGB sliders while a stylesheet wants a hex string.

Free, no signupRuns entirely in your browser
Input
Result
rgb(59, 130, 246)
About

What the HEX and RGB Colour Converter does

The two notations describe exactly the same colours; neither can express anything the other cannot. Hex is more compact and is the convention in CSS, while RGB is easier to compute with.

How it works

Using the HEX and RGB Colour Converter

  1. 1Enter a colour in either hex or RGB.
  2. 2For hex to RGB, each two-digit pair converts to a 0-255 value.
  3. 3For RGB to hex, each value converts to two hex digits, padded with a leading zero if needed.
  4. 4The converted value appears immediately.
  5. 5Copy it in whichever format you need.
Use cases

What people use it for

  • Moving a palette from a design tool into CSS
  • Documenting brand colours in both notations
  • Converting a colour picked from a screenshot
  • Normalising mixed colour formats in a stylesheet
FAQ

Frequently asked questions

6 related

Related tools

All tools →