Skip to content

Function: resolveThemeVariables() ​

ts
function resolveThemeVariables(themeId, colorCss?): IResolvedTheme;

Defined in: colorThemes.ts:621

A theme and a person's colour CSS as solid colours, for clients that draw their own interface rather than apply the CSS:

  1. Fusion's own colours, and its hand-tuned solid surfaces.
  2. The theme's base colours. Once any base colour differs from Fusion's, the surfaces follow from them as Reduce transparency derives them on the web (lib/colorThemes.ts in the frontend).
  3. The colour CSS's :root variables, over both, with var() and color-mix() worked out. A surface it sets wins over the derived one. Translucent colours are laid over the background, since every surface is solid.
  4. The aurora: the colour CSS's --fusion-aurora stops, or the theme's glows.

Parameters ​

ParameterType
themeIdstring | undefined
colorCss?string | null

Returns ​

IResolvedTheme

Released under the GNU Affero General Public License v3.0.