Besides its brand tokens, described on Color and tokens, the mobile app names seven platform colour roles and computes one colour, the avatar disc. This page lists them with the number of times each appears in the Contract files.
Platform roles in use
A role is a name the platform resolves for light, dark and Increased Contrast. Seven appear in the contracts.
Role | Uses | Meaning here |
|---|---|---|
| 115 | Everything secondary: dates, short ids, hints, summaries, loading lines, some trailing values |
| 24 | Primary text where a parent would otherwise tint it (titles inside links, document text) |
| 25 | Error text, and the "Log out" labels |
| 10 | Every painted card and bubble; the ring around a FacePile avatar |
| 9 | Hairlines between rows, the quote edge, composer outlines |
| 4 | The chevron and the "·" in DocItemRow, the empty query line, the Activity chevron |
| 1 | The bar behind the agents composer |
Left unsaid, and therefore the platform's: the page and grouped backgrounds, list cards, bars, the tab bar, the keyboard, placeholder text, switches, the destructive red of destructive=true. DESIGN.md also lists -exact-fill; it is not used.
The avatar hue rule
An image-less avatar is the one computed colour: hsl(hue, 54%, 32%) with a white initial. The hue comes from the name, 127 + (weighted sum of the name's characters) mod 49, so it lies between 127 and 175: "the green family around desktop's identicon hue (151 ± 24)". The same name always gets the same disc, so an author is recognisable down a thread. Saturation and lightness are fixed, which keeps the initial's contrast constant and makes the disc identical in light and dark. Screenshots from before this change show grey discs.
User stories
This page helps deliver these stories. Each story lists this page in its Trace, so the link holds in both directions (traceability).
US-READ-09 See who wrote a document and visit their profile: The rule that computes an avatar's green hue from the name
US-ACT-01 See replies and mentions for my identity: The brand unread dot
US-ACT-02 Open what a notification is about: The unread dot
US-ACT-03 Mark everything read: The brand dot and system red for a failed action
US-AGENT-03 Set up a model provider: Red for the warning and errors
US-AGENT-07 Steer a run: Red for destructive and failed
US-ID-06 Remove an identity from this device: System red for the destructive row
US-VAULT-02 Keep my identities in sync across devices: System red for the sync error
US-VAULT-03 Lock my vault, switch to local, or log out: System red for Log out
US-APP-03 Use the app in light or dark: The seven platform colour roles in use and the avatar hue rule
US-APP-06 See people and spaces by name: The rule that computes an avatar's green from the name
Related
Color and tokens, Light and dark, Avatar, Cards and panels, Typography, Names, not identifiers. Implementation: Shared components and visual design. Source: ui.contract L4-L21.
Do you like what you are reading? Subscribe to receive updates.
Unsubscribe anytime