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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
//! # Prismatica -- Scientific Colormaps for Rust
//!
//! 308 scientific colormaps + 70 discrete palettes from 10 collections:
//! matplotlib, Crameri, CET, CMOcean, ColorBrewer, CMasher, NCAR, CartoColors, Moreland, and d3.
//!
//! ```
//! use prismatica::crameri::BATLOW;
//! let color = BATLOW.eval(0.5);
//! println!("RGB: ({}, {}, {})", color.r, color.g, color.b);
//! ```
//!
//! ## Feature Flags
//!
//! | Feature | Colormaps | Description |
//! |---------|-----------|-------------|
//! | `core` (default) | 48 | matplotlib (8) + Crameri (40) |
//! | `cet` | +59 | Peter Kovesi's perceptually uniform maps |
//! | `cmocean` | +22 | Oceanographic colormaps |
//! | `colorbrewer` | +35 (+35 palettes) | Cynthia Brewer's cartographic palettes |
//! | `cmasher` | +53 | Astrophysics colormaps |
//! | `ncar` | +44 | NCAR NCL geoscience maps |
//! | `cartocolors` | +34 (+34 palettes) | CARTO cartographic maps |
//! | `moreland` | +6 | Cool-warm, black body, Kindlmann |
//! | `d3` | +7 (+1 palette) | Turbo, Rainbow, Sinebow, Cubehelix, Tableau10 |
//! | `all` | 308 (+70 palettes) | Everything |
//!
//! ## Framework Integrations
//!
//! All integrations provide bidirectional conversion via `From`/`Into`.
//! Enum-based types (ratatui, crossterm, colored, cursive, comfy-table) use
//! `TryFrom` for the reverse direction.
//!
//! | Feature | Framework | Type |
//! |---------|-----------|------|
//! | `egui-integration` | egui | `Color32` |
//! | `plotters-integration` | plotters | `RGBColor` |
//! | `image-integration` | image | `Rgb<u8>` |
//! | `palette-integration` | palette | `Srgb<u8>` |
//! | `bevy-color-integration` | bevy_color | `Srgba` |
//! | `iced-integration` | iced | `iced::Color` |
//! | `macroquad-integration` | macroquad | `macroquad::Color` |
//! | `tiny-skia-integration` | tiny-skia | `tiny_skia::Color` |
//! | `wgpu-integration` | wgpu | `wgpu::Color` |
//! | `slint-integration` | slint | `slint::Color` |
//! | `ratatui-integration` | ratatui | `ratatui::Color` |
//! | `crossterm-integration` | crossterm | `crossterm::Color` |
//! | `colored-integration` | colored | `colored::Color` |
//! | `owo-colors-integration` | owo-colors | `owo_colors::Rgb` |
//! | `termion-integration` | termion | `termion::color::Rgb` |
//! | `cursive-integration` | cursive | `cursive::Color` |
//! | `comfy-table-integration` | comfy-table | `comfy_table::Color` |
//! | `syntect-integration` | syntect | `syntect::Color` |
//! | `serde-support` | serde | Serialize/Deserialize |
//! | `all-integrations` | all of the above | |
//!
//! ## Choosing a Colormap
//!
//! - **Sequential data** (temperature, elevation, concentration):
//! `batlow`, `viridis`, `oslo`, `thermal`
//! - **Diverging data** (anomalies, residuals):
//! `berlin`, `vik`, `balance`, `smooth-cool-warm`
//! - **Cyclic data** (phase, direction, time-of-day):
//! `romaO`, `phase`, `twilight`
//! - **Categorical data** (labels, classes):
//! `SET2`, `DARK2`, `PAIRED`, `Tableau10`
//!
//! ## Minimum Supported Rust Version
//!
//! Prismatica requires Rust **1.85** or later (edition 2024).
extern crate alloc;
pub use *;
pub use *;
pub use *;
// -- Collection modules (feature-gated) --