The legend, the popup swatch and the choropleth bins have to equal what R drew and what titiler rendered, so the ramps are shipped rather than re-derived by a JavaScript colour library interpolating in a different space.
Usage
app_palettes(names = c("spectral_r", "viridis", "cividis", "magma"))Details
spectral_r is ColorBrewer Spectral reversed, interpolated in Lab
(colorRampPalette(space = "Lab")), which is what msens::viz uses. The
perceptual ramps come from viridisLite, whose values are matplotlib's own — the
same table titiler renders from. grDevices::hcl.colors() is deliberately not
used: it re-derives them in HCL and, on some builds, errors outright on Cividis.
Unknown names are an error, never a silent substitution: a layer rendered in the wrong ramp is a legend that lies.