Skip to content
Merged
Show file tree
Hide file tree
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
28 changes: 28 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Tests

on:
workflow_dispatch:
pull_request:
push:
branches:
- main
- "codex/**"

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Check syntax
run: python3 -m py_compile themaker.py test_themaker.py

- name: Run tests
run: python3 -m unittest
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ __pycache__/
*.py[cod]
.venv/
venv/
.idea/
used_urls.log
colors/
*.itermcolors
!examples/
!examples/*.itermcolors
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 @ylub

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
224 changes: 224 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,224 @@
# THEMaker

THEMaker turns a Coolors palette or a list of hex colors into terminal color
themes.

It currently exports:

- iTerm2 `.itermcolors`
- macOS Terminal `.terminal`
- Kitty `.conf`
- Alacritty `.toml`
- WezTerm `.lua`
- Source `.yaml` for terminal color scheme repos
- Portable JSON theme data for someone else or another tool to export later

THEMaker uses only the Python standard library.

![THEMaker ANSI color suggestions](docs/themaker1.png)

![THEMaker terminal preview](docs/themaker2.png)

Screenshots captured in iTerm2.

## Quick Start

Run the wizard:

```bash
python3 themaker.py
```

Check the version:

```bash
python3 themaker.py --version
```

Use a palette from the command line and continue in the wizard:

```bash
python3 themaker.py --palette "25ced1 ffffff fceade ff8a5b ea526f"
```

Hex colors may be written as 6-digit RGB, 8-digit RGBA, or short 4-digit RGBA.
Alpha values are accepted for convenience and ignored when exporting terminal
themes.

Choose export formats up front:

```bash
python3 themaker.py --palette "25ced1 ffffff fceade ff8a5b ea526f" --format "iterm kitty"
```

Save somewhere else:

```bash
python3 themaker.py --out ./exports
```

Edit an existing iTerm theme:

```bash
python3 themaker.py --edit colors/example.itermcolors
```

List existing editable iTerm themes in an output folder:

```bash
python3 themaker.py --list-themes --out colors
```

Show credits and project information:

```bash
python3 themaker.py --about
```

Skip the startup banner in interactive mode:

```bash
python3 themaker.py --no-splash
```

## Export Choices

At the save step, THEMaker asks what to export:

- `all` exports every supported format
- `one` asks for a single format
- `some` asks for multiple formats
- `data` saves only portable JSON theme data

Supported format names are:

```text
iterm terminal kitty alacritty wezterm yaml data
```

| Format | Extension | Use |
| --- | --- | --- |
| `iterm` | `.itermcolors` | Import into iTerm2. |
| `terminal` | `.terminal` | Import into macOS Terminal. |
| `kitty` | `.conf` | Include or copy into Kitty config. |
| `alacritty` | `.toml` | Import or copy into Alacritty config. |
| `wezterm` | `.lua` | Require or copy into WezTerm config. |
| `yaml` | `.yaml` | Submit source schemes to terminal color scheme repos. |
| `data` | `.json` | Save portable theme data for another tool or maintainer. |

If a target file already exists, the wizard asks before overwriting it.

## Examples

The `examples/` folder contains one sample palette exported to every supported
format. These files are useful for checking the output shape before importing a
theme into your own terminal.

## Using Exported Themes

iTerm2:

On macOS, opening the generated `.itermcolors` file will import it into iTerm2.
You can also import it manually:

1. Open Settings.
2. Go to Profiles, then Colors.
3. Open Color Presets.
4. Choose Import and select the `.itermcolors` file.

macOS Terminal:

Open the generated `.terminal` file to import the preset into Terminal.
You can also import it manually from Terminal settings:

1. Open Settings.
2. Go to Profiles.
3. Open the More menu.
4. Choose Import and select the `.terminal` file.

Kitty:

```bash
include /path/to/theme.conf
```

Add that line to your Kitty config, or copy the generated color lines into it.

Alacritty:

```toml
import = ["/path/to/theme.toml"]
```

Add that to your Alacritty config, or copy the generated `[colors]` sections
into it.

WezTerm:

```lua
local theme = require("theme")

return {
colors = theme,
}
```

Put the generated `.lua` file somewhere WezTerm can require it, or copy the
returned table into your WezTerm config.

YAML:

The `.yaml` export follows the source scheme guidance from
[`yaml/README.md` in `mbadolato/iTerm2-Color-Schemes`](https://github.com/mbadolato/iTerm2-Color-Schemes/blob/master/yaml/README.md).
It writes `color_01` through `color_16`, plus the optional extra keys described
there, including `badge`, `bold`, `cursor_guide`, `cursor_text`, `link`,
`selection_text`, `selection`, `tab`, and `underline`.

## Contributing Schemes

For terminal color scheme repositories that accept source YAML files, export
with:

```bash
python3 themaker.py --format yaml
```

Review the generated file before submitting it, especially the theme name,
normal ANSI colors, bright ANSI colors, selection colors, and cursor colors.

## Bright And Sibling Suggestions

After ANSI colors are chosen, THEMaker can suggest brighter ANSI colors for the
same theme. These are previewed as `current -> suggested` and are only applied
if you confirm.

When you customize ANSI roles, THEMaker also offers extra color suggestions.
Those include palette complements and a few palette-fit accent colors tuned to
the selected theme family.

After exporting a theme, THEMaker can also suggest sibling themes from the same
palette, such as a bright pastel variant or a softer dark variant. These are
also opt-in.

## Tests

Run:

```bash
python3 -m unittest
```

## Releases

The first public release should be tagged as `v0.2.0` after the public export
branch is merged.

## Credits

Created by [@ylub](https://github.com/ylub).

Project repo: [github.com/ylub/themaker](https://github.com/ylub/themaker).

Built with help from Codex.

Inspired by palette ideas from [Coolors](https://coolors.co).
Binary file added docs/themaker1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/themaker2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions examples/coolors-dark-balanced-sample.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Generated by THEMaker 0.2.0
# Palette: #25CED1 #FFFFFF #FCEADE #FF8A5B #EA526F
foreground #F8F8F2
background #101418
cursor #FFFFFF
cursor_text_color #101418
selection_foreground #101418
selection_background #334155

color0 #101418
color1 #EA526F
color2 #25CED1
color3 #FCEADE
color4 #25CED1
color5 #FF8A5B
color6 #FFFFFF
color7 #F8F8F2
color8 #FCEADE
color9 #FA5676
color10 #42EEF1
color11 #FCEADE
color12 #42EEF1
color13 #FF8352
color14 #FFFFFF
color15 #FFFFFF
Loading
Loading