The shape of a theme
A theme definition has three parts that decide its colors: a basetype, a set of semantic colors, and a set of raw colors. Together they override Discord’s palette.
Base type
type picks the foundation your theme builds on. You only override the colors you care about, and everything else falls back to this base.
- midnight
- darker
- light
A pure-black base, for OLED/AMOLED-style themes.
Semantic colors
Semantic colors are Discord’s named roles:BACKGROUND_PRIMARY, TEXT_NORMAL, and so on. Theming by role means a single value recolors everywhere that role is used, so the result stays consistent across the app.
Each entry is an object: a type of color (a literal color) or raw (a reference to a raw color), the value, and an optional opacity.
color is a literal value; raw points at one of your raw colors so many roles can share it.The color, or the raw key when
type is raw.Optional opacity applied to the color.
Raw colors
Raw colors are a flat map of your own named values: your palette’s source of truth. Define a color once here, then point semantic roles at it withtype: 'raw'. Change the raw value and every role referencing it updates together.