1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
//! Document-aware color management for Rust.
//!
//! `appthere-color` provides pure-Rust ICC color transforms, CMYK support,
//! soft proofing, and print-ready color policies. It is designed for document
//! authoring applications that need accurate color management without a C
//! toolchain dependency.
//!
//! # Features
//!
//! - **Color value types**: [`RgbColor`], [`CmykColor`], [`LabColor`],
//! [`XyzColor`], [`GrayColor`], and [`ColorValue`]
//! - **ICC profile loading**: [`IccProfile`] wrapping `moxcms` for pure-Rust
//! profile parsing
//! - **Color transforms**: [`ColorTransform`] builder for profile-to-profile
//! conversion
//! - **Soft proofing**: [`ProofingConfig`] with chained two-stage transforms
//! - **Color policy**: [`ColorPolicy`] and [`OutputIntent`] for document-level
//! color management
//!
//! # ICC Backend
//!
//! This crate uses [`moxcms`](https://crates.io/crates/moxcms) exclusively as
//! its ICC backend. No C toolchain is required — the crate cross-compiles
//! cleanly to Android, WASM, and musl targets.
//!
//! # Feature Flags
//!
//! - **`std`** (default): Enables file-path-based profile loading and I/O
//! error support.
//! - **`serde`**: Enables `Serialize`/`Deserialize` derives on color types.
//!
//! # Example
//!
//! ```rust
//! use appthere_color::{
//! ColorTransform, IccProfile, RenderingIntent, RgbColor,
//! };
//!
//! // Load profiles
//! let srgb = IccProfile::new_srgb();
//! let adobe = IccProfile::new_adobe_rgb();
//!
//! // Build a transform
//! let xform = ColorTransform::builder()
//! .source(&srgb)
//! .destination(&adobe)
//! .intent(RenderingIntent::RelativeColorimetric)
//! .build()
//! .unwrap();
//!
//! // Transform a color
//! let input = [1.0_f32, 0.0, 0.0]; // pure red in sRGB
//! let mut output = [0.0_f32; 3];
//! xform.transform(&input, &mut output).unwrap();
//! ```
extern crate alloc;
// Re-export primary types at crate root for ergonomic access.
pub use ColorSpace;
pub use ;
pub use ;
pub use ;
pub use ;
pub use IccProfile;
pub use ;
pub use RenderingIntent;
pub use ColorTransform;