Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 65 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# Hellwal - Fast, Extensible Color Palette Generator

<p align="center">
<img align="center" src="https://raw.githubusercontent.com/danihek/trashcan/refs/heads/main/output.gif" alt="Preview" width="500">
<img
src="https://raw.githubusercontent.com/danihek/trashcan/refs/heads/main/output.gif"
alt="Preview of color palettes generated by hellwal"
width="500"
>
</p>

### Star History
Expand Down Expand Up @@ -40,7 +44,7 @@ environment.systemPackages = [

## Building

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

```sh
git clone https://github.com/danihek/hellwal && cd hellwal && make
Expand All @@ -54,18 +58,20 @@ Run this with your wallpaper image:
hellwal -i [image]
```

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

```sh
hellwal -i <folder> --random
```

Generated, templates are saved in ``~/.cache/hellwal/`` directory.
Generated templates are saved in `~/.cache/hellwal/`.

## Templates
**[INFO]** - if you got hellwal from **AUR**, examples of default templates are stored in `/usr/share/docs/`

Look up for templating examples in [templates folder](./templates), they look more-less like this:
**[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](./templates). They look more-less like this:

```sh
# Main
Expand All @@ -79,7 +85,7 @@ wallpaper_path='%%wallpaper%%'
color0='%%color0.hex%%'
color1='%%color1.hex%%'

# ... and so on and so fourth.
# ... and so on and so forth.

color15='%%color15.hex%%'

Expand All @@ -92,38 +98,43 @@ color15butRGB='%%color15.rgb%%'

```

You can get any generated color between 0-15 values.
By writing '.' after keyword you can specify type: hex or rgb. If you havent specify this output of template will be in hex.
You can get any generated color for values 0 to 15.

After the color keyword, you can specify the format: hex or rgb. 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 |

### Addtional variables accepted by templates
### Additional variables accepted by templates

Alongside with colors you can specify some variables to make them more suitable for your needs.
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 %%` |
| Variable | Description | Usage |
| -------- | ---------------------- | ---------------------------- |
| alpha | Set transparency value | `%% color1.hex alpha=0.5 %%` |

## JSON

You can use ``--json``argument to suppress any other output and write colors to ``stdout`` in json format. It's easy to do something with it with ``jq`` later. For example:
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:

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

## Themes

You can set your own theme, re-run it anytime and apply to your config or other programs!
It can be previously generated palette from image, gruvbox, tokyonight or anything you want!
For example gruvbox theme:
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](https://github.com/morhetz/gruvbox),
[Tokyo Night](https://github.com/tokyo-night/tokyo-night-vscode-theme),
or anything you want! For example, gruvbox theme:

```sh
%% color0 = #282828 %%
Expand All @@ -144,29 +155,35 @@ For example gruvbox theme:
%% color15 = #ebdbb2 %%
```

Save text above as file or take from this repo [gruvbox](./themes/gruvbox.hellwal) and just run hellwal:
Save the text above as a file or copy [gruvbox](./themes/gruvbox.hellwal) from this repo and
just run hellwal:

```sh
hellwal --theme ./themes/gruvbox.hellwal
```

I recommend to put all themes to ``~/.config/hellwal/themes folder``, because from there you can just provide theme name, and it will pick it up automatically, without specifying path. Of course if you want, you can also set different theme-folder path. For example:
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:

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

## NEON Mode

Neon mode boosts colors to make them look more neon-like, sometimes it's pain in the EYE, but usually it looks better. Turned **off** by default.
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.

```sh
hellwal -i [wallpaper] --neon-mode
```

## Modes

You can select ``-d`` and ``--dark`` or ``-l`` and ``--light`` mode on every given image, theme etc, no matter if it's generated from image or from theme file. Also there is ``--color`` mode.
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)

Expand All @@ -186,68 +203,78 @@ hellwal -i [wallpaper] --light
hellwal -i [wallpaper] --color
```

The best thing about it is that you are able to combine all of them together. Usually it's not a good idea, but sometimes you can achieve some crazy combination of colors!
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!

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

---

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

- you can make all colors in palette darker by specifying ``--dark-offset`` from 0-1:
- you can darken all colors by specifying `--dark-offset` from 0-1 (the higher the value, the darker the colors):

```sh
hellwal -i [wallpaper] --light --dark-offset 0.5
```

- same with ``--bright-offset``:
- same with `--bright-offset` (the higher the value, the brighter the colors):

```sh
hellwal -i [wallpaper] --bright-offset 0.5
```

- invert colors ``--invert``:
- invert colors with `--invert`:

```sh
hellwal -i [wallpaper] --light --invert
```

- specify gray scale, if you want monochromatic colors ``--gray-scale``:
- specify grayscale, if you want monochromatic colors, with `--gray-scale`:

```sh
hellwal -i [wallpaper] --color --gray-scale 0.8
```

## Scripts

With ``--script`` or ``-s`` you can run script(or any shell command) after hellwal.
**Note**: it will only run if hellwal will not encounter any errors.
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 previusly generated or specified color palette, add this templates to your ``~/.config/hellwal/templates/`` folder:
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:

- variables.sh
- terminal.sh
- [variables.sh](./templates/variables.sh)
- [terminal.sh](./templates/terminal.sh)

then in ``.bash.rc`` add following lines:
Then in `.bashrc`, add following lines:

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

### Alternatively if you use fish add these to fish config:
### Alternatively if you use fish:

- [variablesfish.fish](./templates/variablesfish.fish)
- [terminal.sh](./templates/terminal.sh)

Then add this to your fish config:

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

# Showcase
![showcase2](https://github.com/user-attachments/assets/ddf2a55e-0fbb-4661-827a-6b124f1dacdb)

![More showcases of hellwal's generated palettes with various wallpapers](https://github.com/user-attachments/assets/ddf2a55e-0fbb-4661-827a-6b124f1dacdb)

# Special thanks:
- [dylanaraps](https://github.com/dylanaraps) - for [https://github.com/dylanaraps/pywal](pywal) and other amazing stuff he created.

- [dylanaraps](https://github.com/dylanaraps) - for [pywal](https://github.com/dylanaraps/pywal) and other amazing stuff he created.