um

Avatar

A person's or organisation's picture, falling back to initials on a fill picked from the name (or a seed: such as an id) — the same colour on every page and every server.

Sizes and fallbacks

Five named sizes and a CSS length, with and without an image. A broken image shows the initials through it.

Tints

The default fill: six tints from the name, so each person keeps their colour. fill: false is neutral.

Fills

Avatar::Solid and Avatar::Gradient pick from the whole hue wheel, tuned by their arguments. Set one for the app as config.avatar_fill, or pass fill: for one avatar.

Solid
Gradient
Gradient, wider turn

People and organisations

kind: reads initials as a person or an organisation: particles, mononyms, legal suffixes, and a three-character mark where the avatar has room.

A group

avatar_group stacks them, collapsing past max: into a counter that names the rest.

+3