LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

pastel

command-line tool for working with colors

TLDR

Display color information
$ pastel color [red]
copy
Show color from hex
$ pastel color ["#ff5500"]
copy
Convert color format
$ pastel format hsl ["#ff5500"]
copy
List color names
$ pastel list
copy
Generate color palette
$ pastel gradient [blue] [red] --number [5]
copy
Pick color interactively
$ pastel pick
copy
Lighten a color
$ pastel lighten [0.2] [blue]
copy
Mix two colors
$ pastel mix [red] [blue]
copy

SYNOPSIS

pastel command [options] [arguments]

DESCRIPTION

pastel is a command-line tool for working with colors. It displays color information, converts between formats, generates palettes, and manipulates colors programmatically.Color input accepts multiple formats: names (red, blue), hex (#ff0000), RGB (rgb(255,0,0)), HSL (hsl(0,100%,50%)), and more. The tool displays color blocks in terminal with accurate previews using true color.The color command shows comprehensive information: RGB, HSL, CIELAB values, closest named color, and contrast information. This helps in design work and accessibility checking.Manipulation functions work in perceptually uniform color spaces (CIELAB) for natural-looking results. Lightening, darkening, and saturation changes appear consistent across the spectrum.Palette generation creates harmonious color schemes. Gradient produces smooth transitions. Distinct generates maximally different colors for visualization. Random creates aesthetic random colors.The paint command enables colored terminal output in scripts. Format conversion helps with CSS, code, and design tool integration.

PARAMETERS

color COLOR

Show color information.
list
List named colors.
format FORMAT COLOR
Convert color to format.
pick
Interactive color picker.
gradient COLOR1 COLOR2
Generate gradient between colors.
mix COLOR1 COLOR2
Mix two colors.
lighten AMOUNT COLOR
Lighten color (0.0-1.0).
darken AMOUNT COLOR
Darken color.
saturate AMOUNT COLOR
Increase saturation.
desaturate AMOUNT COLOR
Decrease saturation.
rotate DEGREES COLOR
Rotate hue.
complement COLOR
Get complementary color.
distinct NUM [COLORS]
Generate distinct colors.
random
Generate random color.
paint COLOR TEXT
Print colored text.
--number N
Number of colors to generate.
--colorspace SPACE
Color space for operations.

INSTALL

sudo dnf install pastel
copy
sudo pacman -S pastel
copy
sudo apk add pastel
copy
sudo zypper install pastel
copy
brew install pastel
copy
nix profile install nixpkgs#pastel
copy

CAVEATS

Requires true color terminal for accurate display. Terminal color accuracy varies. Color perception depends on display calibration. Some operations may produce out-of-gamut results. Interactive picker requires terminal with mouse support.

HISTORY

pastel was created by David Peter (sharkdp) around 2019. Written in Rust, it's part of a suite of modern CLI tools including fd and bat. The tool addresses the need for color manipulation in terminal workflows, design, and accessibility testing. It emphasizes perceptually uniform color operations.

SEE ALSO

color(1), tput(1), convert(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid