Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/icon-one-pair.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@botspace/tokens": minor
"@botspace/marketing": minor
---

Tokens: each accent gains `onField`, its dark-scheme On colour (e.g. On Blue), as `accents.<name>.onField`, `--color-on-<name>-field` and `color.accent.<name>.onField`. DuoIcon: every icon now uses one pair on every surface, the accent's `field` body with an `onField` detail (Mayur, 30 Nov 2026).
2 changes: 1 addition & 1 deletion packages/marketing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Under prefers-reduced-motion every part shows its final frame.

## Icons

`DuoIcon` draws BotSpace's own solid duotone icons for products and channels. On a light ground the light layer takes the accent's Material container role and the dark layer its on-container role. On a dark ground pass `mode="dark"`: the body takes tone 60 and the detail tone 95, so every part reads on dark menus. Each icon has a default accent (WhatsApp green, Instagram magenta, Sales green, Support purple, and so on); pass `accent` only to override it.
`DuoIcon` draws BotSpace's own solid duotone icons for products and channels. Every icon uses one colour pair on every surface, light or dark: the body takes the accent's dark-scheme colour (`field`, e.g. Blue) and the detail its dark-scheme On colour (`onField`, e.g. On Blue). Role colours only, never tonal steps. Each icon has a default accent (WhatsApp green, Instagram magenta, Sales green, Support purple, and so on); pass `accent` only to override it.

```tsx
import { DuoIcon } from "@botspace/marketing"
Expand Down
18 changes: 9 additions & 9 deletions packages/marketing/src/lib/duo-roles.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
// Icon layer colours for the BotSpace accents, read from the tonal palettes in @botspace/tokens.
// Light ground: the body takes the container role (tone 90) and the detail its on-container (tone 10).
// Dark ground: the body takes tone 60 and the detail tone 95, so the detail layer is the brightest and
// parts that sit straight on the ground (an arrow, a handle) never sink into it (Mayur, 30 Nov).
// Icon layer colours for the BotSpace accents, from the accent role tokens in @botspace/tokens.
// One pair on every surface, light or dark (Mayur, 30 Nov 2026): the body is the accent's dark-scheme colour
// (`field`, e.g. Blue) and the detail its dark-scheme On colour (`onField`, e.g. On Blue). Role colours only,
// never tonal steps. `mode` is kept for the ground the icon sits on, and for ink.
// Accents are grounds and icon colours only. A colour never stands for an agent or a role.

import { accentPalettes, palettes } from "@botspace/tokens"
import { accents, palettes } from "@botspace/tokens"

export type Roles = { container: string; onContainer: string }
export type Swatch = { id: string; label: string; base: string; light: Roles; dark: Roles }

type Tones = Record<number, string>
const roles = (p: Tones) => ({ light: { container: p[90], onContainer: p[10] }, dark: { container: p[60], onContainer: p[95] } })
const nv = palettes["neutral-variant"] as Tones
const accent = (id: keyof typeof accentPalettes, label: string): Swatch => {
const p = accentPalettes[id] as Tones
return { id, label, base: p[40], ...roles(p) }
const accent = (id: keyof typeof accents, label: string): Swatch => {
const a = accents[id]
const pair = { container: a.field, onContainer: a.onField }
return { id, label, base: a.base, light: pair, dark: pair }
}

/** Ink is the neutral pair (the source colours of the icon files); the rest are the brand accents. */
Expand Down
6 changes: 4 additions & 2 deletions packages/tokens/scripts/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ add("color-sky", sky, "Grid lines on ink and the hero highlight only.")
for (const [step, v] of Object.entries(slate)) add(`color-slate-${step}`, v)
for (const [name, a] of Object.entries(accents)) {
add(`color-${name}`, a.base, `Accent role colour. Marks and illustration, not body text.`)
add(`color-${name}-field`, a.field, `Plain tile ground (dark-scheme role colour).`)
add(`color-${name}-field`, a.field, `Plain tile ground and icon body (dark-scheme role colour).`)
add(`color-on-${name}-field`, a.onField, `Detail on field, e.g. an icon's inner part (dark-scheme On colour).`)
add(`color-${name}-container`, a.container, `Accent ground for sections, tiles, images.`)
}
for (const [name, s] of Object.entries(status)) {
Expand Down Expand Up @@ -138,7 +139,8 @@ const dtcg: Node = {
slate: group(slate, (x) => color(x)),
accent: group(accents, (a) => ({
base: color(a.base, "Marks and illustration. Not body text."),
field: color(a.field, "Plain tile ground."),
field: color(a.field, "Plain tile ground and icon body."),
onField: color(a.onField, "Detail on field (dark-scheme On colour)."),
container: color(a.container, "Ground for sections, tiles, images. Never mapped to a role."),
})),
status: group(status, (x) => ({ fill: color(x.fill, "Status only."), text: color(x.text) })),
Expand Down
6 changes: 4 additions & 2 deletions packages/tokens/src/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,15 @@ export const slate = {

const accent = (name: keyof typeof accentPalettes) => {
const p = accentPalettes[name]
return { base: p[40], field: p[80], container: p[90] }
return { base: p[40], field: p[80], onField: p[20], container: p[90] }
}

/**
* The six accents, each a tonal palette from a hue in src/seed.ts.
* `base` is tone 40 (the light-scheme role colour): grid tiles and marks.
* `field` is tone 80 (the dark-scheme role colour): plain tile grounds (Mayur, 5 Oct 2026).
* `field` is tone 80 (the dark-scheme role colour): plain tile grounds (Mayur, 5 Oct 2026), and the body of every icon.
* `onField` is tone 20 (the dark-scheme On colour, e.g. On Blue): the detail on `field`. Icons use field + onField on
* every surface, light or dark (Mayur, 30 Nov 2026).
* `container` is tone 90 (the Container colour): page sections and website tiles.
*/
export const accents = {
Expand Down
Loading