Skip to content

sickagents/palette-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎨 Palette CLI

A lightweight command-line tool for managing, previewing, and exporting terminal color palettes.

Features

  • 📦 Built-in Palettes: Includes popular themes (Dracula, Nord, Solarized, Gruvbox, etc.)
  • 🎨 Preview: See colors rendered in your terminal with ANSI codes
  • 📤 Export: Convert palettes to multiple formats (JSON, YAML, iTerm2, Alacritty, Windows Terminal)
  • Custom Palettes: Create and save your own color schemes
  • 🔍 Search: Find palettes by name or color values
  • 🌈 Color Utilities: Convert between HEX, RGB, and ANSI codes

Installation

pip install palette-cli

Or install from source:

git clone https://github.com/sickagents/palette-cli.git
cd palette-cli
pip install -e .

Quick Start

# List all available palettes
palette list

# Preview a palette in your terminal
palette preview dracula

# Export a palette to iTerm2 format
palette export dracula --format iterm2 -o dracula.itermcolors

# Create a custom palette
palette create my-theme --base03 "#002b36" --base0 "#839496"

# Search for palettes with specific colors
palette search --color "#ff5555"

Usage

List Palettes

palette list
palette list --category dark

Preview Colors

palette preview nord
palette preview gruvbox-dark --detailed

Export Formats

Supported export formats:

  • json - Simple JSON structure
  • yaml - YAML format
  • iterm2 - iTerm2 color scheme (.itermcolors)
  • alacritty - Alacritty YAML config
  • windows-terminal - Windows Terminal JSON
  • xresources - X Resources format
  • kitty - Kitty terminal config
palette export solarized-dark --format alacritty -o ~/.config/alacritty/colors.yml

Create Custom Palettes

palette create my-palette \
  --black "#1e1e1e" \
  --red "#f44747" \
  --green "#4ec9b0" \
  --yellow "#ffcc00" \
  --blue "#0078d4" \
  --magenta "#bc3fbc" \
  --cyan "#11a8cd" \
  --white "#e5e5e5"

Color Conversion

# Convert HEX to RGB
palette convert "#ff5555" --to rgb

# Convert RGB to ANSI
palette convert "255,85,85" --from rgb --to ansi

Built-in Palettes

  • Dracula: Dark theme with vibrant colors
  • Nord: Arctic, north-bluish color palette
  • Solarized Dark/Light: Precision colors for machines and people
  • Gruvbox Dark/Light: Retro groove color scheme
  • One Dark: Atom's iconic One Dark theme
  • Monokai: Sublime Text's default color scheme
  • Tokyo Night: Clean, dark theme inspired by Tokyo's night
  • Catppuccin: Soothing pastel theme

Configuration

Palettes are stored in ~/.config/palette-cli/palettes/

# Set default palette
palette config set default-palette dracula

# Set default export format
palette config set default-format alacritty

Development

# Install development dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Format code
black palette_cli/
ruff check palette_cli/

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License - see LICENSE file for details

Credits

Built with ❤️ by the sickagents team

About

A CLI tool for managing and previewing terminal color palettes with export to multiple formats

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages