Extensions

xgpui-color

Standalone CPU color conversions and reusable WGSL math; zero runtime dependencies by default, with optional ICC parsing.

xgpui-color

Choose a color task → · Demo walkthroughs and limits →

Open Pixels + metadata ↗Demo source

Open Color & gamut ↗Demo source

Read the xgpui-color: standalone color math guide →

Public surface at a glance

EncodedRgb, LinearRgb, RgbSpace, XyzD65, Oklab, Oklch, GamutMapping, LinearRgba, LinearGradient and WGSL_COLOR_MATH. No GPUI or GPU context required. Browser color demo reports its sRGB canvas separately from P3 display capability; a native companion displays paired sRGB/P3 samples.

Open library entrypoint ↗ · Browse the crate source ↗

API documentation

Rustdoc for the published crate is on docs.rs ↗. It documents the latest release, which can lag the repository.

Dependencies

Dependencies, optional features and target conditions are declared in Cargo.toml ↗.

Boundary to investigate

Review hypothesis. No visibility changes or removal decisions have been made.

Keep conversion separate from gamut mapping and rendering. Preserve finite extended values, explicit alpha/hue rules and CPU/GPU reference tolerances.