Skip to main content
None of the 18 built-ins work for you? Bring your own. It is a .json file, and TYBA validates all of it before accepting it.

The two buttons

Settings → Appearance, on the Themes section header: Import theme… is also in the command palette (⌘P / Ctrl+Shift+P), under Theme.
Importing from Settings does not apply. The theme lands in the grid; to use it, click it. And clicking may change the mode — see Light and dark mode. From the command palette it’s different: there, importing applies the theme right away.

The example

This is exactly what the Copy example button puts on your clipboard. Edit the colors and import it.

The top-level fields

An unknown top-level field kills the whole file. A stray "author" or "version" is not ignored — it is an error. The same goes inside terminal.
ui and terminal are the two optional ones, and omitting them has a useful meaning:
  • Without terminal, the theme inherits the terminal palette from TYBA Dark or TYBA Light, according to its base.
  • Without ui, the interface keeps the default surfaces for that base.
In other words: { "name": "My Theme", "base": "light" } is a valid theme — it just doesn’t change anything. And you only need to declare the ui keys you want to change; the rest inherits from the base.

ui — the 21 keys

Any key outside this list is rejected. All of them are optional.
Tints, glows, selection color, glass and hover derive themselves from the accents. There is no key for them — and that is why you can write a theme with five colors and have it come out coherent.

terminal

16 colors, not 15 and not 17. A list of any other size is an error — it is neither padded nor truncated.
The ansi order is the usual one: the 8 normal colors and then the 8 bright ones.

The colors

Hex only, always with #: red, rgb(0,0,0), hsl(...) and #ffff are all rejected. The error message tells you which key broke it.

Name, id and reserved names

The theme’s id is the slug of the name: lowercase, and anything that is not a letter or a number becomes a hyphen. Dracula Pro! becomes dracula-pro. Café com Leite becomes caf-com-leite — accents do not survive the slug, but the name shown in the grid keeps them.
A name that collides with a built-in theme is refused — the error is reserved name. You cannot import something called “Dracula” or “TYBA Dark” and overwrite the original. Pick another name.
If a name is nothing but symbols (___), the slug comes out empty and the import fails with an invalid name. Two imports with the same slug: the second overwrites the first, without asking. The grid still has a single entry.

Size

The file has to be a regular file and at most 256 KB. Beyond that, it is refused before it is even read as JSON.

When it goes wrong

An import error becomes a system alert with the validation message — wrong key, invalid color, ansi of the wrong size, reserved name. Nothing is written.

Where the theme lives

The import copies the file, already normalized, into the app’s configuration folder: The file name is the id: dracula-pro.json. The original file you imported from is not used afterwards — touching it changes nothing.
You can drop .json files straight into that folder instead of using the button. TYBA reads the whole folder when listing themes. But then there is no alert: an invalid file is simply ignored and the theme does not show up. A file whose name matches a built-in id is ignored too — the built-in always wins.

What does not exist

Deleted the .json of a theme that was in use? The slot falls back to the built-in for that base on the next read. The app does not break.

See also

The themes

The 18 built-ins, before you go write your own.

Light and dark mode

Where your theme lands after it is imported.