The Rosepetal app uses light and dark themes built from the same tokens.
Where each theme applies
| Surface | Light | Dark |
|---|---|---|
| Rosepetal app | Default | The user’s choice, or the system setting until they choose. .dark on <html>. |
| Websites | Always | No dark theme and no switch. AIS uses deep-blue #10254C sections and a brand-blue closing band; Rosepetal’s dark themes are previews only (?theme=). See Web components. |
| Always | Covers and bands in brand blue or navy, with the white logo. | |
| Presentations | White slides | Brand-blue openings and closings. No dark deck. |
| Social media | White posts | Brand-blue posts and banners. See Social media. |
| Always | None. | |
| Charts | White ground | Night #0B1220 ground, in the app’s dark mode. See Charts. |
| This guide | Always | None: the guide is light, and shows the dark theme in its previews. |
Tokens
Every value below is read from packages/design/styles.css when the guide is built. Under each token, the package’s own note on its use.
What changes
| Token | Light | Dark |
|---|---|---|
--backgroundPage background | #FFFFFFneutral 0 | #0B1220blue 950 |
--pagePage behind cards and login footer | #F1F5F9neutral 100 | #0B1220blue 950 |
--cardCards, popovers and menus | #FFFFFFneutral 0 | #111A2Eblue 900 |
--stripeSoft action surface | #EDF2FAblue 50 | #0F1729neutral 900 |
--insetRecessed blocks within a card | #F8FAFCneutral 50 | #1E293Bneutral 800 |
--mutedDialog header and sidebar background | #F8FAFCneutral 50 | #0F1729neutral 900 |
--foregroundHeadings and body text | #0F1729neutral 900 | #F1F5F9neutral 100 |
--muted-foregroundSecondary text | #4B5563neutral 600 | #94A3B8neutral 400 |
--borderDividers and borders | #E2E8F0neutral 200 | #1E293Bneutral 800 |
--inputField border and off switch; at least 3:1 against the page | #CBD5E1neutral 300 | #334155neutral 700 |
--code-blockCode block background | #1E293Bneutral 800 | #0F1729neutral 900 |
--code-block-foregroundCode block text | #E2E8F0neutral 200 | #CBD5E1neutral 300 |
--primaryPrimary button background | #17356Eblue 700 | #7C9FD7blue 300 |
--primary-hoverPrimary button on hover | #10254Cblue 800 | #A7BFE4blue 200 |
--primary-foregroundText on the primary button | #FFFFFFneutral 0 | #0F1729neutral 900 |
--secondarySecondary button and hovered menu items | #F1F5F9neutral 100 | #1E293Bneutral 800 |
--secondary-hoverSecondary button on hover | #E2E8F0neutral 200 | #334155neutral 700 |
--secondary-foregroundText on the secondary button | #334155neutral 700 | #CBD5E1neutral 300 |
--action-soft-borderSoft action border | #A7BFE4blue 200 | #1E4591blue 600 |
--action-soft-foregroundSoft action text | #1E4591blue 600 | #A7BFE4blue 200 |
--infoLinks, text actions and focus rings | #3664B3blue 500 | #7C9FD7blue 300 |
--destructiveError text, icons and destructive button background | #DC2626red 600 | #F87171red 400 |
--successSuccess text and icons | #15803Dgreen 700 | #4ADE80green 400 |
--warningWarning icons | #D97706amber 600 | #F59E0Bamber 500 |
--split-trainTraining split | #3664B3blue 500 | #517FC9blue 400 |
--split-predeterminedImages not yet assigned to a split | #94A3B8neutral 400 | #64748Bneutral 500 |
--chart-1First chart series | #3664B3blue 500 | #517FC9blue 400 |
--chart-3Third chart series | #8B5CF6violet 500 | #A855F7purple 500 |
--matrix-fullFull confusion-matrix cell background | #1E4591blue 600 | #3664B3blue 500 |
--matrix-highHigh-value confusion-matrix cell background | #B8CDE6blue 100 | #1E4591blue 600 |
--matrix-high-foregroundText in a high-value confusion-matrix cell | #1E4591blue 600 | #B8CDE6blue 100 |
--matrix-cellBase confusion-matrix cell background | #E2E8F0neutral 200 | #1E293Bneutral 800 |
--canvas-gridCanvas grid background | #F5F5F5grey 100 | #0F1729neutral 900 |
--canvas-grid-lineCanvas grid lines | #D8D8D8grey 300 | #1E293Bneutral 800 |
--card-foregroundFollows --foreground | #0F1729neutral 900 | #F1F5F9neutral 100 |
--popoverFollows --card | #FFFFFFneutral 0 | #111A2Eblue 900 |
--popover-foregroundFollows --foreground | #0F1729neutral 900 | #F1F5F9neutral 100 |
--accentFollows --secondary | #F1F5F9neutral 100 | #1E293Bneutral 800 |
--accent-foregroundFollows --foreground | #0F1729neutral 900 | #F1F5F9neutral 100 |
--ringFollows --info | #3664B3blue 500 | #7C9FD7blue 300 |
--headingFollows --foreground | #0F1729neutral 900 | #F1F5F9neutral 100 |
--sidebarFollows --muted | #F8FAFCneutral 50 | #0F1729neutral 900 |
--sidebar-foregroundFollows --foreground | #0F1729neutral 900 | #F1F5F9neutral 100 |
--sidebar-primaryFollows --primary | #17356Eblue 700 | #7C9FD7blue 300 |
--sidebar-primary-foregroundFollows --primary-foreground | #FFFFFFneutral 0 | #0F1729neutral 900 |
--sidebar-accentFollows --secondary | #F1F5F9neutral 100 | #1E293Bneutral 800 |
--sidebar-accent-foregroundFollows --foreground | #0F1729neutral 900 | #F1F5F9neutral 100 |
--sidebar-borderFollows --border | #E2E8F0neutral 200 | #1E293Bneutral 800 |
--sidebar-ringFollows --info | #3664B3blue 500 | #7C9FD7blue 300 |
--action-softFollows --stripe | #EDF2FAblue 50 | #0F1729neutral 900 |
--topbarTop bar background | #17356Eblue 700 | #111A2Eblue 900 |
--topbar-foregroundTop bar text | #FFFFFFneutral 0 | #F1F5F9neutral 100 |
--topbar-mutedSecondary top bar text | #A7BFE4blue 200 | #94A3B8neutral 400 |
--topbar-borderTop bar dividers | #1E4591blue 600 | #1E293Bneutral 800 |
--topbar-hoverTop bar item on hover | color-mix(in oklab, #FFFFFF 10%, transparent) | color-mix(in oklab, #F1F5F9 8%, transparent) |
--destructive-foregroundText on the destructive button | #FFFFFFneutral 0 | #0F1729neutral 900 |
What stays the same
| Token | Both themes |
|---|---|
--brandRosepetal brand: top bar and login hero | #17356Eblue 700 |
--brand-mutedHighlights and inactive items on brand blue | #A7BFE4blue 200 |
--fixed-lightFixed white: text on brand fills, artwork and switch thumb | #FFFFFFneutral 0 |
--fixed-darkFixed dark: scrims, image backdrops and text on amber | #0F1729neutral 900 |
--split-validationValidation split | #0891B2cyan 600 |
--split-testTest split | #EA580Corange 600 |
--chart-2Second chart series | #EA580Corange 600 |
--tag-unclassifiedUnclassified and «No group» tags | #64748Bneutral 500 |
--tag-normalNormal (OK) tag | #2BBC33green 500 |
--tag-anomalyAnomaly (NOK) tag | #BC2B5Frose 700 |
--tag-defaultDefault tag colour, including OCR text | #2563EBazure 600 |
--matrix-full-foregroundText in a full confusion-matrix cell | #FFFFFFneutral 0 |
--editor-surfaceEditor image backdrop | #A0AEC0slate 400 |
--editor-watermarkEditor watermark lines | #FFFFFFneutral 0 |
--brand-foregroundFollows --fixed-light | #FFFFFFneutral 0 |
--success-foregroundFollows --fixed-light | #FFFFFFneutral 0 |
--success-solidFollows --green-700 | #15803Dgreen 700 |
--warning-solidFollows --amber-600 | #D97706amber 600 |
--warning-solid-hoverFollows --amber-500 | #F59E0Bamber 500 |
--warning-solid-foregroundFollows --fixed-dark | #0F1729neutral 900 |
--danger-solidFollows --red-600 | #DC2626red 600 |
--danger-solid-hover | color-mix(in oklab, #DC2626 88%, #0F1729) |
--danger-solid-foregroundFollows --fixed-light | #FFFFFFneutral 0 |
--overlayFollows --fixed-dark | #0F1729neutral 900 |
--overlay-foregroundFollows --fixed-light | #FFFFFFneutral 0 |
--artwork-plateFollows --fixed-light | #FFFFFFneutral 0 |
--control-thumbFollows --fixed-light | #FFFFFFneutral 0 |
The palette scales (blue 50–950, neutral 0–900 and the status and data hues) have one value each; dark mode only points the tokens at other steps. See Colour.
Contrast
WCAG 2.2 AA: 4.5:1 for text, 3:1 for icons and field borders. Computed from the tokens above.
| Pair | Light | Dark |
|---|---|---|
Text on the page--foreground on --background | Aa17.87:1 | Aa17.09:1 |
Text on cards--foreground on --card | Aa17.87:1 | Aa15.83:1 |
Secondary text--muted-foreground on --background | Aa7.56:1 | Aa7.30:1 |
Secondary text on cards--muted-foreground on --card | Aa7.56:1 | Aa6.76:1 |
Links and text actions--info on --background | Aa5.78:1 | Aa6.95:1 |
Links on cards--info on --card | Aa5.78:1 | Aa6.44:1 |
Primary button--primary-foreground on --primary | Aa11.86:1 | Aa6.64:1 |
Secondary button--secondary-foreground on --secondary | Aa9.45:1 | Aa9.85:1 |
Destructive button--destructive-foreground on --destructive | Aa4.83:1 | Aa6.46:1 |
Error text--destructive on --card | Aa4.83:1 | Aa6.27:1 |
Success text--success on --card | Aa5.02:1 | Aa9.95:1 |
Warning icon--warning on --card | Aa3.19:1 | Aa8.07:1 |
Success pill--success-foreground on --success-solid | Aa5.02:1 | Aa5.02:1 |
Warning pill--warning-solid-foreground on --warning-solid | Aa5.61:1 | Aa5.61:1 |
Top bar--topbar-foreground on --topbar | Aa11.86:1 | Aa15.83:1 |
Soft action--action-soft-foreground on --action-soft | Aa8.07:1 | Aa9.55:1 |
Confusion matrix, full cell--matrix-full-foreground on --matrix-full | Aa9.07:1 | Aa5.78:1 |
Field border--input on --background | Aa1.48:1 | Aa1.81:1 |
Components
The same components in both themes. Every component page has a light and dark switch above its previews.
Light
Dark
Logos and favicons
- Logos: blue on light grounds, white on brand blue, navy and the dark theme. The app’s top bar carries the white logo in both themes: brand blue in light, the dark card in dark.
- App icons and app favicons: the white mark on the brand-blue tile, the same in both themes.
- Website favicons: the bare mark, blue in light mode and white in dark mode.
Files and sizes are on Logos.
Charts
The chart toolkit has a light and a dark Vega-Lite config and a light and a dark ECharts theme. The dark ones set the night ground, light text and the dark data steps: the first series #517FC9 and violet #A855F7; orange, cyan, pink and teal stay the same. See Data visualisation.
Images and screenshots
- Photographs and renders are the same in both themes; never darken, tint or invert them.
- Product screens in marketing show the app in light mode, as the websites do. A dark screen goes only in a piece that is dark as a whole, and one piece never mixes the two.
- Detection overlays keep their kit colours and switch to the light steps only on dark pictures (see Imagery), whatever the theme of the page around them.