Convert RGBA to RGB
The RGBA to RGB converter removes the alpha channel from rgba() colors and returns plain rgb() values. Use it when a tool, file format or API accepts only opaque colors, or when you want the base color behind a translucent design token.
What this tool does with alpha
The alpha value is dropped. The red, green and blue numbers stay exactly as they are; the color is not blended with white, black or any other background.
rgba(220, 38, 38, 0.2) → rgb(220, 38, 38)
rgba(46, 139, 87, 1) → rgb(46, 139, 87)
That is the right answer when you want the full-strength color, for example to reuse a brand red that was stored with 20% opacity. It is not what the RGBA color looks like on screen: a 20% red over a white page appears as a pale pink, not a strong red.
Flattening: matching what you actually see
To get the solid color that looks identical to the transparent one over a known background, blend each channel with standard alpha compositing:
result = alpha × color + (1 − alpha) × background
Worked example: rgba(220, 38, 38, 0.2) over white (255, 255, 255).
R = 0.2 × 220 + 0.8 × 255 = 44 + 204 = 248
G = 0.2 × 38 + 0.8 × 255 = 7.6 + 204 = 211.6 → 212
B = 0.2 × 38 + 0.8 × 255 = 7.6 + 204 = 211.6 → 212
→ rgb(248, 212, 212)
Over black (0, 0, 0) the background term disappears and the same color becomes rgb(44, 8, 8), an almost black red. One RGBA input, two very different solid colors. That is why no converter can flatten correctly without knowing the background.
When to drop alpha and when to flatten
- Drop it when you need the base color: extracting a palette, defining a token, or when opacity will be applied separately, such as through a layer's opacity setting.
- Flatten it when the result must look the same on a fixed background: email templates, exported images, print, or measuring text contrast against the real composite color.
Contrast checks are a common trap. Contrast is measured on the color as displayed, so test the flattened value, not the dropped one.
Accepted input
Besides rgba(…), you can paste rgb(220 38 38 / 20%), bare numbers like 220, 38, 38, 0.2, or an eight-digit hex code. Fractional channels are rounded to whole numbers. To keep the alpha instead, convert with RGBA to HEX; to add alpha back later, use RGB to RGBA. The RGB to HEX converter gives you a hex code for the flattened color.