Skip to main content
SyntixDev

Color Converter & WCAG Contrast

DevOps & Frontend

Color converter + WCAG 2.1 contrast checker, visual CSS/Tailwind gradient & shadow studio, and OG Meta tag previewer.

100% client-side — files and inputs never leave your browser.

HEX: #34d399
RGB: rgb(52, 211, 153)
HSL: hsl(158deg, 64%, 52%)
Tailwind nearest: emerald-400 (#34d399)
Palette & Shades

Contrast Ratio Preview — 10.31:1

The quick brown fox jumps over the lazy dog 0123456789.

WCAG AA Normal (>=4.5:1): PASS
WCAG AA Large (>=3.0:1): PASS
WCAG AAA Normal (>=7.0:1): PASS
WCAG AAA Large (>=4.5:1): PASS
About this tool and how it works

Color formats and accessible contrast

Paste a color in HEX, RGB, or HSL and get the other formats instantly, the nearest Tailwind CSS palette color, and a starter palette — complementary and triadic hues plus a lighter and a darker shade — for building a scheme. A contrast checker scores any text/background pair against the WCAG accessibility guidelines.

Which format to use

  • HEX (#0EA5E9) — compact, universal in design tools and CSS.
  • RGB (rgb(14 165 233)) — matches how screens mix light; easy to add alpha.
  • HSL (hsl(199 89% 48%)) — hue, saturation, lightness; the easiest to tweak by hand, e.g. darken a button on hover by lowering lightness.

WCAG contrast levels

Contrast ratio ranges from 1:1 (identical colors) to 21:1 (black on white).

  • AA — at least 4.5:1 for normal text and 3:1 for large text (24px, or 18.66px bold) and UI components.
  • AAA — at least 7:1 for normal text and 4.5:1 for large text.

Low contrast is one of the most common accessibility failures on the web, and it also hurts readability for everyone on phones in sunlight. Gray placeholder text and light brand colors on white are typical offenders.

Fixing a failing pair

Keep the hue and adjust only lightness in HSL until the ratio passes. For a brand color that cannot change, use it for large elements or backgrounds and pair it with near-black or white text.

Frequently asked questions

Is the nearest Tailwind color an exact match?

Only when the distance is zero. Otherwise it is the closest default Tailwind palette color, useful when you want to stay within the design system.

Does WCAG contrast apply to icons and buttons?

Yes. WCAG 2.1 requires 3:1 contrast for meaningful graphics and UI component boundaries, such as input borders and icon-only buttons.

Why does the same HEX look different on another screen?

Displays differ in color gamut and calibration. HEX values are sRGB; wide-gamut screens may show them more saturated unless the browser color-manages the page.

Other tools