Color & CSS

Runs 100% locally in your browser

Color Converter

Convert HEX, RGB, RGBA, HSL, and OKLCH colors bidirectionally with alpha sliders, CSS variables, and WCAG contrast.

Presets

Live color swatch

Against Black (#000000)

7.49:1

AA Normal: PassAA Large: PassAAA: Pass
Against White (#FFFFFF)

2.80:1

AA Normal: FailAA Large: FailAAA: Fail

Converted color formats

Copy any CSS-ready representation with a single click.

HEX (6-digit)

#f97315

HEX (8-digit)

#f97315ff

RGB

rgb(249, 115, 21)

RGBA

rgba(249, 115, 21, 1)

HSL

hsl(25, 95%, 53%)

OKLCH

oklch(70.48% 0.1869 47.69)

CSS custom property

--brand-color: #f97315;

How to convert HEX, RGB, HSL, and OKLCH colors for modern CSS

Paste any CSS color format and copy every representation

Paste 3, 4, 6, or 8-digit HEX codes, rgb()/rgba() strings, hsl()/hsla() values, or modern CSS Color 4 oklch() tokens into one unified input. Every format updates live alongside red, green, blue, and alpha sliders and a native color picker.

OKLCH perceptual uniformity and WCAG 2.2 contrast checks

OKLCH separates perceptual lightness, chroma, and hue so design-system ramps stay consistent across brand colors. Built-in WCAG 2.2 AA and AAA checks evaluate translucent alpha colors composited over pure black and white surfaces in real time.

Color Converter frequently asked questions

Which color syntaxes can I paste into the Color Converter?
You can paste #RGB, #RGBA, #RRGGBB, #RRGGBBAA, rgb(), rgba(), space-separated CSS Color 4 rgb(r g b / a), hsl(), hsla(), and oklch() strings directly.
Does the converter support transparent colors and alpha compositing?
Yes. Alpha opacity is preserved across 8-digit HEX, RGBA, HSLA, and OKLCH outputs, and WCAG contrast blends translucent colors over black and white before calculating luminance.
Do I still have dedicated HEX to RGB and RGB to HEX pages?
Yes. Use the preset switcher above the workspace anytime if you prefer a dedicated HEX-only or RGB-only input.

Related tools

More browser utilities that run locally with zero uploads.

All tools

Instant AI

Launching a site with these assets?

Find a clean domain name and connect AI agents through Instant AI to research availability and launch faster.

Explore Instant