Install the binary globally:
bun add -g @shbernal/rampkit-clirampkit '#451dc7' # tailwind-v4 @theme (default)
rampkit rebeccapurple -f css-vars -n brand # other format + token name
rampkit '#0ea5e9' --color oklch -f css-vars # emit oklch() values
rampkit '#0ea5e9' -f json --preview # JSON to stdout, swatches to stderr
echo '#0ea5e9' | rampkit -f hex-array # read color from stdin
rampkit --help| Flag | Description |
|---|---|
-f, --format |
Output format: tailwind-v4, css-vars, tailwind-config, json, hex-array. |
-n, --name |
Token name used in the emitted output. |
--color |
Value syntax for each stop: hex, rgb, hsl, oklch. |
--preview |
Print color swatches (to stderr). |
--help |
Show usage. |
Data output goes to stdout so it stays clean for piping. --preview
swatches and any diagnostics go to stderr. This means:
rampkit '#0ea5e9' -f json --preview > colors.jsonwrites only the JSON to colors.json while the swatches still render in your
terminal.
The color can also be read from stdin, so rampkit composes in pipelines:
echo '#0ea5e9' | rampkit -f hex-arrayRun rampkit with no arguments in an interactive terminal to launch the
TUI instead.