Handy Orchard

CSS color space converter

Convert CSS colors between sRGB, Display P3, Lab and OKLCH, with target-gamut checks and mapped output.

Your input

Enter a CSS color expression, not a stylesheet, gradient or CSS variable.

The report keeps unmapped coordinates, then applies Color.js CSS gamut mapping to the chosen output space.

Outputs are cleared when the input changes.

Result

Enter your data or use the example, then run the tool.

Worked example

Display P3 green at alpha 0.5 is outside sRGB. The report exposes the negative/out-of-range unmapped RGB coordinates and a mapped sRGB color while retaining alpha 0.5.

Method

Parse with the exact Color.js source, convert using its color-space transforms, check inGamut and apply its CSS gamut-mapping method. Both pre-mapping and post-mapping coordinates are exported. Preview blocks are static safe color styles.

Limits

One CSS color up to 1000 characters and 3–8 significant output digits. Mapping can change appearance; display hardware and browser color management affect previews. This is not a monitor calibration, ICC profile or image palette tool.

Processing is local in a lazily loaded, fixed-source worker. Cancel or the four-second processing timeout terminates the worker; input is not sent to external services.

Sources

Pinned upstream READMEExact upstream licenseThird-party notices

Related tools

WCAG contrast checkerImage palette extractorPNG palette quantizer

Your inputs stay on this device. Only optional, consented page visits are measured. Input values, files, filenames and processing logs are not sent to Analytics.

When switching languages, text, settings and selected files are temporarily kept on this device. Transfers are removed after restoring; interrupted transfers are cleaned up on a later visit. Inputs and files are never uploaded.