Skip to content

Theme Engine

Fukurou Mishiranu edited this page Sep 17, 2020 · 1 revision

A new theme engine was introduced in Dashchan 3.0.0. It allows to customize the UI colors using external JSON files.

Example theme:

{
    "base": "dark",
    "name": "Tomorrow",
    "window": "#ff282a2e",
    "primary": "#ff32343a",
    "accent": "#ff81a2be",
    "card": "@primary",
    "quote": "#ffb5bd68",
    "tripcode": "#ff33cc88",
    "capcode": "#ff66bbff"
}

Here is the list of supported properties.

  • base (required) — base theme. Either light or dark.
  • name (required) — theme name. Each theme is identified by its name, so it's not possible to have multiple themes with the same name installed. Normie and Tomorrow theme names are preserved by application and cannot be used.
  • window — window background color.
  • primary (desirable) — toolbar color.
  • accent — color used by all widgets. Defaults to primary if not specified.
  • card — color used as background of dialogs, cards, popups, and navigation drawer.
  • post — post comment color.
  • meta — post meta color — the lines above comment (name, date, image size) and the buttons below comment ("Expand", "Open thread", etc).
  • spoiler — spoiler background color.
  • link — link color. Defaults to accent if not specified.
  • quote (desirable) — quote color.
  • tripcode — tripcode (# hash mark or generated name) color. Defaults to quote if not specified.
  • capcode — capcode (## admin mark) color. Defaults to tripcode if not specified.

Each color may be represented as:

  • #aarrggbbaa for alpha, rr for red, gg for green, and bb for blue.
  • #rrggbbrr for red, gg for green, and bb for blue.
  • @name — where name is the name of the color property (e.g. @primary). Allows to make references to other colors.
Clone this wiki locally