Paleta is a tool for changing terminal colors on the fly, independently of the used terminal emulator. It supports VTE terminal emulators (GNOME Terminal, Xfce Terminal, Mate Terminal, Guake, Termite, etc.), Konsole, Alacritty, Kitty, Xterm and urxvt (and probably others).
Its developer describes how Paleta works:
Most terminal emulators support a set of escape sequences which allow for the modification of the terminal’s color palette. Combined with the ability to write to all open terminal devices, this allows for theming in a truly independent way.
Paleta reads a list of colors over <stdin>, transforms the input into the set of escape sequences and sends these sequences to every open terminal in the system. It additionally prints the sequences to <stdout>.
So for terminal emulators that support color changing escape sequences, Paleta can change the colors of all open terminals on the fly. This is not permanent, and subsequently launched terminals will use your previously set terminal colors. You can make it permanent though, by adding a simple command (
cat ~/.cache/current-palette) to your
~/.zshrc (or whatever other shell you’re using) file.
Besides the Paleta program itself, the GitHub repository also contains more than 150 terminal color palettes that you can use with this tool.
It’s worth noting that besides the supported terminal emulators mentioned above, Paleta also supports st (simple terminal), but only with the help of a patch.
You might also like: 179 Color Schemes For Your Gtk-Based Linux Terminal (Gnome Terminal, Tilix, Xfce Terminal, More)
This is a small GIF demo of Paleta I’ve recorded earlier, to show its ability to change terminal colors on the fly using GNOME Terminal:
In this demo I’m using Starship, a fast shell prompt written in Rust, as my prompt.
How to install and use Paleta to change terminal colors on-the-fly, and make the change permanent
For Arch Linux / Manjaro there’s a Paleta AUR package that you can use to easily install this tool. This installs the Paleta program, but not the color palettes that are available in its GitHub repository.
To install the latest Paleta from Git, make sure you have
git installed, then clone the repository (we’ll clone it as a hidden
.paleta folder in your home directory, so later we can use the terminal color palettes that come in this Git repository), build and install (into
/usr/local/bin) the program:
git clone https://github.com/dylanaraps/paleta ~/.paleta
makesudo make install
Now you can use Paleta to change the colors of all running terminal emulators (we’ll use the
nord terminal color palette in this example):
paleta < ~/.paleta/palettes/nord > ~/.cache/current-palette
In this command, I assume you’ve cloned the Paleta GitHub repository into
~/.paleta as explained above. If not, adjust the path from the command above to the
palettes folder on your system (replacing
~/.paleta/palettes/nord in the command).
Or, change the terminal color palette to the
5peter-dark theme (from the
paleta < ~/.paleta/palettes/5peter-dark > ~/.cache/current-palette
In the same way, change the terminal color palette to any theme available in the paleta/palettes folder.
You might also like: Display Weather Forecast In Your Terminal With Wttr.in
Once you’ve settled on a terminal color palette, you can make it permanent (so each time you open a terminal, it uses this color palette) by adding
cat ~/.cache/current-palette in your
~/.zshrc (or for whatever other shell you’re using).
Insert this line in your
~/.zshrc file and source the file by using the commands below (only run the echo cat… command once, because it adds the same line each time you run it, without checking if it already exists):
echo 'cat ~/.cache/current-palette' >> ~/.bashrcsource ~/.bashrc
echo 'cat ~/.cache/current-palette' >> ~/.zshrcsource ~/.zshrc
You might also like: eDEX-UI: A Fully Functioning Sci-Fi Computer Interface Inspired By TRON Legacy