TL;DR — Quick Summary
pastel generates, converts, and analyzes colors from the command line. Mix, lighten, darken, convert between HEX/RGB/HSL, check contrast — all in your terminal.
pastel puts a full color toolkit in your terminal. Generate palettes, convert formats, mix colors, check contrast — no browser needed.
Installation
# macOS
brew install pastel
# Arch Linux
sudo pacman -S pastel
# Cargo
cargo install pastel
Usage
# View a color (shows preview block)
pastel color '#ff6600'
pastel color steelblue
pastel color 'rgb(255, 102, 0)'
# Convert between formats
pastel format hex 'hsl(24, 100%, 50%)' # → #ff6600
pastel format hsl '#ff6600' # → hsl(24, 100%, 50%)
pastel format rgb steelblue # → rgb(70, 130, 180)
# Color manipulation
pastel lighten 0.2 '#ff6600' # Lighten by 20%
pastel darken 0.2 '#ff6600' # Darken by 20%
pastel saturate 0.3 steelblue # Increase saturation
pastel desaturate 0.3 '#ff6600' # Decrease saturation
pastel rotate 180 '#ff6600' # Complementary color
# Mix colors
pastel mix red blue # Purple
pastel mix --fraction 0.3 red blue # More red
# Generate palettes
pastel random # One random color
pastel random -n 8 # 8 random colors
pastel distinct 5 # 5 visually distinct colors
# Color info
pastel color '#ff6600' | pastel format hex
pastel list # List all named colors
# Gradient
pastel gradient -n 10 red blue # 10 steps from red to blue
# Pipe-friendly
echo '#ff6600' | pastel lighten 0.1 | pastel format hsl
Summary
- pastel generates, converts, and manipulates colors from CLI
- Supports HEX, RGB, HSL, Lab, LCh, and named CSS colors
- Lighten, darken, saturate, desaturate, rotate, mix colors
- Generate random palettes and gradients
- Written in Rust — pipe-friendly for scripting