HEX to RGBA

Turn #RGB, #RRGGBB, or #RRGGBBAA into rgba() for CSS and React. Tune alpha when the hex has 6 digits.

{{ t("hexToRgbaFormatsHint") }}

{{ hexToRgba.message }}

Overview

Web and UI colors often start as hex palettes, but glass effects, gradients, and light/dark themes benefit from explicit RGBA. This tool parses short (#RGB, #RGBA), full (#RRGGBB, #RRGGBBAA) hex, and applies an extra alpha factor when you use 3 or 6 digits (embedded alpha in 8-digit hex wins).

Runs in the browser: handy for Tailwind arbitrary values, CSS variables, and inline JSX styles.

Sample

#3b82f6cc

FAQ

What is this tool for?

It runs fully in your browser: useful to validate, format, or convert data in everyday development.

Are my inputs sent to a server?

Processing happens locally with JavaScript. We do not store what you paste into the text areas.

Can I use this for real production data?

Use at your own risk. For secrets (passwords, tokens), prefer controlled environments and your company policies. And always review the generated contents. Never trust blindly things you see on the internet.