Skip to content

Use this result well

Inputs that matter
A color entered as a code or selected with the picker, plus a background color for contrast comparison.
Output to expect
Color-format equivalents, a contrast ratio and pass/fail labels, a sample preview and related palette colors.
How it works
Changing the selected color updates its representations and compares it with the chosen background. The sample keeps the colors you selected.
  • Normal and large text use different contrast thresholds. Check the text size and actual background where the color will appear.
  • A passing color pair does not evaluate an entire page; hover states, images, transparency and neighboring colors need their own checks.
Was this tool helpful?

This tool is part of these guided projects. Each project provides step-by-step instructions with checklists and all the tools you need in one place.

Tools you might need next

Reference & details

How it works

Color Space Conversion

HEX (#RRGGBB) maps directly to RGB (0–255 per channel). HSL (Hue 0–360°, Saturation 0–100%, Lightness 0–100%) provides intuitive adjustment of hue, vividness, and brightness.

HEX #FF5733 = RGB(255, 87, 51) = HSL(11°, 100%, 60%)

WCAG Contrast Ratio

Contrast ratio compares relative luminance of foreground and background colors. WCAG 2.1 requires 4.5:1 for normal text (AA) and 7:1 for enhanced (AAA). Large text (18pt+) needs 3:1 for AA.

Source: W3C WCAG 2.1

Alpha Channel and Transparency

RGBA and HSLA add an alpha channel (0–1 or 0–100%) for opacity. Alpha 1.0 is fully opaque; 0.0 is fully transparent. Useful for overlays, glass effects, and layered UI elements.

Updated: July 2026

Example Scenarios

A designer selects a primary brand color and copies HEX and RGB values for the design system.

Color: #2563EB

RGB(37, 99, 235), HSL(217°, 91%, 53%)

A developer verifies that body text meets WCAG AA contrast against the page background.

Text: #1F2937Background: #FFFFFF

Contrast ratio 12.6:1 — passes AAA

A developer picks a secondary text color on a dark background that meets WCAG AA contrast requirements.

Text: #9CA3AFBackground: #111827

Contrast ratio ~5.5:1 — passes AA for normal text

Common Mistakes to Avoid

Choosing colors that fail contrast requirements

Light gray text (#999) on white often fails WCAG AA (needs 4.5:1). Use the contrast checker before shipping — roughly 1 in 12 men have some form of color vision deficiency.

Confusing HSL lightness with brightness

HSL lightness at 50% with full saturation is vivid, not medium-gray. At 0% lightness you get black regardless of hue. Adjust saturation and lightness together for predictable results.

FAQ

They represent the same color differently. #FF5733 is hexadecimal notation for RGB(255, 87, 51). HEX is compact for CSS; RGB/HSL are easier for programmatic adjustment.

WCAG AA requires 4.5:1 for normal text and 3:1 for large text (18pt+ or 14pt bold). AAA requires 7:1 and 4.5:1 respectively. Higher ratios improve readability for all users, especially in bright environments.

Pick your color and copy the format you need: hex (#2563EB), rgb(37, 99, 235), hsl(217, 91%, 53%), or with alpha as rgba()/hsla() for transparency.

Displays vary in color gamut, calibration, and brightness. sRGB is the web standard, but uncalibrated monitors shift appearance. For critical brand colors, test on multiple devices and consider color management profiles.

HSL is easier for human adjustment — change hue to shift color family, saturation for vividness, and lightness for brightness without recalculating RGB channels. Use RGB when interfacing with APIs or libraries that expect 0–255 channel values.

About Color Picker

Pick colors visually and get instant conversions between HEX, RGB, and HSL formats. Check WCAG contrast ratios for accessibility, generate harmonious palettes, and copy CSS-ready values for your next design or development project.