WebGroundwebground.app
Utilities · Design Tool

Color Converter & Contrast Checker

Convert colors between HEX, RGB, and HSL, pick colors visually, and check text contrast ratios against WCAG AA and AAA accessibility levels.

Color formats

HEX
#4f46e5
RGB
rgb(79 70 229)
HSL
hsl(243 75% 59%)

Contrast checker (WCAG)

The quick brown fox jumps over the lazy dog.

The quick brown fox jumps over the lazy dog.

Contrast ratio

14.62:1

  • AA Normal text ≥ 4.5:1Pass
  • AA Large text ≥ 3:1Pass
  • AAA Normal text ≥ 7:1Pass
  • AAA Large text ≥ 4.5:1Pass
  • AA UI components ≥ 3:1Pass

HEX, RGB, and HSL Explained

HEX and RGB describe the same red, green, and blue channels: #4F46E5 is rgb(79 70 229). HSL describes the same color as hue (0–360°), saturation, and lightness, which is easier to adjust by hand.

Type a value in any of these formats or use the color picker, and every other format updates instantly.

WCAG Contrast Requirements

The Web Content Accessibility Guidelines measure contrast from 1:1 (no contrast) to 21:1 (black on white).

  • AA normal text: at least 4.5:1.
  • AA large text (about 24px, or 19px bold): at least 3:1.
  • AAA normal text: at least 7:1; AAA large text: at least 4.5:1.
  • UI components and graphics: at least 3:1.

Frequently Asked Questions

Which color formats can I type?+

3, 4, 6, or 8-digit HEX (with or without #), rgb() and rgba(), and hsl() and hsla() in both comma and space syntax.

How is the contrast ratio calculated?+

Each color's relative luminance is computed from its sRGB channels, then the ratio is (lighter + 0.05) ÷ (darker + 0.05), as defined by WCAG 2.

Does transparency affect the contrast check?+

Yes. A translucent text color is blended over the background, and a translucent background over white, so the ratio reflects what is actually rendered.

Explore More on WebGround

View all