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

bundle.json
{
	"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.

typeBase palette
lightLight
darkAsh, Discord's lightest dark theme
darkerDark, deeper than Ash
midnightOnyx, 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.

type'color' | 'raw'

color is a literal value. raw points to a key in your raw map.

valuestring

The color, or the raw key when type is raw.

opacitynumber

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 type or value is 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:

FormatAlpha
#RRGGBBOpaque
#RRGGBBAAFinal 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:

  • rgba with fewer than four values.
  • rgb with fewer than three values.
  • Anything not starting with #, rgb or rgba, including named colors like red.