Skip to content
All Sizzy Tools
HEX · RGB · HSL · OKLCH · WCAG Contrast

HEX to RGB Color Converter

Convert HEX colors to RGB, RGBA, HSL, and modern CSS oklch() instantly in your browser, with live WCAG contrast scores and nearest Tailwind CSS swatch matching.

Red (R)
Green (G)
Blue (B)
Alpha Opacity100%
Quick Presets
Dark Text (#09090B)
11.01:1
WCAG AAA Pass
White Text (#FFFFFF)
1.81:1
Low Contrast
Nearest Tailwind: cyan-400100% Local
HEX
#22D3EE
RGB / RGBA
rgb(34, 211, 238)
CSS Color 4 RGB
rgb(34 211 238)
HSL
hsl(188 86% 53%)
OKLCH (CSS Color 4)
oklch(79.7% 0.134 211.5)
CSS Custom Property
--brand-accent: #22d3ee;
Tailwind Arbitrary
bg-[#22d3ee] text-[#22d3ee]

How does HEX to RGB conversion work?

A 6-digit hexadecimal color splits into three base-16 byte pairs: #RRGGBB. Converting each pair from hexadecimal (00–FF) to decimal (0–255) yields the Red, Green, and Blue channels. Adding two trailing hex digits (#RRGGBBAA) encodes alpha transparency from 0% to 100%.

Why check OKLCH and WCAG contrast?

Modern CSS Color 4 oklch() provides perceptually uniform lightness so design system shades feel balanced across hues, while WCAG 2.1 contrast ratios ensure text remains legible at 4.5:1 (AA) or 7:1 (AAA) in light and dark modes.

Preview light and dark themes across every viewport at once

Sizzy renders your local app across multiple synced phones, tablets, and desktops — with color-scheme toggles and an 85-tool built-in MCP server for AI coding agents.

Explore Sizzy & MCP