Skip to content

Designers · Style and Theme

Theming and dark mode

Last updated 2 November 2026

Change the component colors to match a brand, and make a screen follow light and dark mode.

Developers · Designers

You can change the colors of the Insites components to match a brand. You do it with CSS custom properties, so you do not have to edit any component.

Theme the website components

The website stylesheet sets its colors as custom properties on :root. Set your own values after it loads:

app/assets/styles/theme.css

:root {
  --ins-color-primary: #0f6e5c;
  --ins-color-success: #24be8d;
  --ins-color-negative: #c0392b;
  --ins-border-radius: 8px;
}

The main properties you can change:

PropertyWhat it controls
--ins-color-primaryThe main action color
--ins-color-success, --ins-color-warning, --ins-color-negativeStatus colors
--ins-color-ink, --ins-color-ink40, --ins-color-ink10Text and muted text
--ins-bg-colorComponent background
--ins-border-color, --ins-border-radiusBorders and corner radius

Note

The website stylesheet sets one light palette. It has no dark mode of its own. If a site needs dark mode, set a second set of these properties under your own selector.

Light and dark mode with the design tokens

The design tokens support dark mode with no script. Each semantic token holds a light value and a dark value, and the browser picks one.

  • By default, the screen follows the visitor's system setting.
  • To force light mode, add data-color-scheme='light' to the <html> tag.
  • To force dark mode, add data-color-scheme='dark'.
<html data-color-scheme='dark'>

This also themes the browser's own controls, such as scrollbars and date pickers.

Design both modes

  • Use semantic tokens such as --ins-surface-raised, never fixed hex codes, so both modes work.
  • In Figma, switch the tokens theme between Light and Dark and check every screen.
  • The sidebar surface is dark in both modes, so check text on it in each.