LinuxCommandLibrary

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.

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)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community