Website review
This review may include AI-generated content and is not individually verified. Domain, certificate and other facts come from the observed data on this page.
What is color × color?
color × color is a browser-based tool for building accessible color systems for user interfaces. Instead of picking colors by eye, it works in Okhsl or HSLuv — perceptually uniform color spaces — so that steps in lightness and saturation look evenly spaced to the human eye rather than bunching up the way they often do in plain HSL.
What that means in practice
- Perceptually uniform palettes. A 100–900 scale generated in Okhsl or HSLuv tends to look evenly stepped, which matters for text, borders, and background layers in a design system.
- Accessibility built into the workflow. Because lightness is handled predictably, it is easier to reach contrast ratios for body text, labels, and focus states without hand-tweaking each swatch.
- UI-oriented output. The point is a usable set of tokens for components — buttons, inputs, alerts, surfaces — not a decorative mood board.
Who it suits
Designers and front-end developers defining a palette once and reusing it across a product; design-system maintainers who need consistent scales; anyone who has fought with HSL ramps that go muddy or jump in brightness.
Trade-offs to weigh
Okhsl and HSLuv are less familiar than HSL, and browser devtools and some libraries still default to sRGB/HSL, so you may need to convert values or document the space in your tokens. Perceptual uniformity also does not by itself guarantee WCAG contrast — you still need to check pairings.
A useful next step: generate one ramp for your primary brand color and one neutral ramp, then test the darkest and lightest steps against your actual background colors before committing them to tokens. If you want a second opinion on the contrast maths, WebAIM publishes a widely used contrast checker, and W3C hosts the WCAG guidance those ratios come from.
How do I build a perceptually uniform color palette for a UI?
Use a perceptually uniform color space, define lightness steps first, and only then vary hue and chroma. Perceptual uniformity means equal numerical steps look like equal visual steps, so a 10-step scale reads evenly from light to dark instead of bunching up in the shadows or washing out in the highlights.
color × color is built for exactly this task: it generates accessible color systems for UIs and supports Okhsl and HSLuv, both designed for perceptually even results.
A practical workflow
- Pick a target contrast range. Decide the lightest background and darkest text you need, then anchor the scale at those two ends.
- Set lightness increments. With 100–900 scales, keep the lightness delta roughly constant across steps; that is what makes the ramp feel smooth.
- Add hue and chroma per family. Keep hue stable across a family, and let chroma peak in the mid-tones rather than at the extremes.
- Check contrast pairs, not single swatches. Test the combinations you actually ship: body text on surface, muted text on surface, white text on a primary button.
- Generate semantic tokens. Map raw steps to roles such as
surface,border,text-muted,accent-hoverso designers and engineers share one vocabulary.
Choosing a space
| Space | Strength | Trade-off |
|---|---|---|
| HSLuv | Lightness and saturation behave predictably to the eye; easier to reason about | Less directly aligned with modern CSS color work |
| Okhsl | Perceptually uniform with a more natural, less saturated feel; good for UI ramps | Newer, so fewer teams have intuition for it |
| Plain HSL | Familiar and universally supported | Steps are visually uneven; light ramps collapse and mid-tones jump |
If your team already thinks in HSL, HSLuv is the gentler migration. If you are starting fresh and want ramps that look deliberately designed, Okhsl is the stronger default.
A concrete scenario
Suppose you need a grey ramp and a brand blue ramp for a dashboard with light and dark themes. Build both in one uniform space so the grey and blue families share the same lightness rhythm; then a card using grey-200 on grey-50 and a chart using blue-200 on blue-50 will have matching visual weight. In dark mode, invert the role mapping rather than inventing new steps — the same ramp, read from the other end, keeps contrast relationships intact.
Next step: pick one accent color, generate a 9-step ramp, and test just three pairs — body text on background, muted text on background, and button label on accent — before scaling to the full system.
What is the difference between Okhsl and HSLuv color spaces?
Okhsl and HSLuv are both attempts to make HSL-style color picking perceptually uniform, but they target different gamuts and priorities. HSLuv is the older, more widely supported option: it works in the sRGB gamut and guarantees that a given lightness value looks equally light across all hues, which is why it became popular for generating accessible UI palettes. Okhsl is a newer model from the same family of work (Björn Ottosson's Oklab-based color spaces). It also aims for perceptual uniformity but is built on Oklab and is designed to behave more predictably when you push colors toward saturation, and to extend more gracefully toward wider gamuts like Display P3.
For a designer or front-end developer building a color system, the practical differences look like this:
| Aspect | HSLuv | Okhsl |
|---|---|---|
| Underlying model | CIELUV-based | Oklab-based |
| Primary gamut | sRGB | sRGB, with a path toward wider gamuts |
| Main strength | Even perceived lightness across hues | Smoother saturation and hue behavior |
| Maturity and tooling | Long-established, broad library support | Newer, still spreading |
| Typical use | Accessible sRGB palettes, contrast-safe ramps | Modern design systems, future wide-gamut work |
The trade-off is maturity versus behavior. HSLuv is the safer choice if you need broad browser and library support today, or if you are matching an existing sRGB workflow. Okhsl tends to produce more natural-looking gradients and less abrupt shifts as you increase saturation, and it aligns with the Oklab ecosystem that is increasingly used for color interpolation and theming.
A useful next step: open color × color and generate the same palette twice, once in each space, then compare the mid-tones and the most saturated steps side by side. If your palette stays in sRGB and must work across older tooling, HSLuv is usually the pragmatic pick; if you are starting fresh and care about smooth ramps or eventual wide-gamut output, Okhsl is worth adopting.
How can I check whether my color system meets accessibility contrast requirements?
Use a contrast checker on your actual color pairs, not on your palette in isolation. Accessibility depends on which foreground sits on which background, at which text size, so the unit of testing is the pair.
A practical workflow
- List the real combinations your UI uses: body text on page background, muted text on cards, button label on button fill, link on background, icon on surface, focus ring on adjacent colors.
- Test each pair against the WCAG thresholds: 4.5:1 for normal text, 3:1 for large text (roughly 18pt, or 14pt bold) and for non-text UI components and graphical objects.
- Fix failures at the token level, not the component level. If you patch one button, the same failing pair reappears elsewhere.
- Re-test after any change, including dark mode variants and hover/disabled states, which are often forgotten.
Where color × color fits
color × color is built for generating accessible color systems for interfaces, and it works in Okhsl or HSLuv rather than plain HSL. That matters because those spaces are designed to be perceptually uniform: equal numeric steps look like equal visual steps, so a ramp you build stays evenly spaced in lightness, and contrast relationships hold more predictably as you add shades. If you have ever built a scale in HSL and found the mid-tones bunch up or the yellows look far lighter than the blues at the same lightness value, that is the problem this approach addresses.
Practical use: define your neutral and brand ramps in one of those spaces, then assign semantic roles (background, surface, border, text, muted text, accent) to specific steps, and check the resulting pairs.
Trade-offs to weigh
- Perceptually uniform spaces give more reliable ramps, but they are less familiar to designers who think in HSL, and exported values may need conversion for your CSS or design tool.
- A generator helps you build a system that is accessible by construction; it does not audit an existing product. If you already have shipped colors, a pair-by-pair checker is the faster route.
- Passing 4.5:1 is a floor, not a goal. Body text at exactly 4.5:1 can still feel strained for long reading; aim higher for paragraphs and reserve the minimum for incidental labels.
Other tools worth knowing
- WebAIM hosts a widely used contrast checker for quick pair testing, including a lightness slider to find the nearest passing shade.
- Who Can Use shows how a pair performs across different types of vision, which is useful when a pair technically passes but reads poorly.
- W3C publishes the WCAG guidance itself, worth reading once so you know which threshold applies to which element.
Decision criterion
If you are starting a new system, build the ramps in a perceptually uniform space and assign roles deliberately. If you are auditing something existing, check every foreground/background pair you ship, fix at the token level, and re-check dark mode separately.
Can I export my color system to CSS variables or design tokens?
Yes — color × color is built as a tool for creating accessible color systems for UIs, so exporting your palette into CSS variables or design tokens is the natural end use. The site describes using Okhsl or HSLuv color spaces to produce perceptually uniform colors, which matters when you want a generated scale to translate cleanly into a token set without some steps appearing to jump in lightness.
A practical next step is to decide which export format your team actually needs before you build the palette:
- CSS custom properties — best if you want a single stylesheet of
--color-name-stepvariables that designers and developers can reference directly. - Design tokens (JSON) — best if your tokens need to flow into multiple platforms or tools through a pipeline rather than being hand-copied.
- Figma or design-tool styles — best if the main consumer is the design team and code is downstream.
If you are unsure, start with CSS variables for a small pilot component, then move to JSON tokens once the naming convention has settled. Renaming token families later is far more painful than choosing the format up front.
Since the site is oriented around accessible color systems, an example reader scenario is a product team that needs a semantic palette — background, surface, border, text, accent — with contrast-safe pairings. Generating perceptually uniform scales in Okhsl or HSLuv makes it easier to pick steps that hold consistent contrast, and exporting them as named variables keeps those choices consistent across components.
For comparison, other tools in this space include Coolors for fast palette exploration and Huetone for accessibility-focused palette work. Use color × color when the priority is a structured, exportable system rather than quick inspiration.
How do I choose a base color and generate tints and shades that stay perceptually even?
Choose a base colour that already works at mid-lightness, then generate tints and shades in a perceptually uniform space rather than by mixing with white and black in plain sRGB. That single decision is what keeps steps looking evenly spaced instead of bunching up in the light end.
Why the colour space matters
In sRGB, adding white to a saturated blue produces washed-out, greyish steps, and the jump from 90% to 100% lightness looks far smaller than 10% to 20%. Perceptually uniform spaces (Okhsl, HSLuv, Oklab, CIELAB) fix this by making equal numeric steps look like equal visual steps. color × color is built for exactly this: it creates accessible colour systems for UIs and supports Okhsl and HSLuv.
A practical procedure
- Pick a base hue from your brand or a reference image, and set it at a mid lightness (roughly the lightness of a mid-grey when you squint).
- Fix the hue and saturation, then vary only lightness to produce the ramp. Keep hue shifts deliberate — a few degrees towards blue in shadows and towards yellow in highlights often looks more natural, but do it by hand, not by accident.
- Generate 9–11 steps: 2–3 tints, the base, 3–5 shades. More steps give finer control but more tokens to maintain.
- Check contrast at the ends you actually use: text on tinted backgrounds, and white text on the darkest shade. Target at least 4.5:1 for body text and 3:1 for large text or UI borders.
- Test the greyscale version. If two adjacent steps become indistinguishable in greyscale, they are too close.
Choosing the base colour itself
- Start from a colour you can describe in words (muted teal, warm red) rather than a random hex; it is easier to defend and extend.
- Avoid extremes: a base at 95% lightness leaves no room for tints, and one at 15% leaves no room for shades.
- If the colour must work on both light and dark themes, choose a base near the middle so both directions have range.
- Check it against your neutrals. A base that clashes with your greys will look wrong in every component.
Trade-offs to expect
| Approach | Evenness | Effort | Best for |
|---|---|---|---|
| sRGB tint/shade mixing | Poor at the ends | Low | Quick prototypes |
| Perceptually uniform ramp | Good across the scale | Medium | Design systems, themes |
| Hand-tuned per step | Best | High | Brand-critical palettes |
A quick next step: build one ramp of nine steps in a perceptually uniform tool, then place the swatches side by side in greyscale. If the steps look evenly spaced there, the ramp will hold up in real interfaces.
User reviews (0)