HolySN

Themes

Repainting the instance in your own colours, what the editor can honestly show you, and why the preview cannot disagree with what is saved.

A theme repaints ServiceNow. Themes live on your account rather than on a profile, so switching profile does not change the colours.

One light theme, one dark theme

You can keep one light theme and one dark theme active at the same time, never two of the same mode: activating a second light theme takes the first one's place. The Dark mode switch decides which of the two the pages wear.

  • Dark mode on: your dark theme, or the built-in HolySN Dark when you have not set one.
  • Dark mode off: your light theme, or plain ServiceNow when you have not set one.

A light theme never shows in dark mode and a dark theme never shows in light mode. If you change a theme's mode in the editor while it is active, it moves to the other slot with it. The Themes panel shows both slots at the top, and marks the one on screen right now.

They are edited in settings, under Themes.

Sections and slots

The instance's design tokens are grouped into sections, derived from the platform's own naming: the navbar, the All menu, record tabs, lists, selection, pills and highlighted values, pagination, forms, read-only fields, the focus ring, buttons, links, messages split by kind (info, success, warning, error, and the rest), modals and panels, containers, steps, charts, and a base that collects everything the others do not claim. The grouping is total by construction: all 5,731 tokens land somewhere, and the base keeps 892.

Two more sections cover classic (UI16) pieces that are drawn with fixed colours and no token: the classic form headers (the bar at the top of a form and of its related lists) and the activity stream (its cards and the yellow work notes bar). A colour picked there becomes a CSS rule; one left alone changes nothing.

Read-only fields get a section of their own because their tokens are spread over five component families (form fields, checkboxes, typeaheads, selects, inputs). A colour picked there also reaches the read-only inputs of the classic form.

Each section shows the slots it really has: background, text and border, which come from the role, and the background states hover, selected, pressed and focus. A slot called "active item" would put a background, a text colour and a border under one swatch, which is three decisions pretending to be one; a background state is one decision, so it gets its own swatch.

Every slot says where its colour comes from: Custom, Same as background (a state you left alone follows the section's background), From … (a section split out of a wider one follows what you set there), or Derived from an anchor. Themes made before a section was split keep their colours.

Charts are a section of their own, and the one to think twice about: colour there carries meaning.

Import and export

Export on a theme's card saves it as a .holysn-theme.json file; Import theme… adds one back, on any account. The file holds the theme's name, mode, colours, CSS and target interface, nothing that identifies your account. If you already have a theme with that name you are asked for another. An imported file is checked like any saved theme, and its CSS goes through the same checker before it reaches a page.

The factory presets are not rows

The only thing you can do to a preset is duplicate it. They are the same for everyone, and a copy per account would start ageing the first time one of them was corrected.

What the editor shows you

The preview compiles your draft with the same engine the worker uses, all 5,731 tokens, a moment after each change. Every colour in it is a real design token, so a pixel in the sketch is the value that token takes on a ServiceNow tab; only the layout is a sketch. It has three scenes: a form (read-only, focused, hovered, mandatory and invalid fields, tabs, a work note), a list (zebra rows, a hovered and a selected row, priority pills, pagination) and the All menu with messages, buttons and badges.

Switch on Live to see the draft on the ServiceNow tabs you have open, CSS included. It shows in the draft's own mode whatever the Dark mode switch says, follows your edits, and the tabs go back to their theme when you switch it off.

In each section, a slot you have not customised shows its anchor's colour. Contrast is measured live against the target for that anchor and flagged when it falls below.

Free CSS goes through a checker, and a refusal is reported on the line of your own text rather than on a line number in a re-serialised copy you have never seen.

The two layers

The generic dark stylesheet is the anti-flash layer, not the theme. A custom theme's CSS cannot be applied before first paint, because pre-paint registration wants a file on disk. So for a dark theme the generic dark sits underneath and the theme paints over it; for a light theme nothing is registered at all, because ServiceNow is already light and registering dark would flash the wrong way.

The compiled theme is cached in a single write. An extension worker can be killed mid-compilation, and two writes would leave behind a cache that claims to be current and never gets noticed again.

The live preview from the editor expires after thirty seconds: past that, the tab has moved on.

The settings page has its own theme

It follows what you chose there, then the mode the ServiceNow pages are in (dark with Dark mode on, light when a light theme is active), then your system preference. It follows the mode and nothing else, because a theme's tokens are written against ServiceNow's own markup and would paint nothing on this page.

Themes | HolySN