HEX to RGBA Converter
Translate HEX to RGBA, HSL, HSV, CMYK, and OKLCH.
All formats
- HEX6-digit for opaque, 8-digit when alpha < 1#635BFF
- RGBrgb(99, 91, 255)
- RGBArgba(99, 91, 255, 1.00)
- HSLhsl(243, 100%, 68%)
- HSLAhsla(243, 100%, 68%, 1.00)
- HSVhsv(243, 64%, 100%)
- CMYKcmyk(61%, 64%, 0%, 0%)
- CIE LCHlch(47% 92 296)
- OKLCHPerceptually uniform; modern CSSoklch(0.578 0.235 278.3)
What is a HEX to RGBA Converter?
A HEX to RGBA converter translates a hexadecimal colour code into the comma-separated red/green/blue/alpha format that CSS and design software understand natively. HEX is compact and common (every designer recognises #635BFF), but it does not carry transparency information by default. RGBA adds a fourth channel — alpha — so the same colour can fade in, overlap other layers, or layer on top of a photograph without replacing it.
The two formats describe the same underlying colour mathematics. Six-digit HEX encodes each of the red, green, and blue channels as a value from 00 to FF (0 to 255 in decimal). RGBA expresses the same channels in decimal and appends an alpha from 0 (fully transparent) to 1 (fully opaque). #635BFF and rgba(99, 91, 255, 1) are identical. The HEX variant with an eighth and ninth digit (#635BFF80) encodes alpha too, in the same 00–FF range. Most browsers have supported 8-digit HEX since 2017.
Developers need RGBA for any colour that should appear partially transparent — overlays, frosted panels, hover states with a subtle tint, tooltip backgrounds, scrim layers over images. Designers prefer HEX in brand guidelines because it reads cleanly and does not invite decimal math. A converter bridges the two worlds.
This tool covers more than HEX and RGBA. It also outputs HSL, HSLA, HSV, CMYK, CIE LCH, and OKLCH — the modern perceptually uniform colour space now supported natively in CSS. HSL and HSLA are useful when you want to tweak a colour along a single axis (make it lighter, shift its hue, reduce saturation); CMYK matters when you hand artwork to a printer; OKLCH is the right pick when you are generating palettes that should stay visually balanced under colour shifts, because a one-unit change in lightness looks the same across any hue.
Accessibility is part of the job too. The tool shows the WCAG contrast ratio against pure white and pure black. A ratio of 4.5 or above passes WCAG AA for normal text; 3.0 passes AA for large text (18pt or 14pt bold); 7.0 passes the stricter AAA level. If your brand colour sits below 3.0 against white, it is too light to use for body text on a white background — pick a darker shade or reserve it for decorative accents.
How to use the HEX to RGBA Converter
- Enter a HEX value. Paste or type a 3-digit, 6-digit, or 8-digit HEX with or without the leading
#. You can also use the native colour picker beside the field to explore visually. - Adjust the alpha channel. Drag the alpha slider from 0 (fully transparent) to 1 (fully opaque). The preview swatch updates live over a checker background so you can see the transparency.
- Read every format. Every supported format — RGB, RGBA, HSL, HSLA, HSV, CMYK, LCH, OKLCH — is shown next to the HEX input, ready to copy.
- Check accessibility. The contrast card shows the WCAG ratio against white and against black, along with the pass level (AA, AAA, or Fail).
- Copy the format you need. Each row has a Copy button that places the exact CSS-ready value on your clipboard.
Features
- Accepts 3-, 6-, or 8-digit HEX, with or without the leading hash.
- Outputs RGB, RGBA, HSL, HSLA, HSV, CMYK, CIE LCH, and OKLCH.
- Live checker-backed preview so alpha transparency is visible.
- WCAG contrast ratios against white and black with AA/AAA pass labels.
- Nearest named CSS colour for sanity-checking brand palettes.
- One-click copy for every format; nothing is sent to a server.
Frequently asked questions
- What's the difference between RGB and RGBA?
- RGB describes a colour with red, green, and blue channels only. RGBA adds a fourth channel — alpha — which controls transparency. Use RGBA whenever the colour should appear partially transparent, such as overlays, scrims, or hover tints.
- What does the alpha channel do?
- Alpha is a value between 0 and 1 that controls opacity. 0 is fully transparent (invisible), 1 is fully opaque (solid). 0.5 means the colour is 50% see-through, letting whatever sits behind show through.
- What is OKLCH and why is it included?
- OKLCH is a perceptually uniform colour space. Unlike HSL, equal changes in lightness look equal to the human eye at every hue — which makes it ideal for generating tint/shade palettes that don't look 'muddy' or 'too bright' at certain hues. Modern CSS supports oklch() natively.
- Can I use a colour I picked from a screenshot?
- Yes. Use our Image Color Picker tool to sample a pixel from an image, then paste the HEX value here to convert it to every other format you need.
- Why are some contrast ratios labelled 'Fail'?
- WCAG requires at least 4.5:1 for normal text and 3:1 for large text. A 'Fail' label means the colour is too light or too dark for readable text on that background — it may still be fine for decorative accents or large headlines.