You will make two themes. The first has two files and changes the look of the whole game: colours, shapes and fonts. The second adds a template and moves two things on the map selection screen. Each step takes a few minutes, and the example folders used here are tested: they pass the same validation as the game's own themes.
Before you start
You need a text editor and the game. Two tools are optional, and you can add them when you want them:
check_theme, the check that validates a folder exactly as the game does and prints the same messages. The installed game runs it:prism.exe --check-theme <folder>(no window, exit code 1 on a problem; with no folder, your themes folder). In a clone of the repository it is alsocargo run -p modding --example check_theme. The game writes the problems of its last listing toproblems.txtin your themes folder too: see reading errors.- TypeScript (
npx tsc) and theme.d.ts, for the second step: your editor completes the paths of the screen and a typo is a type error before the game runs the file.
Themes are looked up in themes/ next to prism.exe (the themes that ship with the game) and in your own <data>/themes folder. Your own folder is the one to use. In the game, open the Skins page: the Interfaces section has an Actions menu with Open themes folder and Reload themes. Open themes folder opens <data>/themes (it is created for you). See where themes are looked up.
Your first theme: tokens only
A theme is a folder. The smallest useful one holds a manifest and a file of tokens.
Start the folder
Two ways to begin:
- From scratch. Create the folder
first-themein your themes folder, with the two files below. - From a shipped theme. Copy a folder of the game's own
themes/(for exampleslant) into your themes folder, rename it, and edit it. The id intheme.jsonmust be the folder's name, so change both. A shipped theme also has atheme.tsand atheme.css: keep them to start from its layout, or delete them to keep only its palette.
The name of the folder is the theme's id: lowercase letters, digits and hyphens, 32 characters at most.
The manifest
theme.json names the theme and says how its accent behaves. It is the same file as in the tested example first-theme:
{
"id": "first-theme",
"name": "First theme",
"description": "The smallest useful theme: a manifest and a palette in tokens.css, nothing else. Teal on deep blue, rounded plates.",
"version": "1.0.0",
"author": "Prism docs",
"themeApi": 2,
"accent": "fixed",
"tokens": "tokens.css",
"localized": {
"fr": {
"name": "Premier thème",
"description": "Le plus petit thème utile : un manifeste et une palette dans tokens.css, rien d'autre. Turquoise sur bleu profond, plaques arrondies."
}
}
}
id equals the folder name. accent: "fixed" means the accent is always the theme's own --pv-accent, whatever the player chose in the Accent colour setting; leave it out (or write "preference") to let the player's choice win. localized gives the name and description in French; add the languages you can write. Every field is explained in the theme folder.
The tokens
tokens.css is a list of --pv-* values in one :root block. Every token is typed, and every token you leave out keeps the game's neutral value, so this file can be as short as you like.
/*
* First theme: a palette, a shape and a font, nothing else. Every token that is missing keeps the game's neutral value,
* so a theme can be as short as this one. Only `:root { --pv-x: value }` blocks are allowed in this file.
*/
:root {
/* Native controls (scrollbars, inputs) follow the scheme of the palette. */
--pv-color-scheme: dark;
/* Surfaces: a deep blue page and three steps of plate on it (rest, raised, hovered). */
--pv-bg: #0b1320;
--pv-plate: rgb(18 30 48 / .86);
--pv-plate-raised: rgb(27 44 68 / .92);
--pv-plate-hover: rgb(38 60 90 / .96);
--pv-plate-active: rgb(45 212 191 / .18);
--pv-plate-active-hover: rgb(45 212 191 / .28);
--pv-line: rgb(255 255 255 / .14);
--pv-track: rgb(255 255 255 / .1);
/* Text: three steps, and the ink drawn on top of an accent-coloured surface. */
--pv-text: #eef5fb;
--pv-text-2: #b6c6d8;
--pv-text-3: #8397ad;
--pv-ink: #06201c;
/* The accent. `"accent": "fixed"` in theme.json makes it the accent whatever the player chose. */
--pv-accent: #2dd4bf;
--pv-accent-2: #f9a8d4;
/* Shape: every plate is a rectangle with round corners. `--pv-clip-*` would cut other shapes (see the tokens reference). */
--pv-clip-lg: inset(0 round 14px);
--pv-clip-md: inset(0 round 10px);
--pv-clip-sm: inset(0 round 6px);
--pv-radius-input: 8px;
--pv-radius-panel: 14px;
/* Type: one family for text, a heavier weight for titles. */
--pv-font-display: 'Segoe UI Variable Display', 'Segoe UI', system-ui, sans-serif;
--pv-font-body: 'Segoe UI Variable Text', 'Segoe UI', system-ui, sans-serif;
--pv-fw-display: 700;
--pv-display-case: none;
/* Layout words are tokens too: the tabs of the selected map as a rail, the Play strip at the bottom (the default). */
--pv-layout-tabs: rail;
--pv-layout-play: bottom;
}
What it does, from the top:
--pv-color-schemetells the native controls (scrollbars, inputs) whether the palette is dark or light.--pv-bg,--pv-plate*,--pv-lineand--pv-trackare the surfaces: the page, three steps of plate (rest, raised, hovered and selected), hairlines and the empty part of a gauge. Colours may carry transparency.--pv-text,--pv-text-2,--pv-text-3are three steps of text;--pv-inkis the text drawn on an accent-coloured surface, so it must read against--pv-accent.--pv-accentand--pv-accent-2are the accents.--pv-clip-*and the radii set the shape of plates, buttons and badges. A clip can cut slanted shapes; here every plate is a rounded rectangle.- The fonts and weights set the type. Use a stack that ends with a generic family.
--pv-layout-*are layout words: a token that takes one word from a closed list.--pv-layout-tabs: railturns the tabs of the selected map into a rail. The first word of each list is the game's current layout, andbottomis the first word of--pv-layout-play, so that line says what the game does anyway; try--pv-layout-play: topand--pv-layout-list: left.
Every token, its type and its range are in the token reference. The ideas behind them are in concepts.
Check it
Put the folder in your themes folder and run the game's check on it (prism.exe is in the game's install folder):
& "$env:LOCALAPPDATA\Programs\Prism\prism.exe" --check-theme "$env:LOCALAPPDATA\Prism\PrismNG\data\themes"
From a clone of the repository, the same check is check_theme on the folder that holds your theme folders:
cargo run -p modding --example check_theme -- "$env:LOCALAPPDATA\Prism\PrismNG\data\themes"
A folder with no problem prints one line for the folder and one line per theme, and the exit code is 0:
<your themes folder>: 1 theme(s) loaded (theme API 1)
first-theme 0 template(s), 0 byte(s) of theme.css
A problem prints one line per problem, in the form "<theme>": <file>: <where>: <reason>, and the exit code is 1. These two are real, from a copy of this theme with a mistake in the accent line:
problem: "first-theme": tokens.css: line 26: --pv-acent is not a theme token
problem: "first-theme": tokens.css: line 26: --pv-accent: "teal-ish" is not a colour
The file, the line, the token and the reason are all there. A problem in theme.json, tokens.css or theme.css takes the theme out of the game's list, so fix it before you look for the theme.
Pick it in the game
- Open the Skins page. The Interfaces section lists every theme as a card, drawn with that theme's tokens.
- If the game was already running when you added the folder, open the Actions menu and choose Reload themes.
- Click the card of your theme. The menus change at once.

