Pastel, generate, analyze, convert and manipulate colors from the terminal

about pastel

In the next article we are going to take a look at Pastel. This is a tool that is currently in your version 0.8.1. This program, if we are interested generate, analyze, convert and manipulate colors, it will allow us to do it from the command line. The program is written using Rust, and is released under the licenses Apache License (Version 2.0) Y MIT license.

As I was saying, pastel is a tool to use in the terminal, and with which users can generate, analyze, convert and manipulate colors. Is supports many different formats and color spaces, such as RGB (sRGB), HSL, CIELAB, CIELCh, as well as 8- and 24-bit ANSI representations.

Install Pastel on Ubuntu

As snap package

For install this utility on our Ubuntu system as snap pack (version 0.8.0), we will only need to open a terminal (Ctrl + Alt + T) and execute the installation command in it:

install cake snap

sudo snap install pastel

If at another time you need update the program, when a new version appears, you just need to type the command:

sudo snap refresh pastel

After installation, in a terminal (Ctrl + Alt + T) we can check available options writing in it:

command cake

pastel -h


Removing this application from our system is as simple as installing it. It will only be necessary open a terminal (Ctrl + Alt + T) and use the corresponding uninstall command in it:

uninstall pastel snap

sudo snap remove pastel

As a .deb package

The latest version of this program can be found available from the project releases page. In addition, to get the latest version (0.8.1) published today, we will also have the possibility of opening a terminal (Ctrl + Alt + T) and using wget to download the required .deb package:

download cake deb package


When the download is complete, we can proceed to install the package. To do this, in the same terminal we will execute:

install cake deb

sudo dpkg -i pastel_0.8.1_amd64.deb

At the end of the installation, it only remains to start using the program. For check that the installation was successful, you just have to type in the command line:

pastel version

pastel -V


For remove the installed program with the .deb package, it is only necessary to open a terminal (Ctrl + Alt + T) and execute in it:

uninstall cake deb

sudo apt remove pastel

A quick look at Pastel

Get help

This tool will provide us with a series of options, such as saturate, blend or paint. For see a complete list of all the possibilities that it offers us, it is only necessary to write in the terminal the name of the program:


For get more information about a specific option (for example, paint), we can use in the terminal:

pastel paint -h

Another way to get the same result, it would be writing:

one option help

pastel help paint

Show the name of a color

The option format name is going to show us the name of a given color:

format name

pastel format name 44ca12

Show details of a color

The option color will show us information about the colors that we add in hexadecimal:

colorful details

pastel color 0E5478 c7f484

Get random colors

We will be able get two random colors using option random of this tool as follows:

random colors

pastel random -n 2

Channel options

A lot of the options that we can use with pastel can be composed by channeling the output of one command to another. An example of this would be:

channel cake options

pastel random | pastel mix red | pastel lighten 0.2 | pastel format hex

Pass colors as arguments

Colors can be pass as positional arguments. An example of this would be:

pass color arguments

pastel lighten 0.2 orchid orange lawngreen

Read colors from standard input

Too colors can be read from standard input:

read standard input

printf "%sn" orchid orange lawngreen | pastel lighten 0.2

Mix colors

When using the option mix we will be able to create a new color. For example, if we mix yellow and red in the RGB color space, the result obtained would be the following:

mix colors with pastel

pastel mix --colorspace=RGB yellow red

Format conversion

This tool will also allow us convert colors from one format to another:

color conversion

pastel format hsl ff8000

Users can consult interesting resources from one of the sections offered in the project’s GitHub repository.

Add Comment