ColorToolkits
Format Converter

Hex to RGBA Converter

Convert 6-digit or 8-digit HEX (#RRGGBBAA) into CSS rgba() syntax with customizable opacity.

Converted (RGBA)
rgba(37, 99, 235, 0.8)
#2563EB
Try presets:

How to Use This Tool

  1. Enter or paste your HEX value or choose one of the curated preset swatches.
  2. Copy the formatted RGBA value directly, or inspect the secondary HEX, RGB, HSL, and OKLCH chips below.
  3. Click into Tailwind Scale Generator or Contrast Checker to validate accessibility on the converted shade.

Key Features

  • Bidirectional parsing supporting CSS Color Level 4 syntax cleanly
  • When an 8-digit hex ends with AA (such as cc = 204), dividing 204 by 255 produces opacity 0.80 inside rgba(37, 99, 235, 0.8).
  • Instant clipboard feedback with live OKLCH and Display-P3 gamut safety
  • Zero server round-trips—every calculation executes immediately in browser memory

Converting Alpha Byte to CSS Opacity [0–1]

When an 8-digit hex ends with AA (such as cc = 204), dividing 204 by 255 produces opacity 0.80 inside rgba(37, 99, 235, 0.8).

Reference Snippet (CSS)

.overlay-panel {
  background: rgba(37, 99, 235, 0.8);
}

Frequently Asked Questions

More Color Tools

View all tools →