Palettes by role and Chroma Lab

A palette gives your colours names: one for the background, one for formulas, one for variables, and so on. You make it once, and the editor uses it for what you create from then on. Chroma Lab, the colour studio inside the app, designs whole palettes for you.

What a palette is

A palette is a set of eleven roles, each with a colour. Every palette has all eleven, and the editor knows what to do with most of them:

RoleWhat the editor does with it
backgroundThe background of a new project.
formulaThe colour of a new formula.
variable, constant, operator, resultThe colours of a Match colors list made from the palette. They are also offered wherever you choose a colour.
textThe colour of a new text.
mutedThe colour of a new brace.
rectangleThe colour of a new box, highlight or underline.
circleThe colour of a new circle.
arrowThe colour of a new cross, cross line or line.

You can add roles of your own to a palette: a name and a colour, such as Highlight. Nothing takes them by itself. They are offered wherever you choose a colour by role.

Making a palette

Choose Preferences ▸ Editor palettes…. The dialog holds up to 24 palettes. New palette starts one from the colours the editor uses without a palette, Import palette… reads a theme file, and Duplicate copies the one selected.

The end of the Preferences menu, from Show grid on. Chroma Lab… is ringed and numbered 1, and Editor palettes… is ringed and numbered 2.
Chroma Lab… (1) and Editor palettes… (2) are the last entries of Preferences.

To make one:

  1. Press New palette. It appears selected, and not yet active.
  2. Give it a name in Display name and press Rename.
  3. Change a role: type a hex value in its field and press Enter, or use the picker beside it. The sample above the roles shows the palette at work on its own background.
  4. Under the eleven roles, Your roles adds roles of your own: type a name, choose a colour and press Add role (or Enter in the name).
  5. Press Activate.

A colour is saved as soon as its field is accepted. There is no draft and no undo, so Duplicate a palette first if you want to keep it as it is. A role of your own is renamed and recoloured in place and removed with Delete; a palette holds up to 24 of them.

Export JSON writes the palette to a file named after it. The file is the same palette when you import it again, here or in Chroma Lab. Your own roles travel in a field of their own, customRoles, beside the eleven colors.

Using a palette

Activate makes a palette the one the editor works with, marked Active in the list. From then on:

Nothing that already exists changes, and activating adds no undo step. To go back, select Manim defaults in the list and press Use Manim defaults. Deleting the active palette does the same, and the objects keep their colours.

The Roles button opens every role as a block with its name beside its colour, and your own roles under Your roles. Choosing one puts its colour in the field. The swatches of a menu keep the names in their tooltips.

The top of a formula's editor with the Roles button of the Colour row (ringed, 1) and its pop-up: the eleven roles of the palette Chalkboard as coloured blocks with their names, two to a row, and under the heading Your roles, Highlight and Soft grid.
The Roles button of a colour field (1).

Recolouring what exists

Edit ▸ Apply palette… recolours the objects of the project with the role of their kind. The entry is off until a palette is active. The dialog shows what would change before anything does.

The middle of the Edit menu, from Distribute to Colours in order. Apply palette… is ringed and numbered 1, and Match colors is ringed and numbered 2.
Apply palette… (1), and the lists of Match colors (2).
The Apply palette dialog: the palette Chalkboard with its colours (1), the counts of objects that will change, are skipped or already match (2), the checkbox Apply background (3) and the list of skipped objects with their reasons (4).
The palette (1), what will change (2), the background (3) and what is skipped (4).
The scene before Apply palette: a black background, a white sum and three braces.
Before.
The same scene after Apply palette: the background and the colours of the palette Chalkboard.
After Apply palette with the palette Chalkboard.

Roles and Match colors

The roles variable, constant, operator and result are for the glyphs of an equation. The editor cannot tell which glyph is a variable, so you say it with patterns. Edit ▸ Match colors ▸ New from active palette… makes a list of four rows coloured with those roles, and leaves the patterns empty for you to fill. It colours nothing by itself.

The Match colors dialog on a list made from the palette Chalkboard: four rows with empty patterns and the colours of variable, constant, operator and result (1).
Four rows, one for each role. Write the patterns and apply the list.

Chroma Lab

Chroma Lab is the editor's colour studio. It generates palettes from harmonies and seeds, keeps roles linked, checks their contrast against the scene's background, extracts colours from an image and tries a palette on animated scenes. It comes inside the app and works offline: open it with Preferences ▸ Chroma Lab…. You do not need it to use palettes, but it is the quickest way to a good one.

The Chroma Lab dialog open over the editor: its title bar has Import palette… (ringed, 1), Editor palettes… (2) and an information button (3), and the studio below shows a scene and its colour roles, with the button Send to Manim Formula Editor ringed and numbered 4.
Chroma Lab in its dialog. The title bar has Import palette… (1), Editor palettes… (2) and the information button (3); Send to Manim Formula Editor (4) is in the studio.

A theme reaches the editor's palettes in two ways, and nothing is written to your project in either:

The Editor palettes dialog opened on the theme just sent from Chroma Lab: its name and the Activate button are ringed and numbered 1.
After Send: the theme is selected in Editor palettes, ready to activate (1).

The ⓘ button in the title bar says this again, and links to the notices of Chroma Lab. The general Export palette file of Chroma Lab has no named roles, and the editor cannot import it.

A palette that you edit in the editor, adding roles of your own, is not sent back. If you send the theme from Chroma Lab again, it arrives as a new palette without your roles.

Chroma Lab is a part of the editor that has a repository of its own, and it also opens alone from there. Getting the app running tells how the two fit together.

Try a palette on a scene

The widget at the top of the page recolours a short derivation with the roles of a palette: pick a palette, and every glyph takes the colour of its role. A palette that looks good on a swatch row can look very different on a scene, so look at it on one before you activate it. The project below is that derivation: download it, choose File ▸ Open…, press Other file… and pick it, to try a palette of your own on it.

Where to go next