Releases: shbernal/rampkit
Releases · shbernal/rampkit
v0.1.0
First public release of rampkit — generate Tailwind-style color ramps (50–950) from a single input color (preserved at its natural stop) and emit them in multiple formats. A clean-room reimplementation of the technique popularized by tints.dev.
Packages
| Package | Install | Use |
|---|---|---|
@shbernal/rampkit |
npm i @shbernal/rampkit |
import { ramp, format } — the ESM-only OKLCH ramp engine |
@shbernal/rampkit-cli |
npm i -g @shbernal/rampkit-cli |
rampkit '#451dc7' (CLI) or bare rampkit (interactive TUI) |
Highlights
- OKLCH ramp engine — 3-anchor perceptual lightness distribution, per-stop hue/chroma tweaks, input preserved at its anchor stop. Options:
anchor,chroma,hueShift,lMin/lMax,colorSpace. - Multi-format output —
tailwind-v4(@theme),css-vars,tailwind-config,json,hex-array. - Multiple color syntaxes — emit each stop as
hex,rgb,hsl, oroklch; values serialize from internal OKLCH and are gamut-mapped into sRGB. - CLI — stdin/stdout piping (clean stdout for pipes;
--previewswatches to stderr). - Interactive TUI (Ink 7 / React 19) — two focusable panes, live swatch preview, clipboard copy that works over SSH (OSC 52).
- Any CSS color string culori understands is accepted as input.
Requirements
- Library: Node ≥ 18, ESM-only.
- CLI/TUI: Node ≥ 22.
MIT licensed. See the docs for the full library API, CLI reference, and TUI guide.