aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: f267fe46f3a9b43306ec7f8c1fd277ae73b97803 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# base16-builder

<!-- markdownlint-disable MD013 -->

This repo provides a `builder.sh` to create your base16 colorschemes.

## Dependecies

- [lustache](https://luarocks.org/modules/olivine-labs/lustache);
- [lustache-cli](https://github.com/djmattyg007/lustache-cli);
- [tinty](https://github.com/tinted-theming/tinty).

## Preparation

Make sure you have the following structure for your project:

```bash
├── colors
└── templates
```

Folder `templates` must contain the following files:

```bash
├── body.mustache
├── config.yaml
└── head.mustache
```

with the following content:

```mustache
# config.yaml

default:
  supported-systems: [base16]
  filename: "colors/{{scheme-system}}-{{scheme-slug}}.theme"
```

The file `body.mustache` must contain a template for the program for which the color scheme is made, for example, for the program [wlr-which-key](https://github.com/MaxVerevkin/wlr-which-key) it will be as follows:

```yaml
background: "#{{base00-hex}}"
color: "#{{base06-hex}}"
border: "#{{base0D-hex}}"
```

The file `head.mustache` contains metadata about the colorscheme:

```yaml
#
#
# name: {{scheme-name}}
# author: {{{scheme-author}}}
# slug: {{scheme-slug}}
# slug-underscored: {{scheme-slug-underscored}}
# system: {{scheme-system}}
# variant: {{scheme-variant}}
# is-{{scheme-variant}}-variant: {{hasVariant}}
#
#
```

> If you will use this file, change the comment symbols to match the extensions of the final colorscheme file, if for example the colorscheme will be `base16-google-light.css`, then replace the symbol `#` with `/* */`, etc.

Put `builder.sh` in your project directory, make it executable and launch it:

## Usage

```bash
cp base16-builder /path/to/your/project

chmod +x builder.sh

./builder.sh
```

## Summary

I tried to make this build according to the [official spec](https://github.com/tinted-theming/home/blob/main/builder.md), i may have missed something, if so - create a ticket in [todo](https://todo.sr.ht/~blueingreen/base16-builder).

## License

MIT