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:
theme = "dark_documentary"Available project themes:
dark_documentary(default) โ navy background, gold accentshacker_terminalโ green-on-blackscientificโ clean, light, neutralblueprintโ blue technical drawingmodern_minimalโ restrained and brightretro_computerโ amber CRTancient_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:
// 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.
Files that made this video
The same Rust source rendered repeatedly with different syntax highlight themes.
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 = 18List everything available on your build:
cinecode themesSet fonts
Declare fonts in the manifest (remember: bare keys before any [table]):
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");Files that made this video
A text-node font gallery using system fonts.
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 = 18CineCode 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.