Convert Hex to RGB & RGBA
Decode 3-, 6-, and 8-digit Hex codes into 0–255 RGB integers, normalized floats, and modern space-separated CSS rgb() strings.
0 bytes sent
- 100% browser-local
- Zero server transfers
- CSS Color 4 precision
or drop a color string, CSS/JSON snippet, or file here · Ctrl V to paste · Paste Hex, RGB, HSL, OKLCH or use Screen Eyedropper
Instant Before & After Specimen
CSS4 Space-Separated + RGBA#2563EBrgb(37 99 235)| Property | Source: HEX | Target: RGB |
|---|---|---|
| Gamut scope | sRGB (Standard Web) | sRGB (Standard Web) |
| Perceptual uniformity | No | No |
| Alpha channel support | Yes | Yes |
| Human readability | Medium | Medium |
| Extension / Token | .css / .txt | .css / .json |
| Best for | Compact copy-paste handoff in sRGB brand guidelines and legacy CSS | Pixel buffers, Canvas 2D shaders, and programmatic alpha opacity blending |
How to use Hex to RGB
Hex to RGB — cleanly inside your local browser with zero server transfers.
- Enter or pick a colorType Hex, RGB, HSL, OKLCH, or Lab — or click Screen Eyedropper and live sliders.
- Inspect math & gamutReview exact CSS Color 4 readouts, sRGB vs Display P3 status, and profile options.
- Copy, chain, or exportCopy ready CSS/JSON snippets, download binary swatch files, or pipe directly to related Colr tools.
Frequently asked questions
Does it accept 3-digit shorthand and 8-digit alpha Hex?
Yes — #09F, #2563EB, and #2563EB80 parse cleanly with automatic alpha detection.
Should modern CSS use space-separated rgb() instead of rgba()?
In CSS Color 4, rgb(37 99 235 / 50%) is valid everywhere while older comma syntax remains supported.