Repository navigation
Theme and colours
Workbench runs the shared theme switcher (components/theme-switcher/), the same code as the other custom Layouts. Workbench's palettes are in components/ly/ly-theme.ts, the colour family that paints every ground from the palette in components/ly/ly-family.ts, and the brand palette's values for the first paint (with the type and the shape scale) in style/ly-skin.gen.scss, all from the palettes of skins/workbench/skin.json; the one file a merchant edits is components/ly/ly-theme.settings.ts.
Workbench is drawn in one colour family: every colour on the page comes from the palette's hue, plus white and the family's near-black. Switching the palette, or picking a custom colour, re-tints the bands, the plates, the lines, the words, the dark service strip and footer, the chips, the map pin and the buttons at once; the browser's own theme colour follows the service strip.
ly-family.ts builds the family from the palette's colour in OKLCH, keeping its hue and capping its chroma, at fixed lightnesses:
| Part | Light mode | Dark mode |
|---|---|---|
| Page | white | L .17 |
| Bands, soft tint | L .985 | L .195 |
| Cards | L .985, or white | L .225 |
| Plates (the empty photo plates, the quiet buttons; Workbench sets products on its own plate: white, a light neutral in dark mode) | L .966 | L .26 |
| Deeper tint (lines) | L .925 and .86 | L .31 |
| The dark service strip and footer | L .24 | L .15 |
Ink, muted words and field edges are then walked until they reach their contrast: ink 7:1 on the deeper tint, muted words 4.6:1, a field's edge 3:1; words on the dark bars use the hue at 7:1. The theme switcher writes only the action colour (--ly-act, --ly-act-deep, --ly-act-on, --ly-act-text) and Vuetify's primary on top, and ly-family.ts also repaints Vuetify's own dialogs, menus and fields from the same family.
Workbench paints every action with one colour, Hi-vis orange: #c4500f in the dark mode (the default) and #bb4900 in the light mode (white words 5.16:1), on every button, chosen state and link, the bolt mark, the Price drops pill, the Kit tag, the saving tag and the footer's top rule; on the dark service strip and footer the family's light shade (--ly-act-dk, #ff8854) colours the icons and the footer's headings. The Hi-vis orange family is built from the seed #c4500f.
Around it, in the dark mode (the default), the family's night: the page and header #140e0b, bands and fields #1b1310, cards #231915, plates #311f18, words #faede8, muted words #cabab4, lines #372b26, the service strip and footer #150703, the action colour #c4500f with white words and links #ff9465. In the light mode: a white page #ffffff with soft tint bands and cards #fff9f6, plates #fff0ea, a deeper tint #ffded1, near-black ink #2a1f1a, muted words #685a55, lines #efdbd3; a dark service strip and footer in the family's darkest shade #2d1a11 with words #fff4f0; the department rail's round plates keep a 1 px inset edge there, so they do not vanish into the white page. These are the Hi-vis orange values: with another palette or a custom colour every one of them takes that colour's hue. Every colour is a token (--ly-…): style/ly-skin.gen.scss holds the brand palette's values (:root is light, html.ly-dark is dark) and ly-family.ts rewrites them for the palette on the page.
The mode from the settings file (dark by default) is painted before the first paint on every shop, so the other mode never flashes.

