A fast, safe, and complete color management system in Rust.
Combine the best of all CMS implementations:
| Source | Contribution |
|---|---|
| moxcms | Rust safety, SIMD performance, modern API |
| lcms2 | Full ICC v4.4, CMYK, DeviceLink, CIECAM02 |
| skcms | OSS-Fuzz hardening, HDR (PQ/HLG) |
| qcms | Firefox battle-tested reliability |
| Phase | Status | Description |
|---|---|---|
| Phase 1: Test Infrastructure | Complete | Parity tests, CI, documentation |
| Phase 2: Core Implementation | In Progress | See "Relationship with moxcms" below |
| Phase 3: Feature Parity | Planned | CMYK, DeviceLink, advanced features |
| Phase 4: Beyond lcms2 | Planned | HDR, fuzzing, profile creation |
oxcms currently wraps moxcms, an excellent Rust CMS by @awxkee. We're actively contributing bug fixes upstream:
- PR #139 - ARM64 NEON register fix
- PR #140 - V2 ICC white point handling
- PR #141 - Flexible version parsing
The long-term approach is undecided. We're evaluating:
- Continue wrapping - Maintain oxcms as a stable API layer over moxcms
- Deeper collaboration - Contribute features directly to moxcms
- Independent implementation - Build from scratch if our requirements diverge
We prefer options 1 or 2. The goal is to improve the Rust color management ecosystem, not fragment it.
- Workspace with oxcms-core, cms-tests, skcms-sys
- 185 parity tests (all passing)
- Cross-CMS comparison (moxcms, lcms2, qcms, skcms)
- DeltaE2000 accuracy measurement
- CI on Ubuntu, Windows, macOS (x86_64 + ARM64)
- ARM64 NEON bug identified and fixed in moxcms fork
- Math differences documented
oxcms-core provides a stable API layer:
- Clean public types that don't leak moxcms internals
- All transforms currently delegated to moxcms
- Additional validation and error handling
# Run all tests
cargo test --all
# Run parity tests with output
cargo test -p cms-tests -- --nocapture
# Run specific test category
cargo test -p cms-tests lcms2_parity -- --nocapture
cargo test -p cms-tests math_differences -- --nocaptureuse oxcms_core::{ColorProfile, Layout, TransformOptions};
// Create profiles
let srgb = ColorProfile::new_srgb();
let p3 = ColorProfile::new_display_p3();
// Create transform
let transform = srgb.create_transform_8bit(
Layout::Rgb,
&p3,
Layout::Rgb,
TransformOptions::default(),
).unwrap();
// Transform pixels
let src = [255u8, 128, 64];
let mut dst = [0u8; 3];
transform.transform(&src, &mut dst).unwrap();oxcms/
├── crates/
│ ├── oxcms-core/ # Main CMS implementation (wraps moxcms)
│ ├── cms-tests/ # Cross-CMS parity tests
│ └── skcms-sys/ # FFI bindings to skcms
├── external/
│ └── moxcms/ # Forked moxcms with ARM64 fix
├── testdata/
│ └── corpus/ # 121 ICC test profiles
├── docs/ # Architecture, math differences
├── plans/ # Roadmap, implementation plan
└── tracking/ # Test status
- Architecture - Design and structure
- Roadmap - Implementation phases
- Implementation Plan - Detailed approach
- Math Differences - CMS comparison results
- Test Status - Current test coverage
All CMS implementations produce identical output for sRGB transforms:
| Comparison | Max ΔE | Status |
|---|---|---|
| moxcms vs lcms2 | 0.0000 | IDENTICAL |
| moxcms vs qcms | 0.0000 | IDENTICAL |
| qcms vs lcms2 | 0.0000 | IDENTICAL |
| Operation | Target | Reference |
|---|---|---|
| sRGB→sRGB 1MP | < 1ms | moxcms baseline |
| sRGB→P3 1MP | < 2ms | moxcms baseline |
| ICC parse | < 100μs | moxcms baseline |
Goal: Match or exceed moxcms performance (3x+ faster than lcms2).
| Library | Language | Status |
|---|---|---|
| moxcms | Rust | Primary reference, forked with fixes |
| lcms2 | C | Accuracy reference |
| skcms | C++ | Security model reference |
| qcms | Rust | Firefox's CMS |
This project was developed with assistance from Claude (Anthropic). While the code has been tested against multiple reference implementations and passes 185+ tests including cross-CMS parity validation, not all code has been manually reviewed.
Before using in production:
- Review critical code paths for your use case
- Run your own validation against expected outputs
- Consider the test suite coverage for your specific requirements
MIT OR Apache-2.0