UtilitiesVault
WCAG 2.1 & 2.2 Contrast Testing Included

Color Picker & Format Converter

Convert color codes across HEX, RGB, and HSL models. Inspect CSS snippets and audit real-time WCAG contrast accessibility ratios for compliant web applications.

Live Preview
#06B6D4
WCAG 2.1 Contrast Ratios
On White (#fff)2.43:1Fails AA
On Black (#000)8.65:1Passes AA ✓
HEX#06B6D4
RGBrgb(6, 182, 212)
HSLhsl(189, 94%, 43%)

Understanding Web Color Models: HEX, RGB & HSL

Modern frontend styling relies on different representations of the sRGB spectrum. Choosing the right format streamlines design systems, programmatic thematic tokens, and dark/light mode toggles.

HEX (Hexadecimal)

A compact 6-character string representing red, green, and blue bytes in base-16. Standard in design mockups (Figma, Adobe XD) and CSS codebases.

#3B82F6
RGB (Red, Green, Blue)

Explicit integer channels ranging from 0 to 255. When paired with an alpha channel (RGBA), it allows precise programmatic opacity blending.

rgb(59, 130, 246)
HSL (Hue, Saturation, Lightness)

Human-centric color modeling. Hue represents the 360-degree color wheel angle, while saturation and lightness control vividness and illumination.

hsl(217, 91%, 60%)

WCAG Accessibility Contrast Requirements Explained

Digital accessibility is legally mandated under the Americans with Disabilities Act (ADA), Section 508, and the European Accessibility Act (EAA). The W3C defines mathematical contrast ratios based on Relative Luminance ($L$):

Contrast Ratio Formula:
(L1 + 0.05) / (L2 + 0.05)
Where L1 is the relative luminance of the lighter color and L2 is the relative luminance of the darker color.

Level AA (Standard)

Mandatory
  • Normal Text: Minimum 4.5:1 ratio.
  • Large Text (18pt / 14pt Bold): Minimum 3.0:1 ratio.
  • UI Components & Icons: Minimum 3.0:1 against adjacent colors.

Level AAA (Enhanced)

Best Practice
  • Normal Text: Minimum 7.0:1 ratio.
  • Large Text: Minimum 4.5:1 ratio.
  • Ensures optimal readability in direct sunlight and for users with extreme low-contrast vision.

Frequently Asked Questions (FAQ)

How do I copy CSS variables from this tool?

Click the copy button adjacent to any generated HEX, RGB, or HSL value to paste it directly into Tailwind CSS configuration files, CSS variables, or Figma color libraries.

Does this converter support alpha transparency channels?

Yes, standard 8-character HEX codes (e.g. #3B82F680) and RGBA/HSLA functional notations are decoded to verify color opacity levels.

Why do colors look slightly different across different monitors?

Different monitors support different color gamuts (e.g. sRGB vs Display P3 vs DCI-P3) and hardware calibration curves. This tool uses the standard sRGB web color space to guarantee cross-device consistency.

Keep Calculating & Converting

Related Free Online Utilities