🎨
Color Converter
HEX ↔ RGB ↔ HSL ↔ HSB · tints and shades · WCAG contrast checker
Ctrl+Enter = convert
Tints & Shades
Contrast checker (WCAG 2.2)
Large text — 24px
Normal text at 16px. The quick brown fox jumps over the lazy dog.
—contrast ratio

Color Converter

Free online color converter and contrast checker. Convert colors between HEX, RGB, HSL and HSB with a live preview and visual picker, get tints and shades, and check whether text is readable on a background under WCAG AA and AAA.

Free No login 100% browser-based Your input never leaves your device

Try these next

What is a Color Converter?

CSS and design tools use several color formats interchangeably: HEX (#4f46e5) is common in CSS and design files; RGB (79, 70, 229) is useful when you need to manipulate individual channels; HSL (243°, 75%, 59%) is the most human-intuitive format for adjusting hue, saturation, and lightness. Converting between them by hand is tedious and easy to get wrong.

This tool converts instantly between HEX, RGB, HSL and HSB. Paste any format and get them all, plus the nearest named and Tailwind colour. The contrast checker shows the WCAG 2.2 contrast ratio for any text and background colour, whether it passes AA and AAA for normal and large text, and the nearest text colour that passes AA if yours does not.

What is the difference between HEX, RGB, and HSL?
HEX (#4361ee) is compact, widely used in CSS and design tools. RGB (67, 97, 238) separates red/green/blue channels, useful for programmatic manipulation. HSL (229°, 83%, 60%) maps to how humans think about color: hue, saturation, and lightness.
What contrast ratio does WCAG require for text?
WCAG 2.2 level AA needs a contrast ratio of at least 4.5:1 for normal text and 3:1 for large text and for icons and other UI graphics. Level AAA needs 7:1 for normal text and 4.5:1 for large text. The contrast checker on this page shows the ratio for any text and background colour and which of these levels it passes.
What counts as large text in WCAG?
Large text is at least 18 point (24 px) at normal weight, or at least 14 point (about 18.7 px) in bold. Large text only needs 3:1 contrast for AA because bigger letters are easier to read. Everything smaller is normal text and needs 4.5:1.
Which color format should I use in CSS?
HEX for static colors in stylesheets. HSL for dynamic theming — easy to create lighter/darker variants by adjusting the L value. RGB/RGBA when you need transparency. CSS custom properties (--color: #4f46e5) for design systems where you need to reuse colors across many elements. Modern CSS also supports oklch() for perceptually uniform color manipulation.
What is the difference between HSL and HSB/HSV?
HSL (Hue, Saturation, Lightness) and HSB/HSV (Hue, Saturation, Brightness/Value) look similar but differ in their third component. In HSL, 50% lightness is a "pure" color, 0% is black, 100% is white. In HSB, 100% brightness with 100% saturation is a pure color, 0% brightness is black. Photoshop uses HSB; CSS uses HSL.
How do I convert a Tailwind color to HEX?
Tailwind CSS uses a fixed color palette. In Tailwind v3, for example, indigo-500 is #6366f1, blue-500 is #3b82f6 and green-500 is #22c55e; Tailwind v4 defines the same palette in oklch(), so the values differ slightly. This tool shows the approximate Tailwind color name for any HEX input. For exact Tailwind values, refer to the official Tailwind CSS color reference at tailwindcss.com/docs/customizing-colors.
What is the alpha channel in colors?
Alpha is opacity: 0 is fully transparent and 1 is fully opaque. CSS accepts it as rgb(79 70 229 / 0.8), rgba(79, 70, 229, 0.8), hsl(243 75% 59% / 0.8), or as an 8-digit HEX colour where the last two digits are the alpha, so #4f46e5cc is about 80% opaque (cc = 204 of 255). Design tools usually show alpha as a percentage (0–100%).
✓ Copied!