monobiome 1.5.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,343 @@
1
+ Metadata-Version: 2.4
2
+ Name: monobiome
3
+ Version: 1.5.0
4
+ Summary: Monobiome color palette
5
+ Author-email: Sam Griesemer <git@olog.io>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://doc.olog.io/monobiome
8
+ Project-URL: Documentation, https://doc.olog.io/monobiome
9
+ Project-URL: Repository, https://git.olog.io/olog/monobiome
10
+ Project-URL: Issues, https://git.olog.io/olog/monobiome/issues
11
+ Keywords: tempate-engine,color-palette
12
+ Classifier: Programming Language :: Python
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Development Status :: 3 - Alpha
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: Intended Audience :: End Users/Desktop
17
+ Requires-Python: >=3.12
18
+ Description-Content-Type: text/markdown
19
+ Requires-Dist: coloraide>=5.1
20
+ Requires-Dist: imageio[ffmpeg]>=2.37.2
21
+ Requires-Dist: kaleido>=1.1.0
22
+ Requires-Dist: matplotlib>=3.10.7
23
+ Requires-Dist: nbformat>=5.10.4
24
+ Requires-Dist: numpy>=2.3.4
25
+ Requires-Dist: pillow>=12.0.0
26
+ Requires-Dist: plotly>=6.3.1
27
+ Requires-Dist: pyqt5>=5.15.11
28
+ Requires-Dist: scipy>=1.16.2
29
+ Requires-Dist: symconf>=0.8.4
30
+ Provides-Extra: dev
31
+ Requires-Dist: ipykernel; extra == "dev"
32
+ Provides-Extra: doc
33
+ Requires-Dist: furo; extra == "doc"
34
+ Requires-Dist: myst-parser; extra == "doc"
35
+ Requires-Dist: sphinx; extra == "doc"
36
+ Requires-Dist: sphinx-togglebutton; extra == "doc"
37
+ Requires-Dist: sphinx-autodoc-typehints; extra == "doc"
38
+ Provides-Extra: test
39
+ Requires-Dist: pytest; extra == "test"
40
+
41
+ # Monobiome
42
+ `monobiome` is a minimal, balanced color palette for use in terminals and text
43
+ editors. It was designed in OKLCH space to achieve perceptual uniformity across
44
+ all hues at various levels of luminance, and does so for eight monotone bases
45
+ and eight accent colors (plus one zero chroma default base). Each of the
46
+ monotone base colors (named according to a natural biome whose colors they
47
+ loosely resemble) are designed to achieve identical contrast with the accents,
48
+ and thus any one of the options can be selected to change the feeling of
49
+ downstream themes without sacrificing readability.
50
+
51
+ ![Theme preview](images/repo_preview_primary.png)
52
+ _(Preview of light and dark alpine theme variants)_
53
+
54
+ The name "monobiome" connects the palette to its two key sources of
55
+ inspiration:
56
+
57
+ - `mono-`: `monobiome` is inspired by the [`monoindustrial` theme][1], and
58
+ attempts to extend and balance its accents while retaining similar color
59
+ identities.
60
+ - `-biome`: the desire for several distinct monotone options entailed finding a
61
+ way to ground the subtle color variations that were needed, and I liked the
62
+ idea of tying the choices to naturally occurring environmental variation like
63
+ Earth's biomes (even if it is a very loose affiliation, e.g., green-ish =
64
+ grass, basically).
65
+
66
+ ## Palette
67
+ The `monobiome` palette is fundamentally a set of parameterized curves in OKLCH
68
+ color space. Each color identity has one monotone curve and one accent curve,
69
+ both of which have fixed hue values and vary from 10% to 98% lightness.
70
+ Monotone curves have fixed chroma, whereas the accent curves' chroma varies
71
+ smoothly as a function of lightness within sRGB gamut bounds.
72
+
73
+ | Chroma curves | Color trajectories |
74
+ |---|---|
75
+ | ![Chroma curves](images/curves/cstar-curves-v140.png) | ![Trajectories](images/trajectories.gif) |
76
+
77
+ | Palette |
78
+ |---|
79
+ | ![Palette](images/palette.png) |
80
+
81
+ Chroma curves are designed specifically to establish a distinct role for each
82
+ accent and are non-intersecting over the lightness domain (hence the distinct
83
+ "bands" in the above chroma curve figure). There are eight monotone-accent
84
+ pairs, plus a single grey trajectory:
85
+
86
+ | Monotone / biome | Accent color | Hue |
87
+ | --- | --- | --- |
88
+ | alpine | grey | n/a |
89
+ | badlands | red | 29 |
90
+ | chaparral | orange | 62.5 |
91
+ | savanna | yellow | 104 |
92
+ | grassland | green | 148 |
93
+ | reef | cyan | 205 |
94
+ | tundra | blue | 262 |
95
+ | heathland | violet | 306 |
96
+ | moorland | magenta | 350 |
97
+
98
+ The `alpine`/`grey` curve has zero chroma (and is thus invariant to hue),
99
+ varying only in lightness from dark to light grey.
100
+
101
+ ## Themes
102
+
103
+ | Dark themes | Light themes |
104
+ |---|---|
105
+ | ![Dark themes](images/dark_themes.png) | ![Light themes](images/light_themes.png) |
106
+
107
+ Themes are derived from the `monobiome` palette by selecting a monotone base
108
+ (the "biome"), a base lightness, and a contrast level. Although one can use
109
+ arbitrary contrast metrics, OKLCH distance (Euclidean distance in OKLab)
110
+ is designed to capture perceptual distinction. As such, perceptually uniform
111
+ themes under arbitrary monotones can be generated by calculating the accent
112
+ colors equidistant from that base. This is equivalent to determining the points
113
+ at which a sphere centered at the monotone base intersects with the accent
114
+ curves; the radius of such a sphere effectively determines the theme contrast,
115
+ and the colors on the sphere surface are equally perceptually distinct relative
116
+ to the background.
117
+
118
+ The following plots show the intersection of the sphere centered at a fixed
119
+ background color (`alpine` biome with a lightness of 20) under variable radii:
120
+
121
+ | | `-l 20 -d 0.3` | `-l 20 -d 0.4` | `-l 20 -d 0.5` |
122
+ |---|---|---|---|
123
+ | Color visualization | ![](images/oklch/mb_b20_d30.gif) | ![](images/oklch/mb_b20_d40.gif) | ![](images/oklch/mb_b20_d50.gif) |
124
+ | Editor preview | ![](images/render/v140-demo-alpine-dark-d0.3.png) | ![](images/render/v140-demo-alpine-dark-d0.4.png) | ![](images/render/v140-demo-alpine-dark-d0.5.png) |
125
+
126
+ In short, the base lightness (`-l`) dictates the brightness of the background,
127
+ and the contrast (`-d`) controls how perceptually distinct the accent colors
128
+ appear with respect to that background. These are free parameters of the
129
+ `monobiome` model: themes can be generated under arbitrary settings that meet
130
+ user preferences.
131
+
132
+ ## Generation
133
+ When generating full application themes, fixed lightness steps are used in the
134
+ chosen monotone trajectory to establish consistent levels of distinction
135
+ between background layers. For example, the following demonstrates how
136
+ background and foreground elements are chosen for the `monobiome` vim/neovim
137
+ themes:
138
+
139
+ ![
140
+ Diagram depicting how themes colors are selected by harshness and mapped onto
141
+ application-specific elements
142
+ ](images/vim_theme_elements.png)
143
+
144
+ Note how theme elements are mapped onto the general identifiers `bg0-bg3` for
145
+ backgrounds, `fg0-fg3` for foregrounds, and `gray` for a central gray tone. The
146
+ relative properties (lightness differences, contrast ratios) between colors
147
+ assigned to these identifiers are preserved regardless of biome or harshness
148
+ (e.g., `bg3` and `gray` are _always_ separated by 20 lightness points in any
149
+ theme). As a result, applying `monobiome` themes to specific applications can
150
+ effectively boil down to defining a single "relative template" that uses these
151
+ identifiers, after which any user-provided parameters can be applied
152
+ automatically.
153
+
154
+ The full palette $\rightarrow$ scheme $\rightarrow$ template $\rightarrow$
155
+ theme pipeline can be seen in detail below:
156
+
157
+ ![Generation pipeline](images/theme_generation_pipeline.png)
158
+
159
+ This figure demonstrates how `kitty` themes are generated, but the process is
160
+ generic to any palette, scheme, and app. This implemented in two stages using
161
+ the `monobiome` CLI:
162
+
163
+ - First generate the scheme file, the definitions that respect perceptual
164
+ uniformity of accents with respect to the base monotone:
165
+
166
+ ```sh
167
+ monobiome scheme dark grassland -d 0.42 -l 20 -o scheme.toml
168
+ ```
169
+
170
+ This calculates the accents a distance of `0.42` units in Oklab space from the
171
+ `grassland` monotone base at a lightness of `20`, and writes the output to
172
+ `scheme.toml`.
173
+ - Then populate the scheme file with concrete palette colors and push it
174
+ through an app config template:
175
+
176
+ ```sh
177
+ monobiome fill scheme.toml templates/kitty/active.theme -o kitty.theme
178
+ ```
179
+
180
+ This writes a concrete theme to `kitty.theme` that matches the user
181
+ preferences, i.e., the contrast (`-d`), background lightness (`-l`), mode
182
+ (`dark`), and biome (`grassland`). Every part of this process can be
183
+ customized: the scheme parameters, the scheme definitions/file, the app
184
+ template.
185
+
186
+ Running these commands in sequence from the repo root should work
187
+ out-of-the-box, after having installed the CLI tool.
188
+
189
+ The `monobiome` CLI
190
+ produces the scheme file for requested parameters, and the [`symconf`][3] CLI
191
+ pushes palette colors through the scheme and into the app templates to yield a
192
+ concrete theme.
193
+
194
+ ## Applications
195
+ This repo provides palette-agnostic theme templates for `kitty`,
196
+ `vim`/`neovim`, and `fzf` in the `templates/` directory. Pre-generated
197
+ *concrete* themes can be found in `app-config/`, if you'd like to try an
198
+ example out-of-the-box without using the `monobiome` CLI. Raw
199
+ palette colors can be found in `colors/` if you want to use them to define
200
+ static themes for other applications.
201
+
202
+ Themes files in the `app-config/` directory are generated for light and dark
203
+ modes of each biome, and named according to the following pattern:
204
+
205
+ ```sh
206
+ <biome>-monobiome-<mode>.<filename>
207
+ ```
208
+
209
+ One can set these themes for the provided applications as follows:
210
+
211
+ - `kitty`
212
+
213
+ Find `kitty` themes in `app-config/kitty`. Themes can be activated in your
214
+ `kitty.conf` with
215
+
216
+ ```sh
217
+ include <theme-file>
218
+ ```
219
+
220
+ Themes are generated using the [`kitty` theme
221
+ template](templates/apps/kitty/templates/active.theme).
222
+
223
+ - `vim`/`neovim`
224
+
225
+ Find `vim`/`neovim` themes in `app-config/nvim`. Themes can be activated by placing a
226
+ theme file on Vim's runtime path and setting it in your
227
+ `.vimrc`/`init.vim`/`init.lua`
228
+
229
+ with
230
+
231
+ ```sh
232
+ colorscheme <theme-name>
233
+ ```
234
+
235
+ Themes are generated using the [`vim` theme
236
+ template](templates/apps/nvim/templates/theme.vim).
237
+
238
+ - `fzf`
239
+
240
+ In `app-config/fzf`, you can find scripts that can be ran to export FZF theme
241
+ variables. In your shell config (e.g., `.bashrc` or `.zshrc`), you can source
242
+ these files to apply them in your terminal:
243
+
244
+ ```sh
245
+ source <theme-file>
246
+ ```
247
+
248
+ Themes are generated using the [`fzf` theme
249
+ template](templates/apps/fzf/templates/active.theme).
250
+
251
+ - Firefox
252
+
253
+ Firefox themes for all monotone backgrounds are publicly listed as [Mozilla
254
+ add-ons][2], and switch between light/dark schemes based on system settings.
255
+ You can also download raw XPI files for each theme in `app-config/firefox/`,
256
+ each of which is generated using the [Firefox `manifest.json`
257
+ template](templates/apps/firefox/templates/none-dark.manifest.json).
258
+
259
+ Static [light][4] and [dark][5] themes are additionally available (i.e., that
260
+ don't change with system settings).
261
+
262
+ ![Firefox theme previews](images/firefox/themes.png)
263
+
264
+ ## CLI installation
265
+ A brief theme generation guide was provided in the [Generation
266
+ section](#generation), making use of the `monobiome` CLI. This tool can be
267
+ installed from PyPI, using `uv`/`pipx`/similar:
268
+
269
+ ```sh
270
+ uv tool install monobiome
271
+ # or
272
+ pipx install monobiome
273
+ ```
274
+
275
+ The `monobiome` has provides three subcommands:
276
+
277
+ - `monobiome palette`: generate palette files from raw parameterized curves
278
+
279
+ ```
280
+ usage: monobiome palette [-h] [-n {hex,oklch}] [-f {json,toml}] [-o OUTPUT]
281
+
282
+ options:
283
+ -n {hex,oklch}, --notation {hex,oklch}
284
+ color notation to export (either hex or oklch)
285
+ -f {json,toml}, --format {json,toml}
286
+ format of palette file (either JSON or TOML)
287
+ -o OUTPUT, --output OUTPUT
288
+ output file to write palette content
289
+ ```
290
+
291
+ - `monobiome scheme`: generate scheme files that match perceptual parameters
292
+
293
+ ```
294
+ usage: monobiome scheme [-h] [-m {wcag,oklch,lightness}] [-d DISTANCE] [-o OUTPUT] [-l L_BASE]
295
+ [--l-step L_STEP] [--fg-gap FG_GAP] [--grey-gap GREY_GAP]
296
+ [--term-fg-gap TERM_FG_GAP]
297
+ {dark,light}
298
+ {alpine,badlands,chaparral,savanna,grassland,reef,tundra,heathland,moorland}
299
+
300
+ positional arguments:
301
+ {dark,light} scheme mode (light or dark)
302
+ {alpine,badlands,chaparral,savanna,grassland,reef,tundra,heathland,moorland}
303
+ biome setting for scheme.
304
+
305
+ options:
306
+ -m {wcag,oklch,lightness}, --metric {wcag,oklch,lightness}
307
+ metric to use for measuring swatch distances.
308
+ -d DISTANCE, --distance DISTANCE
309
+ distance threshold for specified metric
310
+ -o OUTPUT, --output OUTPUT
311
+ output file to write scheme content
312
+ -l L_BASE, --l-base L_BASE
313
+ minimum lightness level (default: 20)
314
+ --l-step L_STEP lightness step size (default: 5)
315
+ --fg-gap FG_GAP foreground lightness gap (default: 50)
316
+ --grey-gap GREY_GAP grey lightness gap (default: 30)
317
+ --term-fg-gap TERM_FG_GAP
318
+ terminal foreground lightness gap (default: 60)
319
+ ```
320
+
321
+ - `monobiome fill`: produce concrete application themes from a given scheme and
322
+ app template
323
+
324
+ ```
325
+ usage: monobiome fill [-h] [-p PALETTE] [-o OUTPUT] scheme [template]
326
+
327
+ positional arguments:
328
+ scheme scheme file path
329
+ template template file path (defaults to stdin)
330
+
331
+ options:
332
+ -p PALETTE, --palette PALETTE
333
+ palette file to use for color definitions
334
+ -o OUTPUT, --output OUTPUT
335
+ output file to write filled template
336
+ ```
337
+
338
+
339
+ [1]: https://github.com/isa/TextMate-Themes/blob/master/monoindustrial.tmTheme
340
+ [2]: https://addons.mozilla.org/en-US/firefox/collections/18495484/monobiome/
341
+ [3]: https://github.com/ologio/symconf
342
+ [4]: https://addons.mozilla.org/en-US/firefox/collections/18495484/monobiome-light/
343
+ [5]: https://addons.mozilla.org/en-US/firefox/collections/18495484/monobiome-dark/
@@ -0,0 +1,303 @@
1
+ # Monobiome
2
+ `monobiome` is a minimal, balanced color palette for use in terminals and text
3
+ editors. It was designed in OKLCH space to achieve perceptual uniformity across
4
+ all hues at various levels of luminance, and does so for eight monotone bases
5
+ and eight accent colors (plus one zero chroma default base). Each of the
6
+ monotone base colors (named according to a natural biome whose colors they
7
+ loosely resemble) are designed to achieve identical contrast with the accents,
8
+ and thus any one of the options can be selected to change the feeling of
9
+ downstream themes without sacrificing readability.
10
+
11
+ ![Theme preview](images/repo_preview_primary.png)
12
+ _(Preview of light and dark alpine theme variants)_
13
+
14
+ The name "monobiome" connects the palette to its two key sources of
15
+ inspiration:
16
+
17
+ - `mono-`: `monobiome` is inspired by the [`monoindustrial` theme][1], and
18
+ attempts to extend and balance its accents while retaining similar color
19
+ identities.
20
+ - `-biome`: the desire for several distinct monotone options entailed finding a
21
+ way to ground the subtle color variations that were needed, and I liked the
22
+ idea of tying the choices to naturally occurring environmental variation like
23
+ Earth's biomes (even if it is a very loose affiliation, e.g., green-ish =
24
+ grass, basically).
25
+
26
+ ## Palette
27
+ The `monobiome` palette is fundamentally a set of parameterized curves in OKLCH
28
+ color space. Each color identity has one monotone curve and one accent curve,
29
+ both of which have fixed hue values and vary from 10% to 98% lightness.
30
+ Monotone curves have fixed chroma, whereas the accent curves' chroma varies
31
+ smoothly as a function of lightness within sRGB gamut bounds.
32
+
33
+ | Chroma curves | Color trajectories |
34
+ |---|---|
35
+ | ![Chroma curves](images/curves/cstar-curves-v140.png) | ![Trajectories](images/trajectories.gif) |
36
+
37
+ | Palette |
38
+ |---|
39
+ | ![Palette](images/palette.png) |
40
+
41
+ Chroma curves are designed specifically to establish a distinct role for each
42
+ accent and are non-intersecting over the lightness domain (hence the distinct
43
+ "bands" in the above chroma curve figure). There are eight monotone-accent
44
+ pairs, plus a single grey trajectory:
45
+
46
+ | Monotone / biome | Accent color | Hue |
47
+ | --- | --- | --- |
48
+ | alpine | grey | n/a |
49
+ | badlands | red | 29 |
50
+ | chaparral | orange | 62.5 |
51
+ | savanna | yellow | 104 |
52
+ | grassland | green | 148 |
53
+ | reef | cyan | 205 |
54
+ | tundra | blue | 262 |
55
+ | heathland | violet | 306 |
56
+ | moorland | magenta | 350 |
57
+
58
+ The `alpine`/`grey` curve has zero chroma (and is thus invariant to hue),
59
+ varying only in lightness from dark to light grey.
60
+
61
+ ## Themes
62
+
63
+ | Dark themes | Light themes |
64
+ |---|---|
65
+ | ![Dark themes](images/dark_themes.png) | ![Light themes](images/light_themes.png) |
66
+
67
+ Themes are derived from the `monobiome` palette by selecting a monotone base
68
+ (the "biome"), a base lightness, and a contrast level. Although one can use
69
+ arbitrary contrast metrics, OKLCH distance (Euclidean distance in OKLab)
70
+ is designed to capture perceptual distinction. As such, perceptually uniform
71
+ themes under arbitrary monotones can be generated by calculating the accent
72
+ colors equidistant from that base. This is equivalent to determining the points
73
+ at which a sphere centered at the monotone base intersects with the accent
74
+ curves; the radius of such a sphere effectively determines the theme contrast,
75
+ and the colors on the sphere surface are equally perceptually distinct relative
76
+ to the background.
77
+
78
+ The following plots show the intersection of the sphere centered at a fixed
79
+ background color (`alpine` biome with a lightness of 20) under variable radii:
80
+
81
+ | | `-l 20 -d 0.3` | `-l 20 -d 0.4` | `-l 20 -d 0.5` |
82
+ |---|---|---|---|
83
+ | Color visualization | ![](images/oklch/mb_b20_d30.gif) | ![](images/oklch/mb_b20_d40.gif) | ![](images/oklch/mb_b20_d50.gif) |
84
+ | Editor preview | ![](images/render/v140-demo-alpine-dark-d0.3.png) | ![](images/render/v140-demo-alpine-dark-d0.4.png) | ![](images/render/v140-demo-alpine-dark-d0.5.png) |
85
+
86
+ In short, the base lightness (`-l`) dictates the brightness of the background,
87
+ and the contrast (`-d`) controls how perceptually distinct the accent colors
88
+ appear with respect to that background. These are free parameters of the
89
+ `monobiome` model: themes can be generated under arbitrary settings that meet
90
+ user preferences.
91
+
92
+ ## Generation
93
+ When generating full application themes, fixed lightness steps are used in the
94
+ chosen monotone trajectory to establish consistent levels of distinction
95
+ between background layers. For example, the following demonstrates how
96
+ background and foreground elements are chosen for the `monobiome` vim/neovim
97
+ themes:
98
+
99
+ ![
100
+ Diagram depicting how themes colors are selected by harshness and mapped onto
101
+ application-specific elements
102
+ ](images/vim_theme_elements.png)
103
+
104
+ Note how theme elements are mapped onto the general identifiers `bg0-bg3` for
105
+ backgrounds, `fg0-fg3` for foregrounds, and `gray` for a central gray tone. The
106
+ relative properties (lightness differences, contrast ratios) between colors
107
+ assigned to these identifiers are preserved regardless of biome or harshness
108
+ (e.g., `bg3` and `gray` are _always_ separated by 20 lightness points in any
109
+ theme). As a result, applying `monobiome` themes to specific applications can
110
+ effectively boil down to defining a single "relative template" that uses these
111
+ identifiers, after which any user-provided parameters can be applied
112
+ automatically.
113
+
114
+ The full palette $\rightarrow$ scheme $\rightarrow$ template $\rightarrow$
115
+ theme pipeline can be seen in detail below:
116
+
117
+ ![Generation pipeline](images/theme_generation_pipeline.png)
118
+
119
+ This figure demonstrates how `kitty` themes are generated, but the process is
120
+ generic to any palette, scheme, and app. This implemented in two stages using
121
+ the `monobiome` CLI:
122
+
123
+ - First generate the scheme file, the definitions that respect perceptual
124
+ uniformity of accents with respect to the base monotone:
125
+
126
+ ```sh
127
+ monobiome scheme dark grassland -d 0.42 -l 20 -o scheme.toml
128
+ ```
129
+
130
+ This calculates the accents a distance of `0.42` units in Oklab space from the
131
+ `grassland` monotone base at a lightness of `20`, and writes the output to
132
+ `scheme.toml`.
133
+ - Then populate the scheme file with concrete palette colors and push it
134
+ through an app config template:
135
+
136
+ ```sh
137
+ monobiome fill scheme.toml templates/kitty/active.theme -o kitty.theme
138
+ ```
139
+
140
+ This writes a concrete theme to `kitty.theme` that matches the user
141
+ preferences, i.e., the contrast (`-d`), background lightness (`-l`), mode
142
+ (`dark`), and biome (`grassland`). Every part of this process can be
143
+ customized: the scheme parameters, the scheme definitions/file, the app
144
+ template.
145
+
146
+ Running these commands in sequence from the repo root should work
147
+ out-of-the-box, after having installed the CLI tool.
148
+
149
+ The `monobiome` CLI
150
+ produces the scheme file for requested parameters, and the [`symconf`][3] CLI
151
+ pushes palette colors through the scheme and into the app templates to yield a
152
+ concrete theme.
153
+
154
+ ## Applications
155
+ This repo provides palette-agnostic theme templates for `kitty`,
156
+ `vim`/`neovim`, and `fzf` in the `templates/` directory. Pre-generated
157
+ *concrete* themes can be found in `app-config/`, if you'd like to try an
158
+ example out-of-the-box without using the `monobiome` CLI. Raw
159
+ palette colors can be found in `colors/` if you want to use them to define
160
+ static themes for other applications.
161
+
162
+ Themes files in the `app-config/` directory are generated for light and dark
163
+ modes of each biome, and named according to the following pattern:
164
+
165
+ ```sh
166
+ <biome>-monobiome-<mode>.<filename>
167
+ ```
168
+
169
+ One can set these themes for the provided applications as follows:
170
+
171
+ - `kitty`
172
+
173
+ Find `kitty` themes in `app-config/kitty`. Themes can be activated in your
174
+ `kitty.conf` with
175
+
176
+ ```sh
177
+ include <theme-file>
178
+ ```
179
+
180
+ Themes are generated using the [`kitty` theme
181
+ template](templates/apps/kitty/templates/active.theme).
182
+
183
+ - `vim`/`neovim`
184
+
185
+ Find `vim`/`neovim` themes in `app-config/nvim`. Themes can be activated by placing a
186
+ theme file on Vim's runtime path and setting it in your
187
+ `.vimrc`/`init.vim`/`init.lua`
188
+
189
+ with
190
+
191
+ ```sh
192
+ colorscheme <theme-name>
193
+ ```
194
+
195
+ Themes are generated using the [`vim` theme
196
+ template](templates/apps/nvim/templates/theme.vim).
197
+
198
+ - `fzf`
199
+
200
+ In `app-config/fzf`, you can find scripts that can be ran to export FZF theme
201
+ variables. In your shell config (e.g., `.bashrc` or `.zshrc`), you can source
202
+ these files to apply them in your terminal:
203
+
204
+ ```sh
205
+ source <theme-file>
206
+ ```
207
+
208
+ Themes are generated using the [`fzf` theme
209
+ template](templates/apps/fzf/templates/active.theme).
210
+
211
+ - Firefox
212
+
213
+ Firefox themes for all monotone backgrounds are publicly listed as [Mozilla
214
+ add-ons][2], and switch between light/dark schemes based on system settings.
215
+ You can also download raw XPI files for each theme in `app-config/firefox/`,
216
+ each of which is generated using the [Firefox `manifest.json`
217
+ template](templates/apps/firefox/templates/none-dark.manifest.json).
218
+
219
+ Static [light][4] and [dark][5] themes are additionally available (i.e., that
220
+ don't change with system settings).
221
+
222
+ ![Firefox theme previews](images/firefox/themes.png)
223
+
224
+ ## CLI installation
225
+ A brief theme generation guide was provided in the [Generation
226
+ section](#generation), making use of the `monobiome` CLI. This tool can be
227
+ installed from PyPI, using `uv`/`pipx`/similar:
228
+
229
+ ```sh
230
+ uv tool install monobiome
231
+ # or
232
+ pipx install monobiome
233
+ ```
234
+
235
+ The `monobiome` has provides three subcommands:
236
+
237
+ - `monobiome palette`: generate palette files from raw parameterized curves
238
+
239
+ ```
240
+ usage: monobiome palette [-h] [-n {hex,oklch}] [-f {json,toml}] [-o OUTPUT]
241
+
242
+ options:
243
+ -n {hex,oklch}, --notation {hex,oklch}
244
+ color notation to export (either hex or oklch)
245
+ -f {json,toml}, --format {json,toml}
246
+ format of palette file (either JSON or TOML)
247
+ -o OUTPUT, --output OUTPUT
248
+ output file to write palette content
249
+ ```
250
+
251
+ - `monobiome scheme`: generate scheme files that match perceptual parameters
252
+
253
+ ```
254
+ usage: monobiome scheme [-h] [-m {wcag,oklch,lightness}] [-d DISTANCE] [-o OUTPUT] [-l L_BASE]
255
+ [--l-step L_STEP] [--fg-gap FG_GAP] [--grey-gap GREY_GAP]
256
+ [--term-fg-gap TERM_FG_GAP]
257
+ {dark,light}
258
+ {alpine,badlands,chaparral,savanna,grassland,reef,tundra,heathland,moorland}
259
+
260
+ positional arguments:
261
+ {dark,light} scheme mode (light or dark)
262
+ {alpine,badlands,chaparral,savanna,grassland,reef,tundra,heathland,moorland}
263
+ biome setting for scheme.
264
+
265
+ options:
266
+ -m {wcag,oklch,lightness}, --metric {wcag,oklch,lightness}
267
+ metric to use for measuring swatch distances.
268
+ -d DISTANCE, --distance DISTANCE
269
+ distance threshold for specified metric
270
+ -o OUTPUT, --output OUTPUT
271
+ output file to write scheme content
272
+ -l L_BASE, --l-base L_BASE
273
+ minimum lightness level (default: 20)
274
+ --l-step L_STEP lightness step size (default: 5)
275
+ --fg-gap FG_GAP foreground lightness gap (default: 50)
276
+ --grey-gap GREY_GAP grey lightness gap (default: 30)
277
+ --term-fg-gap TERM_FG_GAP
278
+ terminal foreground lightness gap (default: 60)
279
+ ```
280
+
281
+ - `monobiome fill`: produce concrete application themes from a given scheme and
282
+ app template
283
+
284
+ ```
285
+ usage: monobiome fill [-h] [-p PALETTE] [-o OUTPUT] scheme [template]
286
+
287
+ positional arguments:
288
+ scheme scheme file path
289
+ template template file path (defaults to stdin)
290
+
291
+ options:
292
+ -p PALETTE, --palette PALETTE
293
+ palette file to use for color definitions
294
+ -o OUTPUT, --output OUTPUT
295
+ output file to write filled template
296
+ ```
297
+
298
+
299
+ [1]: https://github.com/isa/TextMate-Themes/blob/master/monoindustrial.tmTheme
300
+ [2]: https://addons.mozilla.org/en-US/firefox/collections/18495484/monobiome/
301
+ [3]: https://github.com/ologio/symconf
302
+ [4]: https://addons.mozilla.org/en-US/firefox/collections/18495484/monobiome-light/
303
+ [5]: https://addons.mozilla.org/en-US/firefox/collections/18495484/monobiome-dark/
@@ -0,0 +1,3 @@
1
+ from importlib.metadata import version
2
+
3
+ __version__ = version("monobiome")
@@ -0,0 +1,19 @@
1
+ from monobiome.cli import create_parser, configure_logging
2
+
3
+
4
+ def main() -> None:
5
+ parser = create_parser()
6
+ args = parser.parse_args()
7
+
8
+ # skim off log level to handle higher-level option
9
+ if hasattr(args, "log_level") and args.log_level is not None:
10
+ configure_logging(args.log_level)
11
+
12
+ if "func" in args:
13
+ args.func(args, parser)
14
+ else:
15
+ parser.print_help()
16
+
17
+
18
+ if __name__ == "__main__":
19
+ main()