Free color tools · No signup · Everything runs in your browser
Web and UI

How to Use Modern CSS Color Lab: A Beginner’s Guide

Learn how to compare color-mix() spaces, compile fallbacks, build relative-color recipes, inspect wide gamut, test browser support, and export a modern CSS color system.

Direct answer

Start with two source colors, compare their resolved result in sRGB and OKLCH, then compile a static fallback before adding modern CSS features. Build UI states from one canonical color, inspect gamut, run live CSS.supports() tests in your browser, and export the complete pack for cross-browser and accessibility review.

At a glance

InputTwo colors or existing CSS
Core outputFallback + modern CSS
RunsLocally in the browser
ReviewSupport, gamut, and contrast

Start with two source colors

The Lab uses the same source colors across interpolation, compiler, recipe, gamut, and export views.

  1. 1

    Choose Color A as the canonical brand or source color.

  2. 2

    Choose Color B as the color mixed into the source.

  3. 3

    Set the contribution percentage.

  4. 4

    Compare the resolved result across sRGB, Oklab, OKLCH, Lab, LCH, HSL, and Display P3.

  5. 5

    Select the interpolation space that preserves the intended visual character.

Compile fallbacks before enhancements

Unsupported modern values should not remove the usable baseline.

  • Declare deterministic sRGB values first.
  • Place color-mix(), relative colors, light-dark(), contrast-color(), Display P3, and device-cmyk() in focused @supports blocks.
  • Do not assume support for one feature implies support for every CSS Color 5 feature.
  • Keep print-planning values separate from screen values.

Build repeatable UI states

Use one source color to generate related states instead of maintaining disconnected literals.

  1. 1

    Open Recipe builder.

  2. 2

    Review hover, active, subtle, border, focus, and disabled states.

  3. 3

    Change the operation or amount when the generated relationship does not match the component.

  4. 4

    Check the computed fallback and modern expression together.

  5. 5

    Send the final state colors to Design System Doctor for token architecture review.

Inspect gamut and fallback change

A valid CSS color can still be outside the display gamut.

  • Check whether the source is inside sRGB, Display P3, and Rec. 2020.
  • Review clipped sRGB channels.
  • Compare the browser-rendered source with the deterministic sRGB fallback.
  • Use the reported ΔE00 as evidence of how much the fallback changes.

Test the current browser

Live parsing tests are more useful than a support table alone.

  1. 1

    Open Browser support.

  2. 2

    Review CSS.supports() for each feature.

  3. 3

    Treat a supported result as parsing evidence, not proof of correct rendering or accessibility.

  4. 4

    Test the exported page in the real browser matrix before release.

Export a reviewable implementation pack

The complete ZIP keeps code, tokens, evidence, and project state together.

  • progressive-enhancement.css
  • fallback.css and modern-enhancements.css
  • color-tokens.json and recipe.json
  • gamut and refactor reports
  • migration bridge and restorable project JSON

Understand the limits

The Lab helps engineering decisions but does not certify the implementation.

Put the guide into practice

Open Modern CSS Color Lab

Compare, compile, inspect, refactor, and export modern CSS color systems.

Open the Lab

Frequently asked questions

Should I always choose OKLCH for color-mix()?

No. OKLCH often gives a more perceptually even path, but the correct space depends on the intended relationship. Compare the resolved results and test the actual component.

Can the Lab replace browser compatibility testing?

No. CSS.supports() checks the current browser. Test the generated output in every browser and device required by the product.

Is the generated CSS safe to paste directly into production?

Treat it as a reviewable implementation starting point. Confirm semantic names, fallback behavior, contrast, themes, and component integration first.

Primary references

These sources support the standards and technical explanations in this guide. Color Pick recommendations and product-specific limitations are identified separately in the article.

  1. CSS Color Module Level 4W3C
  2. CSS Color Module Level 5W3C
  3. CSS colorsMDN Web Docs
Keep it colorful

Enjoying Color Pick?

Color Pick stays free, private, and account-free. Optional donations help cover hosting, testing, and new color tools.

Donate via SociabuzzOptional. Every tool remains free.