Avatar

A letter-in-circle marker that identifies a person in the app. Single uppercase initial, Bricolage Grotesque 600, on a colored circle. Each person in a group gets a consistent color from the avatar palette — the "You" variant always uses ink background so the current user is instantly recognisable.

Variants

A P R K G

You (ink) — always assigned to the current user. Dark background makes the logged-in person visually distinct at a glance. Text is --s-paper.

Coral — one of four peer colors from the avatar palette. Assigned deterministically by user ID, not randomly, so a person always has the same color within a session.

Teal — the settled/positive accent. Only used as an avatar color, never to indicate settlement status (use Badge for that).

Butter — warm amber. The fourth peer color.

Mute — for guests, unnamed payees, or when a 5th distinct person joins. Falls back gracefully.

Sizes

R R R R R
SizeClassDiameterFont sizeUse case
Extra large.avatar-xl48px20pxProfile header, settle confirmation
Large.avatar-lg40px16pxGroup member list, contact picker
Medium.avatar-md32px13pxExpense card, ledger row — default
Small.avatar-sm24px10pxInline mentions, dense lists
Extra small.avatar-xs20px9pxAvatar group overflow circles

States

P P A
StateVisual changeWhen
DefaultResting appearance
Inactive / dimmed40% opacityPerson has no activity in this expense
Selected2px teal outline, 2px offsetUsed in person picker when avatar is tappable

On dark surfaces

A P R K G

Avatar colors are all dark-surface compatible — coral, teal, butter, and mute all have sufficient contrast against --dark-canvas. The "You" avatar reads even more clearly on dark, since the ink background now has visible separation from the surface. No overrides needed.

Anatomy

P
Container (50% radius)
Initial (uppercase)
PartElementNotes
Container<span> or <div>Always border-radius: 50%. Width and height equal (square before rounding).
InitialText nodeSingle uppercase letter. First character of display name. Never truncate to initials — one letter only.
ColorBackgroundAssigned from the 5-color palette by hashing the user ID. Same person = same color everywhere in the app.

Usage

Do Assign colors deterministically (hash of user ID mod 5). The current user always gets .avatar-you. Use aria-label with the full name, not the initial.
Don't Don't randomise colors on each render — a person's color must be stable across the session and across devices. Don't use avatar colors to convey status (use Badge for that).
Do Use the -md size (32px) as the default in expense cards and ledger rows. Upsize to -lg or -xl when the avatar is the primary focus (profile screen, settle confirmation).
Don't Don't mix sizes within the same row or group — pick one size and stick to it. Don't show avatars smaller than 20px (-xs) in isolation; that size is for avatar-group only.

Accessibility

Screen readers Always add aria-label="Priya" (full name) to the avatar element. The initial alone is not useful to a screen reader. If the avatar is purely decorative inside a larger interactive element that already announces the name, use aria-hidden="true" instead.
Contrast All five avatar colors — ink, coral, teal, butter, and mute — meet WCAG AA (4.5:1) for white text at all avatar sizes. The "You" ink variant against paper text: 12.5:1.
Color independence Never rely on avatar color alone to convey identity — always pair with the person's name. Color is a redundant cue, not the primary one.

Code

HTML

<!-- Default (peer, coral) -->
<span class="avatar avatar-md avatar-coral" aria-label="Priya">P</span>

<!-- Current user -->
<span class="avatar avatar-md avatar-you" aria-label="Aarav (you)">A</span>

<!-- Large, teal -->
<span class="avatar avatar-lg avatar-teal" aria-label="Rohan">R</span>

<!-- Dimmed / inactive -->
<span class="avatar avatar-md avatar-butter" aria-label="Kabir" style="opacity:.4">K</span>

CSS classes

ClassPurpose
.avatarBase — flex, circle, font, user-select: none
.avatar-xl / -lg / -md / -sm / -xsSize modifiers (48 / 40 / 32 / 24 / 20px)
.avatar-youInk background — current user only
.avatar-coralCoral background — peer color 1
.avatar-tealTeal background — peer color 2
.avatar-butterButter/amber background — peer color 3
.avatar-muteMuted gray-brown — peer color 4 / fallback

Design tokens used

TokenValueRole
--av-you#171513"You" background
--av-coral#E76F51Peer color 1
--av-teal#0E7C66Peer color 2
--av-butter#D4940APeer color 3
--av-mute#8A8276Peer color 4 / fallback
--s-paper#FBF8F0"You" text color
--font-displayBricolage GrotesqueInitial letter