Theme Colors
Base type, semantic colors and raw colors.
A theme's colors live in bundle.json: a base type, semantic roles and raw system colors.
- my-theme
- manifest.jsonSee The Manifest
- bundle.jsonColors and background
Example
{
"type": "darker",
"raw": {
"systemBlueColor": "#c74050"
},
"semantic": {
"BACKGROUND_PRIMARY": { "type": "color", "value": "#0c0c0c" },
"TEXT_NORMAL": { "type": "color", "value": "#fcfcfc", "opacity": 1 },
"BUTTON_BACKGROUND": { "type": "raw", "value": "systemBlueColor" }
},
"background": {}
}For background, see Backgrounds.
Base Type
type sets the palette your theme builds on. Anything you don't override falls back to it.
type | Base palette |
|---|---|
light | Light |
dark | Ash, Discord's lightest dark theme |
darker | Dark, deeper than Ash |
midnight | Onyx, pure black for OLED screens |
Semantic Colors
Each key is a Discord color role's selector name, such as BACKGROUND_PRIMARY or TEXT_NORMAL. Setting one recolors every place that role is used.
color is a literal value. raw points to a key in your raw map.
The color, or the raw key when type is raw.
Optional, 0 to 1. Replaces any alpha in the color. Ignored when a raw entry names a key your raw map lacks.
- A key that matches no selector does nothing, with no warning.
- An entry missing
typeorvalueis skipped and keeps its original color.
Raw Colors
raw is a flat map keyed by a system color's selector name, such as systemBlueColor. It replaces that color everywhere, below Discord's roles.
- Semantic entries with
"type": "raw"share the raw value. - Raw overrides apply with the theme and are restored when you switch themes.
Color Formats
Every color string, in raw or a semantic color entry, accepts:
| Format | Alpha |
|---|---|
#RRGGBB | Opaque |
#RRGGBBAA | Final byte, 00 to FF |
rgb(r, g, b) | Opaque. Channels 0 to 255 |
rgba(r, g, b, a) | a is 0 to 1. Channels 0 to 255 |
These fail to parse:
rgbawith fewer than four values.rgbwith fewer than three values.- Anything not starting with
#,rgborrgba, including named colors likered.