HEX to RGBA Converter
Add opacity/transparency to any hex color and convert to RGBA, HEX8, and HSLA formats
Drop in any hex color, pick an opacity level, and get the RGBA, HEX8, or HSLA value back instantly — no manual math, no guessing what 0.35 alpha looks like on #FF5733. Batch mode lets you convert a whole palette at once if you’re working with multiple brand colors. And everything runs in your browser. Nothing gets uploaded.
How It Works
The hex string gets split into pairs — two characters each for red, green, and blue. Each pair is converted from base-16 to a decimal number between 0 and 255. Your opacity percentage becomes the alpha value (a decimal from 0 to 1). The result is a valid CSS color value you can paste directly into your stylesheet.
Examples
Semi-transparent button hover state
Your primary brand color needs to look lighter on hover without picking a whole new shade.
#3B82F6 at 30% opacity
rgba(59, 130, 246, 0.3)
Dark modal overlay
A common pattern — black background dimmed to 60% so the content behind is still partially visible. Most designers use this exact value for dialog backdrops.
#000000 at 60% opacity
rgba(0, 0, 0, 0.6)
HEX8: #00000099
Shorthand hex for a faded warning badge
3-digit shorthand works too. Quick conversion for a subtle orange background.
#F80 at 15% opacity
rgba(255, 136, 0, 0.15)
HSLA: hsla(32, 100%, 50%, 0.15)
Who Uses This
Adding transparency to brand colors for hover states, overlays, and box shadows in CSS.
Generating exact RGBA values from a hex-based style guide for handoff to developers.
Converting hex to RGBA because some email clients don’t support 8-digit hex codes.
Getting RGBA breakdowns for React Native, Flutter, or SwiftUI color definitions.
Common Mistakes
Some code editors or frameworks expect hex without the hash symbol. If you paste #FF5733 into a field that wants FF5733, the parser chokes. Double-check what format your target expects.
50% opacity equals an alpha of 0.5 — not 50. Writing rgba(99, 102, 241, 50) won’t give you what you want. The alpha value in RGBA always sits between 0 and 1.
8-digit hex (like #6366F1CC) is supported in modern browsers, but older tools and email clients might ignore those last two characters entirely. If you need wide compatibility, stick with the RGBA output.
Technical Details
- Processing: 100% client-side — nothing leaves your browser
- Browser Support: Chrome, Firefox, Safari, Edge
- Input Formats: 3-digit, 6-digit, and 8-digit hex (with or without #)
- Output Formats: RGBA, HEX8, CSS property, HSLA
- Batch Mode: Unlimited colors, one per line
Frequently Asked Questions
What is the difference between HEX and RGBA?
HEX uses a 6-character code like #FF5733 to represent red, green, and blue in base-16. RGBA spells those same channels out as decimals (0–255) and tacks on an alpha value between 0 and 1 for transparency. Standard hex doesn’t have a transparency component — that’s the main reason you’d convert.
How do I add transparency to a hex color in CSS?
Two ways. You can convert the hex to RGBA and set the fourth value (like rgba(99, 102, 241, 0.5)). Or you can use an 8-digit hex code where the last two digits control opacity — #6366F180 is roughly 50%. Both work in all modern browsers.
What does the alpha value mean in RGBA?
Alpha controls how see-through the color is. 1 means fully solid, 0 means completely invisible. So rgba(255, 0, 0, 0.5) gives you a red that’s 50% transparent — whatever’s behind it shows through halfway.
Can I convert shorthand hex like #F00?
Yes. Three-digit shorthand gets expanded automatically — each character is doubled, so #F00 becomes #FF0000 and #ABC becomes #AABBCC. You don’t need to expand it yourself before pasting.
Is this tool free and private?
Completely free, no account needed. All the conversion math runs in JavaScript right in your browser. Nothing gets uploaded, no cookies are set, and the page works offline once it’s loaded.