CineCode
How-to Guides

Customize themes and fonts

Switch the project theme, code highlight theme, and fonts to set the mood.

Goal

Change the overall look โ€” palette, code colors, and typography โ€” to match the tone of your video.

Set the project theme

The project theme controls the background, palette, and default code theme. Set it in the manifest:

codescene.toml
theme = "dark_documentary"

Available project themes:

  • dark_documentary (default) โ€” navy background, gold accents
  • hacker_terminal โ€” green-on-black
  • scientific โ€” clean, light, neutral
  • blueprint โ€” blue technical drawing
  • modern_minimal โ€” restrained and bright
  • retro_computer โ€” amber CRT
  • ancient_manuscript โ€” parchment and ink

Choose a code highlight theme

s.code() accepts an optional theme argument to override the default just for that block. The clip below styles this real file from the example project, so you can see exactly what each theme does to the same code:

src/editor_theme.rs
// blend two hex channels by a factor t
fn blend(a: u32, b: u32, t: f32) -> u32 {
    let v = a as f32 * (1.0 - t) + b as f32 * t;
    return v.round() as u32;
}

fn main() {
    let theme = "ocean";
    println!("{theme} = {}", blend(0x10, 0xF0, 0.5));
}
// code(source, lang, [theme], x, y)
let a = s.code(read("src/editor_theme.rs"), "rust", "base16-ocean.dark", 96, 160);

Built-in code themes include base16-ocean.dark (default), base16-eighties.dark, base16-mocha.dark, Solarized (dark), base16-ocean.light, Solarized (light), and InspiredGitHub.

The src/editor_theme.rs file above, shown under several highlight themes.
Files that made this video

The same Rust source rendered repeatedly with different syntax highlight themes.

codescene.toml
Project manifest: output size, theme, scene order, transitions, and shader names.
Open full file
scenes = ["scenes/intro.ccs", "scenes/terrain.ccs", "scenes/pathfind.ccs", "scenes/particles.ccs", "scenes/graph.ccs", "scenes/life.ccs", "scenes/boids.ccs", "scenes/tweens.ccs", "scenes/inserts.ccs", "scenes/edit.ccs", "scenes/edit_source.ccs", "scenes/editor_theme.ccs", "scenes/font_set.ccs", "scenes/remove_styles.ccs", "scenes/morph.ccs", "scenes/shapes.ccs", "scenes/effects.ccs"]
theme = "dark_documentary"

[episode]
title = "How Rivers Form"

[output]
fps = 30
width = 1280
height = 720

[shaders]
aurora = "shaders/aurora.wgsl"
glitch = "shaders/glitch.wgsl"
scanlines = "shaders/scanlines.wgsl"

[transition]
kind = "crossfade"
frames = 18

List everything available on your build:

cinecode themes

Set fonts

Declare fonts in the manifest (remember: bare keys before any [table]):

codescene.toml
fonts = ["assets/fonts/Inter.ttf", "assets/fonts/FiraCode.ttf"]

Then select a font per node:

s.text("Chapter One", 96, 64).font("Inter").font_size(56);
s.code(read("src/main.rs"), "rust", 96, 160).font("Fira Code");
The same sample rendered in several system fonts โ€” swapping fonts changes the whole character of a scene.
Files that made this video

A text-node font gallery using system fonts.

codescene.toml
Project manifest: output size, theme, scene order, transitions, and shader names.
Open full file
scenes = ["scenes/intro.ccs", "scenes/terrain.ccs", "scenes/pathfind.ccs", "scenes/particles.ccs", "scenes/graph.ccs", "scenes/life.ccs", "scenes/boids.ccs", "scenes/tweens.ccs", "scenes/inserts.ccs", "scenes/edit.ccs", "scenes/edit_source.ccs", "scenes/editor_theme.ccs", "scenes/font_set.ccs", "scenes/remove_styles.ccs", "scenes/morph.ccs", "scenes/shapes.ccs", "scenes/effects.ccs"]
theme = "dark_documentary"

[episode]
title = "How Rivers Form"

[output]
fps = 30
width = 1280
height = 720

[shaders]
aurora = "shaders/aurora.wgsl"
glitch = "shaders/glitch.wgsl"
scanlines = "shaders/scanlines.wgsl"

[transition]
kind = "crossfade"
frames = 18

CineCode bundles JetBrains Mono, so code renders out of the box even with no fonts entry.

Reference

The full palette of each theme and the code theme list are in Themes reference.

On this page