Pywal-like color palette generator, but faster and in C
  • C 92.4%
  • CSS 3.8%
  • Shell 1.8%
  • Emacs Lisp 1.4%
  • Vim Script 0.2%
  • Other 0.4%
Find a file
2026-03-05 12:14:25 +01:00
assets add fish shell completions (#45) 2025-11-18 12:24:01 +01:00
templates add Xresources template (#55) 2026-03-05 12:14:25 +01:00
themes fixed .hex, .rgb while using keyword like (background, foreground etc.), themes adjustments, added rgb template, changed directories errors to warn, to allow to use same variable as path 2024-11-27 20:53:48 +01:00
.gitignore fixed .hex, .rgb while using keyword like (background, foreground etc.), themes adjustments, added rgb template, changed directories errors to warn, to allow to use same variable as path 2024-11-27 20:53:48 +01:00
hell_colors.h Add WCAG relative luminance calculations (#39) 2025-07-25 19:06:42 +02:00
hell_parser.h removed TEMPLATE_ARG, OUTPUT_NAME_ARG - I've come to conclusion that it's useless ; changed how 'variables' are parsed. Now index of colors ex. "color|0|.hex" is depracated. Use "color0.hex" instead ; added support for static themes, for example you can add gruvbox, catppuccin etc ; added THEME_ARG, THEME_FOLDER_ARG ; added keyword "wallpaper" for wallpaper path ; added example themes in ./themes folder ; 2024-11-26 02:00:16 +01:00
hellwal.c fix: https://github.com/danihek/hellwal/issues/46 2025-08-08 21:04:32 +02:00
LICENSE forgot abt license 2024-11-27 20:59:32 +01:00
Makefile --version flag, and VERSION file 2025-05-02 16:14:57 +02:00
README.md Improve script/template documentation (#43) 2025-11-18 12:20:45 +01:00
stb_image.h ayooo 2024-11-20 01:12:15 +01:00
VERSION Update VERSION 2025-09-04 11:56:21 +02:00

Hellwal - Fast, Extensible Color Palette Generator

Preview of color palettes generated by hellwal

Star History

Click to expand star history

Star History Chart

Installation

  1. Archlinux:
yay -S hellwal
  1. Mac/Linux via Homebrew:
brew install hellwal
  1. NixOS, nixpkgs unstable:
environment.systemPackages = [
  pkgs.hellwal
];

Building

Clone git repo, run make command and you are ready to go! - you just need a C compiler and gnumake!

git clone https://github.com/danihek/hellwal && cd hellwal && make

How to use?

Run this with your wallpaper image:

hellwal -i [image]

You can also randomly pick an image from a given directory like this:

hellwal -i <folder> --random

Generated templates are saved in ~/.cache/hellwal/.

Templates

[INFO] - if you got hellwal from the AUR, examples of default templates can be found in /usr/share/docs/.

There are also examples in the templates folder. They look more-less like this:

# Main
background='%%background%%'
foreground='%%foreground%%'

# Path
wallpaper_path='%%wallpaper%%'

# Colors
color0='%%color0.hex%%'
color1='%%color1.hex%%'

# ... and so on and so forth.

color15='%%color15.hex%%'


# RGB
backgroundRGB='%%background.rgb%%'
foregroundRGB='%%foreground.rgb%%'

color15butRGB='%%color15.rgb%%'

You can get any generated color for values 0 to 15.

After the color keyword, you can specify the format: hex, rgb, or a single rgb channel. By default, the template output is in hex.

Available color template formats:

Type Input Output
hex color0.hex 000000
rgb color0.rgb 0, 0, 0
r color0.r 0
g color0.g 0
b color0.b 0

Additional variables accepted by templates

Alongside colors, you can specify some variables to make them more suitable for your needs. For now these variables are available:

Variable Description Usage
alpha Set transparency value %% color1.hex alpha=0.5 %%

alpha is ignored for single rgb channels.

JSON

You can use the --json argument to suppress any other output and write colors to stdout in JSON format. You can then manipulate the output with jq. For example:

hellwal -i [wallpaper] --json | jq '.'

Themes

You can set your own theme, re-run it anytime and apply it to your config or other programs! It can be a previously generated palette from an image, gruvbox, Tokyo Night, or anything you want! For example, gruvbox theme:

%% color0  = #282828 %%
%% color1  = #cc241d %%
%% color2  = #98971a %%
%% color3  = #d79921 %%
%% color4  = #458588 %%
%% color5  = #b16286 %%
%% color6  = #689d6a %%
%% color7  = #a89984 %%
%% color8  = #928374 %%
%% color9  = #fb4934 %%
%% color10 = #b8bb26 %%
%% color11 = #fabd2f %%
%% color12 = #83a598 %%
%% color13 = #d3869b %%
%% color14 = #8ec07c %%
%% color15 = #ebdbb2 %%

Save the text above as a file or copy gruvbox from this repo and just run hellwal:

hellwal --theme ./themes/gruvbox.hellwal

I recommend putting all themes in the default theme folder ~/.config/hellwal/themes. This way, you can provide the theme name without specifying the path, and hellwal will pick it up automatically. Of course if you want, you can also set a different theme folder. For example:

hellwal -t gruvbox.hellwal --theme-folder ~/dotfiles/configs/hellwal/themes

NEON Mode

Neon mode boosts colors to make them look more vibrant and bold. Sometimes it's a pain in the EYE, but it often looks better. Turned off by default.

hellwal -i [wallpaper] --neon-mode

Modes

You can select -d/--dark or -l/--light mode on any given image, theme, etc., no matter if it's generated from an image or from a theme file. There is also --color mode.

Dark mode (on by default)

hellwal -i [wallpaper] --dark

Light mode

hellwal -i [wallpaper] --light

color mode (crazyy one)

hellwal -i [wallpaper] --color

The best thing about it is that you are able to combine all of these together. Usually it's not a good idea, but sometimes you can achieve some crazy color combinations!

hellwal -i [wallpaper] --color --light --dark

Also, you have a couple of cool arguments to manipulate how colors will be computed:

  • you can darken all colors by specifying --dark-offset from 0-1 (the higher the value, the darker the colors):
hellwal -i [wallpaper] --light --dark-offset 0.5
  • same with --bright-offset (the higher the value, the brighter the colors):
hellwal -i [wallpaper] --bright-offset 0.5
  • invert colors with --invert:
hellwal -i [wallpaper] --light --invert
  • specify grayscale, if you want monochromatic colors, with --gray-scale:
hellwal -i [wallpaper] --color --gray-scale 0.8
  • ensure colors are readable against the background with --check-contrast:
hellwal -i [wallpaper] --check-contrast

Scripts

With --script or -s you can run a script (or any shell command) after hellwal.

Note: it will only run if hellwal does not encounter any errors.

On a side note:

If you want your new terminals to open with a previously generated or specified color palette, add these templates to your ~/.config/hellwal/templates/ folder:

Run hellwal with an image or theme to generate the output scripts from the templates.

Then in .bashrc, add following lines:

source ~/.cache/hellwal/variables.sh
sh ~/.cache/hellwal/terminal.sh

Alternatively if you use fish:

Then add this to your fish config:

source ~/.cache/hellwal/variablesfish.fish
sh ~/.cache/hellwal/terminal.sh

Showcase

More showcases of hellwal's generated palettes with various wallpapers

Special thanks: