Text styling
Text styling lets you style parts of a dynamic text when you create a render. Instead of a plain value, you send the text with a few simple tags that mark which words or characters get a different color, size, font or other style. The rest of the text keeps the style from the template, so one text layer can show a highlighted word, a bigger number or a brand name in its own font, without any changes to the After Effects project.
Tags
| Tag | Value | Example | Effect |
|---|---|---|---|
b | — | <b>bold</b> | Faux bold |
i | — | <i>italic</i> | Faux italic |
color | Hex color: #RRGGBB, #RGB, #RRGGBBAA or #RGBA | <color=#e11d48>red</color> | Fill color, turns the fill on |
size | Number from 0.1 to 1296 | <size=48>small</size> | Font size |
leading | Number from 0 to 5000 | <leading=90>lines</leading> | Space between lines |
tracking | Whole number from -1000 to 1000, decimals are cut off | <tracking=200>wide</tracking> | Space between characters |
stroke | Hex color, same as color | <stroke=#000000>outline</stroke> | Stroke color, turns the stroke on |
strokeWidth | Number from 0 to 1000 | <strokeWidth=4>outline</strokeWidth> | Stroke width, turns the stroke on |
caps | normal, all caps, small caps or all small caps | <caps=all caps>loud</caps> | Caps option |
font | PostScript name of a font used in the project | <font=Inter-Bold>brand</font> | Font, see Fonts |
fontUrl | URL of a font file | <fontUrl=https://my.cdn.net/Barlow-Black.ttf>brand</fontUrl> | Font from a file, see Fonts |
Properties that a tag does not set keep the style of the layer. With strokeWidth alone, the stroke uses the stroke color of the layer.
Syntax
- Wrapper: a value is markup only when it starts with
<>and ends with</>. Spaces and line breaks around the wrapper are ignored, the ones inside it are kept. A value without the wrapper is set as plain text, tags included. - Tags: open a tag with
<name>or<name=value>and close it with</name>. Tags must be closed in the reverse order they were opened:<b><i>text</i></b>, not<b><i>text</b></i>. - Nesting: nested tags combine. When two tags set the same property, the inner one wins, for example
<color=#ffffff>white <color=#e11d48>red</color> white</color>. - Special characters: inside the wrapper, write
<as<. A single>or&is shown as it is, and>and&can be used for them too. Tag values are read as they are, so a URL with&is written without escaping it. - Errors: an unknown tag, a value out of range or a tag that is not closed fails the render with the problem and its position in the value, for example
Invalid text markup for layer "Title": Unknown tag "u" at position 4.
Render properties style the whole layer, and the markup styles its parts on top of them. Use both to, for example, set the font size of the layer and color a single word.
With the box text mode of the text auto scale script, all parts are scaled together, so a word that is twice as big as the rest stays twice as big.
Fonts
fontsets a font that is used in the project, by its PostScript name, for exampleInter-Bold. The render fails withFont [Inter-Bold] is not included in the project.when the font is not in the project.fontUrlsets a font from a font file that is downloaded and installed for the render. The same font file used in many places is downloaded once.
font and fontUrl replace each other: a font tag inside a fontUrl tag sets the font of that part, and the other way around.
Markup in parameters
The markup is read after the value of the layer is resolved, so it also works when it comes from a dynamic parametrization:
- Expression: the expression can build the markup around a render parameter, for example
'<>Hi <color=#facc15><b>' + #firstName + '</b></color>!</>'. Every render gets the name in bold yellow. - Default value: a default value can be markup too, for example
<>Hi <b>there</b>!</>. It is styled the same way when the parameter is not given.
The parameter is inserted into the markup as it is. A < in the parameter, for example in I <3 Plainly, makes the
markup invalid and the render fails, and <, > or & in it are shown as <, > and &. Escape these
characters in the parameter or keep such values out of the markup.
Examples
All examples use the same text layer, styled in the template with Barlow SemiBold, size 120, in white. Only the markup changes.
Brand love
Color and < for the heart.
<>I <color=#e11d48><3</color> Plainly</>
Sale
Color and bold for the discount.
<>Up to <color=#e11d48><b>50%</b></color> off</>
Price
A bigger price with smaller cents.
<>Now <size=150><b>$19</b></size><size=72>.99</size></>
Score
A highlighted result.
<>Lions <color=#facc15><b>3 : 1</b></color> Tigers</>
Outline
Stroke with a fill in the background color.
<><stroke=#e11d48><strokeWidth=6><color=#0f172a>BIG</color></strokeWidth></stroke> news</>
Breaking news
Caps and wide tracking.
<><caps=all caps><tracking=100><color=#e11d48>Breaking</color></tracking></caps> news tonight</>
Project font
A font that is used in the project.
<>Made with <font=CormorantGaramond-Bold><size=150>love</size></font></>
External font
A font from a font file.
<>Powered by <fontUrl=https://github.com/google/fonts/raw/main/ofl/bebasneue/BebasNeue-Regular.ttf><size=150>Plainly</size></fontUrl></>
Two lines
A small heading above a title, with leading for the space between the lines. Line breaks in the value are kept, in the API send them as \n.
<><size=60><tracking=100><color=#facc15>EPISODE 12</color></tracking></size>
<leading=130><b>The final chapter</b></leading></>
Quote
Italic text with a smaller author.
<><i>"Best tool ever"</i> <size=72>— <b>Jane</b></size></>
Styling text with AI
AI assistants can write the markup for you. Paste the instructions below into ChatGPT, Claude or another assistant, or into the system prompt of your agent, then ask for the text you need.
You write text values for Plainly video templates using Plainly text markup.
Rules:
- Wrap the whole value in <> and </>. Without the wrapper the tags are shown as plain text.
- Tags: <b>, <i>, <color=#hex>, <size=number>, <leading=number>, <tracking=whole number>,
<stroke=#hex>, <strokeWidth=number>, <caps=normal|all caps|small caps|all small caps>,
<font=PostScriptName>, <fontUrl=https://...>. Do not use any other tag.
- Close every tag with </name>, in the reverse order it was opened.
- Hex colors: #RRGGBB, #RGB, #RRGGBBAA or #RGBA.
- Ranges: size 0.1-1296, leading 0-5000, tracking -1000-1000, strokeWidth 0-1000.
- Write < as <, > as > and & as & in the text. Write tag values, such as URLs, as they are.
- Use <font> only with fonts the user named, they must be in the project.
- Style only the words that need it, the rest keeps the template style.
- Return only the value, without quotes or explanation.For example:
| Request | Value |
|---|---|
| ”I love Plainly, with a big red heart” | <>I <color=#e11d48><size=140><b><3</b></size></color> Plainly</> |
| ”50% off sale, make the discount pop” | <>Up to <color=#e11d48><b>50%</b></color> off</> |
| ”Price 19.99 dollars, cents smaller” | <>Now <size=96><b>$19</b></size><size=48>.99</size></> |