--slide-* variable set that every slide renderer reads at render time. You can author a theme in two ways: pass a structured colors + fonts object and let the SDK compile the full :root block for you, or provide a raw css string for complete control. A theme can be applied to a deck atomically at creation time, or you can associate it later via decks.update.
ablo.themes.create(params, options?) → ThemeResource
Creates a new theme. You must supply either css or both colors and fonts — the call throws if neither path is satisfied.
string
required
Display name for the theme, shown in the editor’s theme picker.
string
A raw
:root { --slide-* } CSS block. Provide this or colors + fonts, not both. Use this path when you need exact control over every variable, including typography scale overrides.ThemeColors
Structured color tokens. The SDK compiles these into the full CSS variable set, with typography defaults baked in. Required when using the structured path.
ThemeFonts
Structured font tokens. Required when using the structured path alongside
colors.boolean
When
true, marks this theme as the workspace default — new decks that don’t specify a themeId inherit it.string
A deck id. When provided, the theme is applied to that deck in the same atomic commit as the theme creation. Useful when you create a theme and immediately want it active on a specific deck.
RequestOptions
Per-call commit controls. See RequestOptions.
ThemeResource
string
The theme’s id. Store this to apply the theme to decks or update it later.
string
The name you provided.
ablo.themes.update(params, options?) → CommitReceipt
Updates a theme’s name, CSS, or both. Changes take effect immediately for all decks using the theme.
string
required
The theme to update.
string
New display name for the theme.
string
Replacement
:root CSS block. The entire CSS is replaced — this is not a merge. If you want to update individual variables, read the existing theme first and patch the relevant lines.RequestOptions
Per-call commit controls.
ablo.themes.delete(id, options?) → CommitReceipt
Deletes a theme. Decks that reference this theme will fall back to the workspace default.
string
required
The theme id to delete.
RequestOptions
Per-call commit controls.
Examples
Structured colors + fonts
The structured path is the most common. Passcolors and fonts; the SDK compiles a complete :root block including typography scale, line-height, font-weight, and letter-spacing defaults.
Structured theme applied atomically to a deck
Create the theme and link it to an existing deck in one commit.Raw CSS approach
Use thecss path when you need precise control — custom typography scale, additional variables, or brand-specific overrides not covered by the structured fields.