GamutDesk Logo
GamutDesk

RGBA to 8-Digit HEX Converter

Convert rgba() values with transparency into modern 8-character hexadecimal web codes (#RRGGBBAA).

Client-Side ArchitecturePrivate Client-Side Processing
RGBA Channels
Red (0 - 255)
Green (0 - 255)
Blue (0 - 255)
Alpha Opacity (0.00 - 1.00)0.85
8-Digit Hex
#2563EBD9
8-Digit Hex (#RRGGBBAA)
#2563EBD9
Standard CSS String:rgba(37, 99, 235, 0.85)

HEX Color Opacity & Alpha Transparency Table (0% to 100%)

Reference chart for 8-digit hexadecimal color values (#RRGGBBAA). Map percentage opacity and decimal alpha (0.00 – 1.00) directly to 2-digit hex alpha codes.

Opacity %Decimal Alpha2-Digit HexBase-16 CalculationExample Output
100%1.00FFround(1.00 × 255) = 255#2563EBFF
95%0.95F2round(0.95 × 255) = 242#2563EBF2
90%0.90E6round(0.90 × 255) = 230#2563EBE6
85%0.85D9round(0.85 × 255) = 217#2563EBD9
80%0.80CCround(0.80 × 255) = 204#2563EBCC
75%0.75BFround(0.75 × 255) = 191#2563EBBF
70%0.70B3round(0.70 × 255) = 179#2563EBB3
60%0.6099round(0.60 × 255) = 153#2563EB99
50%0.5080round(0.50 × 255) = 128#2563EB80
40%0.4066round(0.40 × 255) = 102#2563EB66
30%0.304Dround(0.30 × 255) = 77#2563EB4D
25%0.2540round(0.25 × 255) = 64#2563EB40
20%0.2033round(0.20 × 255) = 51#2563EB33
15%0.1526round(0.15 × 255) = 38#2563EB26
10%0.101Around(0.10 × 255) = 26#2563EB1A
5%0.050Dround(0.05 × 255) = 13#2563EB0D
0%0.0000round(0.00 × 255) = 0#2563EB00

Technical Specification & Mathematical Principles

The RGB channels (0-255) are converted to base-16 strings.

The alpha opacity a ∈ [0.0, 1.0] is multiplied by 255: AA = Math.round(a * 255).toString(16).padStart(2, '0'), producing the 8-digit representation #RRGGBBAA.

Frequently Asked Questions

How is the 8th and 7th character in an 8-digit hex code calculated?
The alpha float (0.0 to 1.0) is multiplied by 255, rounded to an integer (0 to 255), and converted to a two-character hexadecimal string with padding: `Math.round(alpha * 255).toString(16).padStart(2, '0')`.
Do modern browsers support 8-digit hex codes?
Yes, CSS Color Module Level 4 standardized 8-digit hex (#RRGGBBAA) and 4-digit hex (#RGBA), and all modern desktop and mobile browsers fully support it.
What is the equivalent of 50% opacity in hex?
50% opacity (alpha 0.5) corresponds to `0.5 * 255 = 127.5`, which rounds to integer 128, producing hex `80` (e.g. `#00000080`).

Related Design & Color Instruments