If the card is missing, the list below the cards (Theme folders that cannot be used) says why. The game writes the same lines to its standard error as Themes: ….
Change a token and reload
Open tokens.css, change --pv-accent to another colour, save, and choose Reload themes. The game lists the folders again and applies the new values to the theme in use. This edit, check, reload loop is the whole workflow. When a theme grows, keep running check_theme: it gives the same notices as the game.
Your first layout: theme.ts
Tokens restyle the game. To move things, a theme adds a template. You will rearrange the map selection screen: the list of maps on the left, and the selected map on the right with its Play strip (rating, judgement and the Play button) above the heading. The tested example is first-layout: the same palette idea plus a theme.ts and a theme.css.

Add the files
Copy your first-theme folder to first-layout, change id and name in theme.json, and add two files next to tokens.css: theme.ts (the template) and theme.css (the styles of the classes the template creates). Any theme can have these files, with or without tokens.
theme.ts is TypeScript that the game runs once, when the theme loads. It does not draw anything. It returns a tree of nodes, plain data, which Rust checks against the contract of the screen. If the tree is valid, the game draws it with its own components.
The entry point
// First layout: the library (the list) on the left, the selected map on the right with the Play strip ABOVE its heading.
//
// theme.ts runs ONCE, when the theme loads, and returns data: a tree of nodes that Rust checks against the contract of `screen.library`.
// The validator refuses a template that drops a place the screen requires, so every place is still placed here: only their order and their wrappers change.
// The file declares names of its own (functions), so it is a module.
export {};
// The `c` of the library screen: its input paths, its places and its classes are typed by theme.d.ts.
type Screen = ThemeContext<'screen.library'>;
// The entry point: one template for the screen `screen.library`.
defineTheme({ screens: { library: libraryScreen } });
- The first lines are comments. The theme API has no
import:defineThemeand the builders (box,row,text…) are already there. export {};makes the file a module, so that the names it declares (the functions below) are its own.type Screen = ThemeContext<'screen.library'>is the type of the contextcfor the map selection screen. From the declarations intheme.d.ts, your editor knows every path of the screen's input, every place and every class of the screen.defineTheme({ screens: { library: libraryScreen } })registers one template, for the screenscreen.library. A template is a function that receivescand returns a node. Everything else in the file is helpers that build that tree.
The screen
// The screen: two columns side by side, the list first. `pv-screen` is a class of the screen (the game styles it), `screen` is this theme's, defined in theme.css.
// `--selection-color` is a variable of the screen: the colour of the selected row, read from the input.
function libraryScreen(c: Screen): ThemeNode {
return c.row(
{ class: ['screen', 'pv-screen'], vars: { '--selection-color': c.bind('browser.color') } },
library(c),
selectedMap(c),
);
}
c.row lays its children side by side. The attributes come first, then the children. class names two classes: pv-screen belongs to the screen (the game styles it) and screen is yours, defined in theme.css. vars hands a variable of the screen to the stylesheet; its value is read from the input with c.bind('browser.color'). The children are the library first, then the selected map: that order puts the list on the left.
The selected map and the Play strip
// The selected map: the Play strip first (the `footer` place: rating, judgement, Play), then the heading, the tabs and their panels.
// While nothing is selected, `when` draws the heading alone: it is the invitation to pick a map.
function selectedMap(c: Screen): ThemeNode {
return c.column(
{ as: 'section', class: 'map', aria: { label: c.t('ui.selected_map'), busy: c.bind('selection.busy') }, vars: { '--difficulty-color': c.bind('browser.color') } },
c.when(
c.field('selection.shown').truthy(),
[c.box({ class: 'play' }, c.slot('footer')), c.box({ class: 'details' }, c.slot('header'), c.slot('tabs'), c.slot('panels'))],
c.slot('header'),
),
);
}
c.slot('footer') is a place: the game draws its own Play strip there, and your template only says where it stands and what wraps it. The strip is placed before the heading, the tabs and the panels, inside a box with the class play. c.when(condition, then, otherwise) draws then while a map is selected; with nothing selected, the heading alone is the invitation to pick one.
The validator refuses a template that does not place every required place of its screen, so you cannot delete Play or the list. You can only move them. See places.
The library
// The library: the toolbar, the search and the list. The playlists and the visualizer cover the list, so they are placed next to it
// (`browser-body`, `browser-list` and `browser-playlists` are classes of the screen: the game stacks the lists with them).
function library(c: Screen): ThemeNode {
const covered = c.field('browser.covered').truthy();
return c.column(
{ as: 'section', class: 'library', aria: { label: c.t('ui.available_beatmapsets') } },
c.slot('intent'),
c.slot('toolbar'),
c.box(
{ class: 'browser-body' },
c.box({ class: 'browser-list', classWhen: { covered }, inert: covered }, c.slot('search'), c.slot('list')),
c.when(c.field('browser.view').eq('playlists'), c.box({ class: 'browser-playlists', focusable: true }, c.slot('playlistSearch'), c.slot('playlists'))),
c.when(c.field('browser.visualizer').truthy(), c.slot('visualizer')),
),
);
}
The toolbar, the search and the list, as the game draws them by default. The playlists and the visualizer cover the list, so they are placed next to it. browser-body, browser-list and browser-playlists are classes of the screen: the game uses them to stack the lists, so keep them. classWhen adds covered while a condition holds, and inert makes the list unreachable by keyboard while it is covered.
The stylesheet
Every class the template uses must be defined in theme.css or be a class of the screen. Here screen, map, library, details and play are the theme's own:
/* The classes of theme.ts: two columns, the library first, the selected map second. */
.screen { display: flex; flex-direction: row; align-items: stretch; gap: var(--pv-s6); height: 100%; min-height: 0; }
.map { display: flex; flex-direction: column; flex: 1 1 0; min-width: 0; min-height: 0; }
.library { display: flex; flex-direction: column; flex: 1 1 0; min-width: 0; min-height: 0; }
.map > .details { display: flex; flex-direction: column; flex: 1 1 0; min-height: 0; overflow: hidden; }
/* The Play strip stays pinned above the heading; a hairline under it separates it from the map. */
.map > .play { border-bottom: 1px solid var(--pv-line); padding-bottom: var(--pv-s3); }
Colours and gaps come from tokens (var(--pv-line), var(--pv-s6)), never from literals. The rules of theme.css are in theme.css.
Type checking with theme.d.ts
The game refuses a template with a wrong path, but you can catch it in your editor first. Copy theme.d.ts next to theme.ts (the game's own copy is mods/sdk/theme.d.ts), and put this as the first line of theme.ts:
/// <reference path="theme.d.ts" />
Then check the file with TypeScript:
npx tsc --noEmit --strict --target es2022 --skipLibCheck theme.ts
A typo in a path is an error, with the list of valid paths in your editor's completion. This is what tsc says for c.bind('browser.colour'):
theme.ts(20,75): error TS2345: Argument of type '"browser.colour"' is not assignable to parameter of type 'ThemeBindable<ThemeScope_screen_library>'.
The comment line and the extra theme.d.ts are ignored by the game (only theme.json, tokens.css, theme.css, theme.ts and pictures are read). Leave both out of a theme you share. The ThemeContext types are explained in templates.
Reload, and read the errors
Choose Reload themes, then pick first-layout. The game runs theme.ts again, validates the tree and, if it is valid, draws it.
If it is not, the theme still loads without its template (tokens and CSS stay) and a notice names the file, the node and the reason. This is the same typo as above, as the game or check_theme prints it:
problem: "first-layout": theme.ts: screen.library › row.screen (vars › --selection-color › bind): the path "browser.colour" is not in the screen: no field "colour" in "browser" (fields: view, covered, visualizer, color) [at vars/--selection-color/bind]
Read it from left to right: the template (screen.library), the chain of nodes down to the one at fault (row.screen: a row whose first class is screen), the attribute in parentheses, the reason, and the raw path in brackets. Reading errors explains every part and lists the errors you are likely to meet.
Where to go next
- Change how the game's own parts are laid out with layout words and tokens: the token reference.
- Learn the language of
theme.ts: templates. - Copy a recipe (a hero banner, slanted cards, a poster layout, a terminal list, live bars, a settings rail): the cookbook.
- Understand screens, contracts, faces and the fallbacks: concepts.
- Check, share and troubleshoot: sharing.