On white
—
Pick a color with the native picker or type a HEX, RGB or HSL value, then check its contrast, generate a matching palette and copy ready-to-paste CSS — all offline.
3 or 6 digits, with or without #. Shorthand such as #f0a is expanded.
Body text in your color — check how it reads at normal size before you commit to it.
On white
—
On black
—
AA normal text needs 4.5:1, AA large text 3:1 and AAA normal text 7:1. Ratios run from 1:1 (no contrast) to 21:1 (black on white).
The studio has three ways to set a color, and they always agree with each other. Open the native
picker for a visual choice, type a code into the HEX field, or drag the RGB and HSL sliders.
Whatever you touch, the other controls follow immediately: change the hue slider and the red,
green and blue numbers move with it; paste #1e7a53 into the HEX field and the
sliders jump to that position.
#HEX, rgb(), hsl() or a complete CSS custom-property block. Click any generated swatch to make it the current color.Nothing is uploaded. The tool is a single static page, so it also works when you are offline or behind a firewall that blocks third-party services.
All three notations describe the same sRGB color space; they differ only in how they describe it. HEX and RGB are the machine's view — three 8-bit channels. HSL is the designer's view — a hue angle on the color wheel plus saturation and lightness percentages, which makes it far easier to create a lighter tint or a desaturated variant by hand.
| Notation | Shape | Example | Channel range | Best for |
|---|---|---|---|---|
| HEX | Shortest, no function syntax | #2456e6 | 00–ff per channel | Design tokens, brand colors, anywhere brevity matters |
| RGB | rgb(r g b) | rgb(36 86 230) | 0–255 per channel | Values arriving from code, canvas or image data |
| HSL | hsl(h s% l%) | hsl(224 72% 52%) | 0–360°, 0–100%, 0–100% | Building tints, shades and palettes by hand |
| Alpha | Optional fourth value | rgb(36 86 230 / 0.6) | 0–1 or 0–100% | Overlays, disabled states, glass effects |
Two practical notes. First, a HEX code is just base-16 RGB: #2456e6 means red 0x24,
green 0x56, blue 0xe6, or rgb(36 86 230). Second, HSL is a mathematical transform of
that RGB triplet, not a wider color space, so converting a color to HSL and back can shift a
channel by one step because of rounding. If exact fidelity matters, keep the value you started
with — for example the HEX code you copied out of a brand guide.
WCAG contrast is computed from relative luminance, a weighted measure of how much light a color
emits after the sRGB channels are linearised. The ratio between the lighter and darker of two
colors is (L1 + 0.05) / (L2 + 0.05), which runs from 1:1 for two identical colors to
21:1 for black on white. Two thresholds do most of the work in practice:
A few habits make hitting those numbers easier. Check the color against both white and black before you commit — a mid-tone blue may pass on white and fail on a dark theme. Remember that transparency lowers effective contrast, so a 60%-opacity overlay should be checked against the color actually rendered beneath it. And never rely on color alone to carry meaning: pair it with an icon, a label or an underline so the information survives for color-blind readers.
Contrast ratios describe legibility, not taste. Two colors can pass 4.5:1 and still look muddy together. Use the palette generator to find a partner that keeps enough contrast while staying in the same family.
The copy buttons produce values you can paste without editing. A reliable pattern is to declare your color once as a custom property and reference it everywhere, so a rebrand is a one-line change:
:root {
--brand: #2456e6;
--brand-soft: #eaefff;
--brand-ink: #ffffff;
}
.button {
background: var(--brand);
color: var(--brand-ink);
}
.notice {
background: var(--brand-soft);
border: 1px solid var(--brand);
color: #0d1526;
} The Copy CSS variables button emits exactly this shape, using your current color plus a light companion derived from it. A few details worth knowing when you paste color values:
rgb(36 86 230) — and reserves commas for the legacy syntax. Both still work; pick one and stay consistent.rgb(36 86 230 / 60%) or hsl(224 72% 52% / 0.6).@media (prefers-color-scheme: dark) and change only the variables, not the rules that consume them.Yes. The whole studio — conversions, palettes and contrast checks — runs as JavaScript inside your browser. There is no upload, no account and no network request, so it keeps working on a plane or on a locked-down work machine.
Use HEX for solid brand colors, rgb() when you already work with channel values (for example from a design hand-off), and hsl() when you want to create variations by hand. All three describe the same color; HSL is simply easier to reason about because hue, saturation and lightness are separate numbers.
HSL holds the same information as RGB but rounds differently. The tool converts HSL to RGB with standard rounding, so a hue of 210.4° or a lightness of 42.6% becomes a discrete 8-bit color. Round-tripping a color through HSL and back can shift one channel by a single step, which is invisible on screen.
Normal-sized body text needs at least 4.5:1 against its background (AA) or 7:1 (AAA). Large text — roughly 24px regular or 18.66px bold and up — needs only 3:1 at the AA level. User-interface parts such as buttons, borders on inputs and focus rings need 3:1 under the non-text contrast rule.