Pastel Is a new free open source command line tool for working with colors / performing various color operations. It is written in Rust and can convert colors from one format to another, display and analyze colors on the terminal, generate a set of visually different colors, and even have a color picker, and more.
The tool supports many different color formats and color spaces, including RGB, HSL, CIELAB, CIELCh, and ANSI 8-bit and 24-bit representations. Available Pastel subcommands:
color: Display information about a given color
list: Display a list of available color names
random: Generate Random Color List
distinct: Generate a set of visually different colors by maximizing the perception of color differences between paired colors
sort-by: Sort the color list by a given attribute
pick: Select color interactively from the screen (pipette)
format: Convert a given color to a specific format
paint: Print colored text using ANSI escape sequences
gradient: Generate a series of colors interpolated between “Start” and “Stop”. Interpolation is performed in the specified color space
mix: Create a new color by interpolating between two colors in a given color space
saturate: Increase color saturation by the specified amount
desaturate: Reduce color saturation by a specified amount
lighten: Brightens the color by the specified amount
darken: Darken the color by the specified amount
rotate: Rotate the hue channel by a specified angle
complement: Get complementary colors (hue rotation 180 °)
gray: Create a gray tone based on a given brightness
to-gray: Desaturate colors completely (maintain brightness)
textcolor: Returns the readable foreground text color (black or white) for the given background color. This can also be used in the opposite way, creating a background color for a given text color.
It’s worth noting that for the color picker command to work (
pastel pick), You need to install an external color picker, from which the user can choose gpick, color, Grab, Color picker with chameleonYou may also like: 179 color schemes for Gtk-based Linux terminals (Gnome terminal, Tilix, Xfce terminal, etc.), some pastel examples and screenshots:
color Subcommand displays information about 3 colors in hexadecimal (
pastel color 556270 4ecdc4 c7f484):
random Subcommand (
pastel random -n 3 --strategy lch_hue):
sort-by The command sorts 20 random colors by color, and formats the output in hexadecimal format (
pastel random -n 20 | pastel sort-by hue | pastel format hex):
mix Subcommand to create a new color by mixing red and blue in the RGB color space (
pastel mix --colorspace=RGB red blue):You can also use the ” GitHub.
You may want to use Pastel with a terminal emulator that supports “true color” (24-bit), although Pastel does have an 8-bit mode and no color mode. By default, it tries to automatically detect the mode it should run in, but you can also use it on the command line
-m / --color-mode, Then select one of the following modes: 24-bit, 8-bit, Off or Auto.
However, most terminal emulators support “true color”-including iTerm2, Konsole, Termux, and all terminal emulators based on libvte 0.36 or higher, named here Gnome Terminal, Xfce4 Terminal, Terminator, Tilix, Guake , Pantheon Terminal, LXTerminal, Tilda, etc. on. Pastel actually has an option that you can use to check if the terminal emulator supports 24-bit color-all you have to do is run
Pastel released its first version only 5 days ago, but it already has considerable capabilities with many use cases ranging from performing fast, simple operations (such as converting between formats or choosing colors from the screen to using them in scripts It to generate a palette). Or manipulate colors in themes or SVG files, and more.
The gentle release tab has Linux (DEB and Universal) and macOS binaries. You can also install Pastel through Cargo or the AUR package using Arch Linux. Take a look Installation Notes Get details from GitHub.