RGBA extends RGB with Alpha channel for transparency. While CSS supports rgba() directly, some tools require 8-digit HEX (#RRGGBBAA) where last two digits encode alpha. Converts RGBA to both 6-digit HEX (no alpha) and 8-digit HEX (with alpha), with live preview over checkerboard to visualize transparency.
Without alpha: #663399
rgba(102, 51, 153, 0.75)
Opacity: 75%
color: #663399BF;color: #663399;color: rgba(102, 51, 153, 0.75);color: hsla(270, 50%, 40%, 0.75);Enter Red, Green, Blue values (0-255) and an Alpha value (0 to 1 for opacity) using the inputs or sliders. The tool generates both a standard 6-digit HEX code (without alpha) and an 8-digit HEX code (with alpha). A checkerboard pattern behind the color preview visualizes the transparency level. Copy either format with one click for use in your CSS or design tools.
RGBA-to-HEX conversion is needed when working with semi-transparent colors in CSS, converting overlay colors from design tools that use RGBA notation, creating transparent backgrounds for UI components, generating color values for CSS custom properties that need to include alpha, and working with Canvas API or WebGL where colors may need to be specified in different formats with varying transparency levels.
The 8-digit HEX format (#RRGGBBAA) encodes alpha as the last two hexadecimal digits, where 00 is fully transparent and FF is fully opaque. The alpha conversion formula is: Math.round(alpha * 255).toString(16).padStart(2, '0'). This format is supported in CSS Color Level 4 and all modern browsers. The tool also generates the equivalent rgba() CSS function for compatibility with older codebases.
Enter the Red, Green, Blue values (0-255) and the Alpha value (0-1). The tool converts each channel to hexadecimal: the RGB channels produce 6 hex digits, and the alpha channel (multiplied by 255) produces 2 more hex digits. For example, rgba(255, 0, 0, 0.5) = #FF000080.
An 8-digit HEX code (#RRGGBBAA) includes transparency. The first 6 digits represent the color (same as standard HEX), and the last 2 digits represent the alpha channel: 00 = fully transparent, FF = fully opaque, 80 ≈ 50% opacity.
Yes. All modern browsers support 8-digit HEX colors (#RRGGBBAA) and 4-digit shorthand (#RGBA). This includes Chrome 62+, Firefox 49+, Safari 10+, and Edge 79+.
Multiply the alpha (0 to 1) by 255 and convert to hex. Examples: alpha 1.0 = FF, 0.75 = BF, 0.5 = 80, 0.25 = 40, 0 = 00. The formula is: Math.round(alpha * 255).toString(16).
Transform, format, generate, and encode data instantly. Private, fast, and always free.
Browse All Tools