Skip to main content

Color Converter & Palette Generator

Convert colors between formats and generate harmonious palettes

EVT·T42
Color System

About the Color Converter & Palette Generator

The Color Converter & Palette Generator parses any input format — HEX (3/4/6/8 digit), rgb()/rgba(), hsl()/hsla() — and renders the equivalents instantly. HSL sliders let you fine-tune in a perceptually intuitive space, color-harmony generators produce complementary, analogous, triadic, and split-complementary palettes, and a built-in WCAG contrast checker validates AA (4.5:1) and AAA (7:1) thresholds against any chosen background.

It is built for front-end developers picking design-token colors, designers translating a Figma frame into CSS-ready values, brand teams stress-testing accessibility on a proposed palette, marketers matching a hex pulled from a screenshot, and anyone tired of switching between three different sites to convert / harmonize / contrast-check a single color. A 3D color-space visualization renders via Three.js for users who want to see where their color lives.

Every conversion runs locally in your browser. Color values, palette ranges, and contrast tests never leave your device. The page makes no network call after first load. Pre-launch brand palettes — especially in competitive industries — are exactly the kind of input that does not belong on a third-party color tool that logs every query.

HEX, RGB, and HSL are all sRGB-bound; they cannot represent colors outside that gamut (HDR cinema, wide-gamut P3 displays, modern phone screens). For wide-gamut work, prefer oklch() or color(display-p3 ...) in your CSS. Contrast checks use the WCAG 2.1 luminance formula; the newer APCA (Accessible Perceptual Contrast Algorithm) being prototyped for WCAG 3 gives different results, especially for small text on light backgrounds.

Privacy100% client-side · colors never transmitted
StandardsCSS Color L4 · WCAG 2.1 contrast · sRGB
Last reviewed2026-05-14 by Dennis Traina
#
HEX (#3B82F6), RGB (rgb(59,130,246)), or HSL (hsl(217,91%,60%))
#3B82F6
HEX #3B82F6
RGB rgb(59, 130, 246)
HSL hsl(217, 91%, 60%)
Click & drag to rotate
Sample Text
The quick brown fox jumps over the lazy dog
Contrast Ratio: 8.59:1
AA Normal
AA Large
AAA Normal
AAA Large
WCAG contrast checker requires subscription
Tints & shades requires subscription
Save requires subscription
Honey-Do Tracker — home maintenance for landlords and property managers

How to Use the Color Converter

Type or paste any color value into the input field — HEX codes like #3B82F6, RGB values like rgb(59, 130, 246), or HSL values like hsl(217, 91%, 60%). The tool auto-detects the format and instantly converts to all three. Drag the HSL sliders to explore variations, click a palette swatch to load it as the active color, and rotate the 3D visualization to see where your color sits in the color space.

HEX vs. RGB vs. HSL: When to Use Each

HEX is the most compact format and the standard in CSS. It is great for quick communication and code, but hard to mentally manipulate. RGB describes colors as mixtures of red, green, and blue light (0–255 each). It maps directly to how screens display color but is unintuitive for design decisions. HSL (Hue, Saturation, Lightness) is the most human-friendly: pick a hue on the color wheel, set how vivid you want it, then adjust brightness. Use HEX in your code, RGB when debugging rendering, and HSL when designing.

Color Theory: Building Harmonious Palettes

Color harmony is based on geometric relationships on the color wheel. Complementary colors sit opposite each other (180° apart) and create maximum contrast. Analogous colors are neighbors (30° apart) and feel cohesive and calm. Triadic colors form an equilateral triangle (120° apart), offering vibrant variety. Split-Complementary uses the two colors adjacent to the complement, giving contrast with less tension. Each scheme has its personality — the best choice depends on your project’s mood and purpose.

WCAG Accessibility and Contrast Ratios

The Web Content Accessibility Guidelines (WCAG) define minimum contrast ratios between text and background colors to ensure readability for people with visual impairments. AA requires a ratio of at least 4.5:1 for normal text and 3:1 for large text (18pt+ or 14pt bold). AAA requires 7:1 for normal text and 4.5:1 for large text. Over 300 million people worldwide have color vision deficiency — checking contrast is not optional, it is a professional responsibility.

Tints, Shades, and Tones Explained

A tint is a color mixed with white (increasing lightness). A shade is a color mixed with black (decreasing lightness). A tone is a color mixed with gray (decreasing saturation). These are the building blocks of any robust design system. By generating a 9-step scale from a single base color, you create a consistent palette for backgrounds, borders, hover states, and text without introducing new hues.

The 3D Color Space

The interactive 3D visualization shows the HSL color space as a cylinder. The vertical axis represents lightness (black at bottom, white at top), distance from center represents saturation, and the angle around the cylinder represents hue. Your selected color is marked with a glowing sphere. This spatial view helps you understand relationships between colors that are invisible in flat pickers — like why desaturated pastels all cluster near the center axis regardless of hue.

Color Accessibility and Contrast Ratios

WCAG defines two compliance levels for text contrast: AA requires a minimum ratio of 4.5:1 for normal-sized text and 3:1 for large text (18pt or 14pt bold), while AAA raises those thresholds to 7:1 and 4.5:1 respectively. Contrast ratio is calculated from the relative luminance of each color, which is derived from the linearized RGB channel values using the formula L = 0.2126R + 0.7152G + 0.0722B — not simply from HSL lightness. Two colors with identical HSL lightness values can still produce very poor contrast if their luminance contributions from R, G, and B channels differ significantly; for example, a saturated yellow and a saturated blue at the same lightness will yield a much higher contrast ratio than two colors that appear similar in the HSL model. Always verify contrast with a proper calculator before shipping, rather than relying on visual intuition alone.

Once you have your colors dialed in, you may want to bring them into your stylesheets directly — the CSS Generator lets you build and preview CSS rules using your converted color values. If you are working on written content alongside your design work, the SEO Content Analyzer can help ensure your pages are as well-optimized as your color palette.

Frequently Asked Questions

What is the difference between HEX, RGB, and HSL?

HEX is a base-16 shorthand for RGB and is the CSS standard for static colors. RGB describes light as 0 to 255 values for red, green, and blue channels, matching how displays emit light. HSL separates hue, saturation, and lightness, which makes it easier to create related color variations by hand.

How is WCAG contrast ratio calculated?

WCAG 2.1 defines contrast as (L1 + 0.05) / (L2 + 0.05), where L1 and L2 are the relative luminances of the lighter and darker colors. Normal body text needs a ratio of at least 4.5:1 for AA compliance and 7:1 for AAA.

Can HEX represent transparency?

Yes. An 8-digit HEX code like #3B82F680 appends a two-digit alpha channel where 00 is fully transparent and FF is fully opaque. This eight-digit form is supported in all modern browsers per the CSS Color Module Level 4 specification.

Why does the same HEX look different on two monitors?

Monitors have different color gamuts and calibration. A color defined in sRGB will shift on a wide-gamut P3 display unless the CSS declares a color space. Using color-managed formats like oklch() or tagging assets with ICC profiles reduces drift across devices.

What is the HSL equivalent of pure white or pure black?

Pure white is hsl(0, 0%, 100%) and pure black is hsl(0, 0%, 0%). Because saturation is zero, the hue value is irrelevant and any number produces the same result.

137 Foundry — custom app building studio
137 Foundry — custom app building studio
Honey-Do Tracker — home maintenance for landlords and property managers
Link copied to clipboard!