Skip to content
MixTool

HEX to RGB converter

Paste a HEX color code and get its RGB values — plus every other color format and a contrast check.

  • Runs entirely in your browser
  • Free · no sign-up
  • Works on phone and desktop
Loading tool…

From hex code to RGB

Paste a HEX code — with or without the #, in 3, 4, 6 or 8 digits — and the converter shows the RGB value ready for CSS, along with the separate red, green and blue numbers. Short codes are expanded automatically (#38f is #3388ff), and 8-digit codes include alpha as rgba().

You'll also see HSL, OKLCH, HSV, CMYK and decimal versions of the color, a live swatch, and how readable white and black text would be on it.

How to convert HEX to RGB

  1. 1

    Paste the HEX code

    3, 4, 6 or 8 digits, # optional.

  2. 2

    Read the RGB value

    Shown as rgb() plus separate channel values.

  3. 3

    Copy

    Copy RGB or any other format.

Key features

  • All HEX lengths

    #rgb, #rgba, #rrggbb and #rrggbbaa.

  • RGBA for transparency

    Alpha is converted to a 0–1 value.

  • Other formats too

    HSL, OKLCH, HSV, CMYK and decimal.

  • Accessible choices

    WCAG contrast for white and black text.

Common uses

  • CSS work: Convert a HEX brand color to rgba() for a transparent overlay.
  • Game and app development: Get 0–255 values for engines that need RGB.
  • Office and design apps: Enter exact RGB values in Word, PowerPoint or Canva.

Tips and good to know

Frequently asked questions

What RGB value is #FFFFFF?

rgb(255, 255, 255), which is white. #000000 is rgb(0, 0, 0), black.

What does a 3-digit HEX code mean?

Each digit is doubled: #f60 is #ff6600, which is rgb(255, 102, 0).

How do I get RGBA from HEX?

Use an 8-digit HEX code; the last two digits become the alpha. #00000080 is rgba(0, 0, 0, 0.502).