prismatica 0.3.0

308 scientific colormaps as compile-time Rust constants
[workspace]
members = ["xtask"]

[workspace.lints.clippy]
unwrap_used = "deny"
all = { level = "warn", priority = -1 }

[workspace.lints.rust]
unsafe_code = "forbid"

[package]
name = "prismatica"
version = "0.3.0"
edition = "2024"
rust-version = "1.85"
description = "308 scientific colormaps as compile-time Rust constants"
license = "GPL-3.0-only"
repository = "https://github.com/resonant-jovian/prismatica"
documentation = "https://docs.rs/prismatica"
readme = "README.md"
keywords = ["colormap", "scientific", "visualization", "perceptual", "data-viz"]
categories = ["no-std", "science", "visualization"]
exclude = ["data/", "xtask/"]

[features]
default = ["std", "core"]

# Allocation support (enables to_css_hex, colors, all_colors)
std = ["alloc"]
alloc = []

# Essential scientific colormaps: matplotlib + crameri
# (the maps that Nature Communications and most journals recommend)
core = ["matplotlib", "crameri"]

# Individual collections (308 colormaps + 70 discrete palettes total)
matplotlib = []       # 8 maps: viridis, inferno, magma, plasma, cividis, twilight, mako, rocket
crameri = []          # 40 maps: batlow, berlin, roma, oslo, tokyo, hawaii, etc.
cet = []              # 59 maps: CET-L*, CET-D*, CET-C*, CET-R*, CET-I*, CET-CB*
cmocean = []          # 22 maps: thermal, haline, solar, ice, deep, balance, etc.
colorbrewer = []      # 35 maps + 35 palettes: Blues, RdBu, Set2, Spectral, etc.
cmasher = []          # 53 maps: ember, ocean, gothic, neon, fusion, etc.
ncar = []             # 44 maps: NCAR NCL geoscience colormaps
cartocolors = []      # 34 maps + 34 palettes: Burg, Mint, Bold, Vivid, etc.
moreland = []         # 6 maps: cool-warm, black-body, Kindlmann, fast
d3 = []               # 7 maps + 1 palette: Turbo, Rainbow, Sinebow, Tableau10, etc.

# Everything
all = [
    "matplotlib", "crameri", "cet", "cmocean", "colorbrewer",
    "cmasher", "ncar", "cartocolors", "moreland", "d3",
]

# Framework integration (optional dependencies)
egui-integration = ["dep:egui"]
plotters-integration = ["dep:plotters"]
image-integration = ["dep:image"]
serde-support = ["dep:serde"]
palette-integration = ["dep:palette"]
ratatui-integration = ["dep:ratatui"]
crossterm-integration = ["dep:crossterm"]
colored-integration = ["dep:colored"]
owo-colors-integration = ["dep:owo-colors"]
termion-integration = ["dep:termion"]
cursive-integration = ["dep:cursive_core"]
comfy-table-integration = ["dep:comfy-table"]
syntect-integration = ["dep:syntect"]
bevy-color-integration = ["dep:bevy_color"]
iced-integration = ["dep:iced_core"]
macroquad-integration = ["dep:macroquad"]
tiny-skia-integration = ["dep:tiny-skia"]
wgpu-integration = ["dep:wgpu-types"]
slint-integration = ["dep:slint"]

# Note: termion-integration is excluded because termion is unix-only.
# On unix, add termion-integration separately if needed.
all-integrations = [
    "egui-integration", "plotters-integration", "image-integration", "serde-support",
    "palette-integration", "ratatui-integration", "crossterm-integration",
    "colored-integration", "owo-colors-integration",
    "cursive-integration", "comfy-table-integration", "syntect-integration",
    "bevy-color-integration", "iced-integration", "macroquad-integration",
    "tiny-skia-integration", "wgpu-integration", "slint-integration",
]

[dependencies]
libm = "0.2.16"
egui = { version = "0.34.0", optional = true, default-features = false }
plotters = { version = "0.3.7", optional = true, default-features = false }
image = { version = "0.25.10", optional = true, default-features = false }
serde = { version = "1.0.228", optional = true, features = ["derive"] }
palette = { version = "0.7.6", optional = true, default-features = false, features = ["std"] }
ratatui = { version = "0.30.0", optional = true, default-features = false }
crossterm = { version = "0.29.0", optional = true, default-features = false }
colored = { version = "3.1.1", optional = true, default-features = false }
owo-colors = { version = "4.3.0", optional = true, default-features = false }
# termion is Unix-only; see [target.'cfg(unix)'.dependencies] below
cursive_core = { version = "0.4.6", optional = true, default-features = false }
comfy-table = { version = "7.2.2", optional = true, default-features = false, features = ["tty"] }
syntect = { version = "5.3.0", optional = true, default-features = false, features = ["default-themes"] }
bevy_color = { version = "0.18.1", optional = true, default-features = false, features = ["std"] }
iced_core = { version = "0.14.0", optional = true, default-features = false }
macroquad = { version = "0.4.14", optional = true, default-features = false }
tiny-skia = { version = "0.12.0", optional = true, default-features = false, features = ["std"] }
wgpu-types = { version = "29.0.1", optional = true, default-features = false }
slint = { version = "1.15.1", optional = true }

[lints]
workspace = true

[package.metadata.docs.rs]
all-features = true

[dev-dependencies]
image = { version = "0.25.10", features = ["png"] }
insta = "1.42.2"
plotters = { version = "0.3.7", features = ["svg_backend"] }
proptest = "1.6.0"
egui = "0.34.0"
palette = { version = "0.7.6", features = ["std"] }
ratatui = "0.30.0"
crossterm = "0.29.0"
colored = "3.1.1"
owo-colors = "4.3.0"
# termion is Unix-only; see [target.'cfg(unix)'.dev-dependencies] below
cursive_core = "0.4.6"
comfy-table = { version = "7.2.2", features = ["tty"] }
syntect = { version = "5.3.0", features = ["default-themes"] }
bevy_color = { version = "0.18.1", features = ["std"] }
iced_core = "0.14.0"
macroquad = "0.4.14"
tiny-skia = { version = "0.12.0", features = ["std"] }
wgpu-types = "29.0.1"
slint = "1.15.1"

[target.'cfg(unix)'.dependencies]
termion = { version = "4.0.6", optional = true, default-features = false }

[target.'cfg(unix)'.dev-dependencies]
termion = "4.0.6"