Skip to content

Tones mywant-gui ​

A tone is what an action means. The design turns it into a colour; the overlay never names one. That is what keeps "Cancel" the same colour in every overlay, whichever design is in use.

ToneMeansFor exampleIn grid
confirmGo aheadYes, OK, Create, Save, Start, Approve, Deployemerald
cancelLeave without doing anythingNo, Cancel, Close, Backgray
dangerCannot be taken back, or refusesDelete, Deny, Stop; Yes to a destructive questionrose
primaryThe ordinary actionOpen, Edit, Detail, Restartblue
cautionReversible, but stops somethingSuspend, Archive, Drop, Lockamber
infoGo somewhere, call someone; a pre-selected choiceGo to, Call, Open in tabsky
accentA setting set apart from ordinary actionsPassword, Set homeindigo
specialAbout a person or a presentationRide, Add Aura, Inspect, Exposeviolet
mutedOne of several equal choicesA group to join, Mapslate

Choosing one ​

Ask what pressing it does, not what colour it should be:

  • A yes to a question whose answer deletes something is danger, not confirm.
  • Two sides of a toggle are one tone with off on the inactive side (tone: 'special', off: !isExposed), not two tones.
  • A colour that is data — a character's own colour, the wire's — is not a tone. Pass it as color.

In TypeScript ​

tone is typed OverlayTone. An item built inside a conditional spread (...(cond ? [{ ... }] : [])) is not contextually typed, so its literal widens to string; write tone: 'danger' as const there.