:root block of --slide-* CSS variables that the Ablo renderer reads to paint colors, choose fonts, and scale typography. You can author a theme as a structured spec — a colors + fonts object — and the SDK compiles it to the canonical CSS that byte-matches a theme created in the editor. You can also pass raw CSS directly when you need precise control. Once created, a theme can be set as the workspace default or atomically applied to a specific deck in a single API call.
Creating a theme
Callablo.themes.create() with a name and either a structured spec (colors + fonts) or a raw css string. The method returns the saved theme object, including its id.
string
required
A human-readable label shown in the Ablo editor’s theme picker.
ThemeColors
The seven color slots that define the palette. All values are CSS color strings.
ThemeFonts
{ heading, body } — font family names. Use values from FONT_FAMILIES exported by @abloatai/decks to stay within the supported set.boolean
When
true, this theme becomes the workspace default applied to all new decks.string
A deck
id. When provided, the theme is applied to that deck atomically as part of the create call — no separate update step needed.Color slots
Thecolors object has exactly seven required keys. Every key maps directly to a --slide-* CSS variable the renderer reads.
brand
Primary accent color. Used for CTAs, highlights, and interactive elements.
Maps to
--slide-brand.brandLight
Lighter tint of the brand color. Used for backgrounds behind brand-colored elements.
Maps to
--slide-brand-light.textColor
Main body text color. Maps to
--slide-text-color.textMuted
Secondary/muted text. Used for captions, labels, and supporting copy.
Maps to
--slide-text-muted.surface
Slide canvas background color. Maps to
--slide-surface.card
Card and panel background. Maps to
--slide-card.border
Border and divider color. Maps to
--slide-border.Raw CSS themes
When you need control beyond the structured spec — custom typography overrides, additional variables, or a pre-existing CSS block — pass acss string directly instead of colors and fonts. The string must be a valid :root { --slide-* } block.
Inspecting compiled CSS
You can callbuildThemeCss() to preview the CSS the SDK produces from a structured spec before sending it to the API. This is useful for debugging, seeding scripts, or understanding exactly what variables a structured theme sets.
Using theme color tokens in layers
Rather than hard-coding'var(--slide-brand)' throughout your layer definitions, use colorRef() to resolve a token name to the correct CSS variable reference. The compiler validates the token name and your editor will autocomplete the available options.
Theme CSS variables reference
A structured theme compiles to a full:root block covering fonts, a complete typography scale, and all seven color slots. Here is the complete variable set the renderer reads.
- Fonts
- Typography scale
- Colors
Updating and deleting themes
Useablo.themes.update() to rename a theme or replace its CSS. Use ablo.themes.delete() to remove a theme permanently.
1
Update a theme
Pass the theme
id and any fields you want to change. Unspecified fields are left untouched.2
Delete a theme
Deleting a theme does not affect decks that already have the theme’s CSS applied — those
variables are stored on the deck itself and continue to render correctly.