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
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.
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
Keep conversion separate from gamut mapping and rendering. Preserve finite extended values, explicit alpha/hue rules and CPU/GPU reference tolerances.