The Theme row sits in the footer, in a band of its own above the legal row, on the family's dark in both modes. It is never in the header. It holds:
- Colour: Hi-vis orange, Steel blue, Moss, Brick (Hi-vis orange is the default), and Custom colour (any colour from the browser's colour picker; the whole family is built from it and its action colour is made readable in light and dark against Workbench's own surfaces, with a note "Adjusted for readability" when it had to change).
- Mode: Light or Dark.
One click changes the whole site at once, with no reload: Workbench's colour family, the Kalio base, Vuetify's theme and Selldone's own parts (the buy button, prices, the cart drawer, the checkout sheets, dialogs). The choice is kept in the browser (key workbench-theme; dark mode is the class ly-dark on <html>) and painted before the first paint, so the default never flashes. The arrow keys (and Home / End) move between the swatches.
| Light | Dark (the default) |
|---|---|
![]() |
![]() |
![]() |
![]() |
The visitor switcher is a showcase feature. With themeSwitcher: "showcase" it shows only on the Layout's own showcase shops (listed in showcaseShops in components/ly/ly-theme.ts; Workbench's is Toolino, 16151). On any other shop it is not shown, nothing is read from or written to the browser's storage, and Workbench shows the theme from the settings file:
export const THEME_SETTINGS: ThemeSettings = {
palette: "hivis", // one of `hivis`, `steel`, `moss`, `brick`
// brandColor: "#F5C400", // any colour; replaces palette (the whole page takes its family)
mode: "dark", // "dark" | "light"
themeSwitcher: "showcase", // "showcase" | "on" (your visitors get it) | "off"
textOnBrand: "auto", // with brandColor: "auto" (a light brand keeps dark words) | "white"
};| Setting | Allowed values |
|---|---|
palette |
hivis, steel, moss, brick (hivis is the brand and the default) |
brandColor |
any "#RRGGBB"; when set it replaces palette, and the whole page (bands, plates, lines, words, the dark bars) takes this colour's family |
mode |
"dark" (the family's night; the default) or "light" (white and the soft tint) |
themeSwitcher |
"showcase" (the visitor switcher shows only on the Layout's own showcase shops; the default), "on" (your visitors get the Theme row in the footer), "off"
|
textOnBrand |
only with brandColor: "auto" (a light brand such as yellow keeps its colour, with dark words on it) or "white" (white words; a light colour is darkened) |
Every colour is made readable automatically: buttons, links, chosen states and dark mode.
Change only these lines; leave the rest of the file as it is.
| You want | Set |
|---|---|
| "Use the steel blue theme" | palette: "steel" |
| "Use the yellow theme" | No palette is yellow, so use a brand colour: brandColor: "#F5C400", textOnBrand: "auto"
|
| "My brand colour is #F5C400" |
brandColor: "#F5C400", textOnBrand: "auto"; use textOnBrand: "white" for white words (the colour is then darkened) |
| "Make it light" | mode: "light" |
| "Let visitors switch themes" | themeSwitcher: "on" |
| "Remove the switcher" |
themeSwitcher: "off" (on your own shop it is already hidden with "showcase") |
| "Go back to the original colours" | remove brandColor, set palette: "hivis", mode: "dark"
|
Then build and upload a new version and put it live:
LAYOUT_ID=<your Layout id> PW=<path>/node_modules/playwright/index.js SELLDONE_CLI_SRC=<cli clone> \
bash scripts/release.sh <new version> deskSee Build and Upload and Go Live.
| Palette | Seed of the family | Light: action colour, white words on it | Light: link colour on the tint band / the plate | Dark: action colour, white words on it | Dark: link colour on the card |
|---|---|---|---|---|---|
| Hi-vis orange | #c4500f |
#bb4900 5.16:1 |
4.95:1 / 4.65:1 |
#c4500f 4.67:1 |
#ff9465 on #231915 7.92:1 |
| Steel blue | #3a6a92 |
#3a6a92 5.74:1 |
5.51:1 / 5.21:1 |
#3a6a92 5.74:1 |
#84b6e2 on #151d24 7.92:1 |
| Moss | #5d6b26 |
#5d6b26 5.84:1 |
5.59:1 / 5.32:1 |
#5d6b26 5.84:1 |
#a8b872 on #1b1d14 7.92:1 |
| Brick | #a33a2c |
#a33a2c 6.56:1 |
6.26:1 / 5.92:1 |
#b54a3b 5.24:1 |
#ff927f on #241917 7.88:1 |
Each figure is worked out from the colours scripts/skin-apply.mjs gives each palette (the same maths as ly-family-core.ts). A custom or brand colour goes through paletteFromColor(), which moves only its lightness until each role reads against the Layout's surfaces; its family is built from the same colour. The contrast audit must pass with TOTAL 0 for every palette and for the custom colours #ffff00, #00ffff and #111111, in light and dark.
Run these from the repository root after a theme change. They need Playwright; set PW to your install (PW=<path>/node_modules/playwright), because the default path in the scripts is not yours. ".ly .ftr" is Workbench's footer, which every page shows once it is ready. Run one at a time: Selldone limits how many requests one address may send in a minute.
-
Contrast on the live shop, at desktop and phone width. It must print
TOTAL 0:To test one palette and mode, addPAGES="home=/,category=/<a category>,product=/product/<id>" \ node components/theme-switcher/tools/contrast-audit.cjs https://<your shop> ".ly .ftr"
STORAGE='{"workbench-theme":"{\"palette\":\"hivis\",\"mode\":\"dark\"}"}'(this works where the switcher is shown). -
Cart drawer, cart page and address sheet. It must print
TOTAL 0. It fills a cart in the browser only and blocks every order request. The palette argument is a palette id, orcustom:#rrggbbfor a custom colour:SHOP=<your shop's xapi name> STORAGE_KEY=workbench-theme WAIT=".ly .ftr" CART=".bag-btn" \ node components/theme-switcher/tools/cart-audit.cjs https://<your shop> hivis light
-
Underlines, boxes and shapes. No line under any word or icon (a post's own links aside), at rest or on hover; photos never on words, icon rows aligned; every edge a circle, 6 px or 4 px, focus keeping its shape, nothing past the window. Each must print
TOTAL 0:All three default to the showcase shop's pages, so always passPAGES="home=/,category=/<a category>,product=/product/<id>" node scripts/underline-check.cjs https://<your shop> ".ly .ftr" SHOP=<your shop's xapi name> PAGES="home=/,category=/<a category>,product=/product/<id>" \ node scripts/box-check.cjs https://<your shop> ".ly .ftr" PAGES="home=/,category=/<a category>,product=/product/<id>" node scripts/shape-check.cjs https://<your shop> ".ly .ftr"
PAGES(andSHOPfor the box check, which also opens the menus and the cart drawer). -
Colour maths:
node components/theme-switcher/theme-color.test.mjs(Node 22.6 or newer).
On Workbench's showcase shop the same checks run with https://workbench.selldone.shop (or the dev server, http://localhost:9180), SHOP=toolino-Nz2AovCw, PAGES="home=/,category=<a department>,product=/product/<id>" (the skin's checks), for each palette in light and dark. scripts/run-checks.sh <base> <log folder> is the full set that produced 1.0.0's test table, one browser at a time; a few of its checks (the ring, corner and circle checks and one card-edge check) come from a shared check kit that is not part of this repository, so on your own copy run the checks above.



