Markup Palette
Learn about Markup Palettes, which allow you to make color presets for markup in your dialogue.
Last updated
Learn about Markup Palettes, which allow you to make color presets for markup in your dialogue.
Last updated
Markup Palettes provide a means of lightly theming your lines without requiring any code. The code for Markup Palettes inside of Line view present a good starting point for more advanced customization for your game.
In Godot, Markup Palettes are implemented as a custom C# Resource.
To get started, create a Markup Palette by selecting the menu item Project > Tools > YarnSpinner > Create Markup Palette.
Select a directory and filename to save your Markup Palette to.
Then, find your new palette in the Filesystem panel and double click it to open the inspector.
You can add as many tag names as you want to the palette, and click the color buttons next to each tag to assign the color for the tag. You can remove colors by clicking the X button next to the color button for the tag.
The built-in LineView and OptionsListView both support the use of markup palettes to color your dialogue. To use your markup palette with these views, drag and drop the markup palette resource into the Palette field of the view's inspector.
Then, when you use markup tags in your dialogue that match tags defined in your markup palette, the views will automatically replace your markup tags with BBCode color tags.
To see markup palettes in action, try out the Markup Palette sample in the Yarn Spinner for Godot repository.
This sample highlights:
Using markup palettes to color text
Using markup in dialogue