Unscripted supports the creation and usage of themes which manage the overall look of the game and its interface. Themes are defined as a directory with a manifest and subdirectories of image files that contain the interface elements.
There are four themes that ship with Unscripted:
- Ayu Light Blue (
- Ayu Mirage Blue (
- Ayu Dark Blue (
- Ring (
All Ayu themes are variants of the Ayu color scheme with the accent color changed to the Unscripted blue color. Ring is the original Unscripted theme before the theme overhaul.
The game will try to set
ring as the default interface theme if no theme is present. In the game's settings under Appearance, the game will allow players to select from any of the Ayu themes.
Creating a theme¶
A theme can be created by creating a directory of the theme's name and then adding a manifest file in the theme's directory called
The theme manifest contains a single dictionary key,
theme. The following is a list of all of the respective keys and values for the manifest:
theme- The root theme object
name- The name of the theme. This should match the directory's name.
type- The theme's color scheme type. Should either be
resources-dir- The path to the theme's folder
colors- The theme's text and interface colors
background- The color to use for a background when an image isn't provided.
interface- The color of the theme's foreground text
interface_active- The theme's accent color
interface_highlight- The theme's highlight color
interface_secondary- The theme's "muted" or "disabled" color
syntax- The theme's syntax colors
source_text- The color for standard source text
symbols- The color for code symbols
comments- The color for code comments
docstrings- The color for code documentation
strings- The color for strings
keywords- The color for keywords
numbers- The color for constants such as numbers
This is the manifest for
ruby-light as an example:
[theme] name = "ruby-light" type = "light" resources-dir = "core/themes/ruby-light" [theme.colors] background = "#FAFAFA" interface = "#959DA6" interface_active = "#55B4D4" interface_highlight = "#77A8D9" interface_secondary = "#6C7680" interface_button_idle = "#FFCC66" [theme.colors.syntax] source_text = "#6C7680" symbols = "#6C7680" comments = "#ABB0B6" docstrings = "#ABB0B6" strings = "#86B300" keywords = "#FA8D3E" numbers = "#A37ACC"
Interface elements such as frames, buttons, and checkboxes are drawn with image files, which are located in the
resources directory of the theme's folder. The theme should contain files for the following elements:
Most interact-able elements like checkboxes and buttons will have multiple states:
insensitive. Consult any of the default themes for the exact structure and kinds of files needed.
Theme object holds the data necessary to create and render a theme. The following is the Python documentation for this class.
Construct a theme object.
- **kwargs: Arbitrary keyword arguments
- filepath (str): The path to a valid theme configuration.
- name (str): The name of the theme.
- path (str): The path to the file's theme resources.
Get the theme's colors.
- ui_colors (ThemeColor): The theme's UI colors.
Get the theme's colors for syntax highlighting.
- syntax_colors (ThemeSyntaxColor): The theme's syntax colors.
Get the paths for the theme's checkbox styles.
- checks (ThemeCheckbox): The theme's checkbox enumeration.
Get the paths for the theme's radio styles.
- checks (ThemeRadio): The theme's radio enumeration.
Get the path for the theme's button styles.
- buttons (str): The path to the button images.
Get the path for the theme's tab group styles.
- tabs (str): The path to the tab group images.
Get the paths for the theme's bar styles.
- bars (ThemeBars): The theme's bars enumeration.
Get the paths for the theme's scrollbar styles.
- scrollbars (ThemeScrollbars): The theme's scrollbars enumeration.
Get the paths for the theme's slider styles.
- sliders (ThemeSliders): The theme's scrollbars enumeration.
Get the paths for the theme's frame styles.
- frames (ThemeFrame): The theme's frame enumeration.
Get the paths for the theme's overlay styles.
- overlays (overlay): The theme's overlay enumeration.