Palette Switcher

Retheme an entire comp from one slider — every colour swaps to the matching slot in a different palette.

Expression Code
// Palette Switcher
// Apply to Fill Color
// Add a Slider Control named "Theme" to a layer called "Controls"
slot = 0; // Which palette slot this layer uses: 0 = background, 1 = accent, 2 = text
themes = [
// Theme 0 — dark
[[0.07, 0.08, 0.10, 1], [1, 0.42, 0.21, 1], [0.96, 0.96, 0.94, 1]],
// Theme 1 — light
[[0.97, 0.97, 0.95, 1], [0.28, 0.54, 1, 1], [0.07, 0.08, 0.10, 1]],
];
t = Math.round(thisComp.layer("Controls").effect("Theme")("Slider"));
t = clamp(t, 0, themes.length - 1);
themes[t][slot];
Add a null named "Controls" with a Slider Control named "Theme", then apply this expression to every Fill Color in the comp. On each layer, edit the slot = 0 line at the top of the expression to that layer's role (0 = background, 1 = accent, 2 = text). Setting the slider to 0 or 1 switches the whole comp between themes — every layer pulls its role's colour from the chosen row.
Back to Colour & Style