A nimble tool to automate the process of exporting the prot16 colour schemes into a variety of file formats. The output is used to style applications such as terminal emulators or Vim.
The generator consists of a bash script which parses the sets of variables of each scheme through templates and outputs the result to the terminal (stdout).
Start by cloning the repo:
git clone https://github.com/protesilaos/prot16-generator.git --depth 1
Then enter the directory (all subsequent commands assume you are working within the
Run the script with the necessary arguments (see following section):
./prot16-generator [scheme] [template] [variant]
Available CLI arguments
For the available schemes, run
ls schemes. Similarly, run
ls templates. The
variant must be either
gaia theme for
vim in its
dark variant to the terminal output:
./prot16-generator gaia vim dark
Directly create a new file containing the output and place in on the
./prot16-generator gaia vim dark > ~/Desktop/gaia_dark.vim
Applying the themes
Each application uses a different set of conventions. Below are some tried and tested examples that I have run on Arch Linux as well as Debian and Debian-based distros (Ubuntu and Linux Mint). Technically these should be distro-agnostic, though I cannot be certain of that (please report any issues).
Urxvt saves colour values in either of two places. The most common use case is within the
~/.Xresources. Since that file can contain all sorts of configurations, it is best to append the output of the prot16-generator rather than overwrite its contents.
As such, run the following command:
./prot16-generator gaia urxvt dark >> ~/.Xresources
Notice the use of
>>. It is what appends the output to the file. If your
.Xresources is empty, then just run the following instead (notice the single
./prot16-generator gaia urxvt dark > ~/.Xresources
The other approach to having colour values for urxvt is to source an
.Xcolors file from within the
.Xresources. The file can be located anywhere. For the purposes of this tutorial, it is assumed you have created a directory
# Create directory for urxvt Xcolors mkdir ~/.urxvt-themes # Generate the desired theme and place it in the new directory ./prot16-generator gaia urxvt dark > ~/.urxvt-themes/gaia_dark.Xcolors
Then source that file from within the
.Xresources with the following line (note that comments in
.Xresources start with a
!, not an
Whatever method you use, do not forget to reload the configurations, with
xrdb -merge ~/.Xresources (may need to close all terminals and re-open them).
Much like urxvt, xterm stores its configurations in
~/.Xresources. Append the theme of your choice to the existing configs with the following:
./prot16-generator gaia xterm dark >> ~./Xresources
The theme files can be located in either of two places:
/usr/share/xfce4/terminal/colorschemes/which makes them accessible to all users (requires root privileges).
~/.local/share/xfce4/terminal/colorschemes/for use by the current user (directory path needs to be created if it does not already exist).
Choose whatever option suits your needs, modifying the following command accordingly:
# Create directory if it does not already exist (ONLY for the .local option) mkdir -p ~/.local/share/xfce4/terminal/colorschemes/ # Generate the theme and place it in the created directory ./prot16-generator gaia xfce4-terminal dark > ~/.local/share/xfce4/terminal/colorschemes/gaia_dark.theme
The theme will then be available from the terminal's preferences panel. Specifically, open the Xfce4 Terminal, navigate to
Colours. The themes should be available in the
The theme files can be copied manually or installed as a bundle with a plugin.
The manual method requires you to copy the file to
~/.vim/colors/. Run the following command:
# Create path to colors directory if it does not already exist mkdir -p ~/.vim/colors/ # Generate theme and place it in the newly created directory ./prot16-generator gaia vim dark > ~/.vim/colors/gaia_dark.vim
As for the plugin, you can use your favourite plugin manager. With vim-plug add the following line to your
Then execute the plugin manager's command to update the plugin files.
Once available, the theme is declared with the following options inside the
" Theme syntax enable colorscheme gaia_dark
Roadmap (help is much appreciated)
- Refine the code.
- Improve documentation.
- Improve templates where possible.
- Produce templates for other popular apps (Termite, Kitty, Tilix, etc.).
- Packages for various GNU/Linux distros (if packages are an option, there needs to be a manpage and a more streamlined CLI experience, such as
- Anything else?
Refer to the CHANGELOG.md
GNU General Public License Version 3.
The Prot16 Generator replaces the prot16-builder