Convert colors between HEX and RGB

For designers and front-end developers moving from a mockup to CSS, Color Converter supplies the HEX or RGB notation they need.

Compare a color in HEX and RGB and copy the notation that best fits your stylesheet or design handoff. No upload or storage is involved.

How to use

  1. Enter a color in hexadecimal or RGB notation in the input area.
  2. Choose the conversion you need, such as HEX to RGB, RGB to HEX or HEX to HSL.
  3. Run the conversion to display the matching value in the result area.
  4. Use the HSL, HSV or CMYK options if your project or software requires them.
  5. Copy the notation into your stylesheet, mockup or documentation.

Example

With the green sample provided, look at the HEX and RGB equivalents shown. This makes it easier to move from a mockup to a stylesheet without recalculating values by hand.

Input

rgb(22, 163, 74)

Output

HEX: #16A34A
RGB: rgb(22, 163, 74)

Limits and formats

Where processing happens

The conversion runs in your browser. The color you enter stays local and is neither sent outside nor stored by the page. You can perform several conversions in a row without creating a file.

Frequently asked questions

What is the difference between HEX and RGB?

HEX uses hexadecimal digits, often in CSS, while RGB gives three values for red, green and blue. Both describe the same on-screen color in different notations.

Is the CMYK result ready for printing?

No, it provides a simple numeric equivalent. Professional printing requires a color profile matched to your press, ink and paper.

Can I convert a color without knowing its HEX code?

You can enter an RGB value if you have one. Otherwise, sample the color with a color picker, then paste the notation into the converter.

Tools in the same category