By Debmedia Technologies LLP · Kolkata, India · Updated
What Is It and When Do You Need It?
Opacity lets a color show what is behind it. CSS lets you write opacity in the color itself, either as rgba() with a number from 0 to 1, or as an eight-digit HEX with the opacity in the last two digits.
This calculator gives both forms, and works out the flat color that results over a background, which is handy for email, print and design tools without transparency.
How to Use This Tool
- Type the color.
- Enter the opacity as a percentage.
- Type the background color you expect behind it.
- Press Calculate and copy the format you need.
How the Calculation Works
The opacity percentage times 255 divided by 100 gives the alpha byte. The blended color for each channel is color × alpha + background × (1 − alpha). This is the standard alpha compositing formula.
Worked Example
#1d4ed8 at 50 percent is #1D4ED880 or rgba(29, 78, 216, 0.5). Over white it looks like #8EA7EC.
Common Uses
- Overlays and shadows in CSS.
- Finding a flat color that matches a transparent one.
- Email templates and print files.
- Design handoff.
Tips and Common Mistakes
- Opacity 0 is fully transparent and 100 is fully solid.
- The solid result changes with the background color.
- Round alpha to two decimals in rgba().
Related Tools
Next, you may need the color converter, color mixer, gradient generator, color contrast checker.
Everything runs in your browser. Nothing you type is uploaded, stored or sent to any outside service.
Frequently Asked Questions
Disclaimer: results are calculated in your browser from the numbers you enter. Check important results before you rely on them for money, health, safety or legal decisions.