prismatica 0.2.0

308 scientific colormaps as compile-time Rust constants
Documentation
[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.2.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"]

[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"] }

[lints]
workspace = 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"