Avatar generator

StyleInitials
Contrast8.3:1
In the set6
Set checkAll pass

Avatar Generator

Placeholder avatars derived from a name or an ID, so every user has something recognisable before they upload a photograph. Two things make these usable in production: the same seed always produces the same avatar with no service to call, and the contrast of every avatar in a set is checked — which is how the one unreadable pale-yellow tile gets caught here rather than by a user.

Styles
4
Contrast floor checked
3:1
Seeds per batch
200
API calls
0

Step by step

How to use it

  1. 01Give it a seed

    A name, a username, an email, a user ID — anything stable. The same seed produces the same avatar every time, on any machine, with no lookup and nothing stored.

  2. 02Constrain the palette

    Only the hue is seeded. Holding saturation and lightness, and narrowing the hue range, is what keeps a generated set on-brand and stops one avatar coming out unreadable.

  3. 03Paste the whole list

    Every avatar in the batch is rendered with its contrast ratio underneath, and anything below 3:1 is ringed in red. This is the check that a hosted generator cannot do, because it never sees the set.

  4. 04Take SVG, PNG, or the zip

    SVG for the web, PNG at five sizes, or the whole set zipped with both. Or copy the data URI and skip the file entirely.

Worked example

Why one avatar in a set is always unreadable

Seeded hue with fixed lightness gives even coverage of the colour wheel — and human perception of lightness is not even at all.

Given

Palette
seeded hue, 45% lightness
Foreground
white
Set
a few dozen names

Relative luminance at the same HSL lightness

hue 240  blue      dark to the eye    white reads well
hue   0  red       mid                white reads well
hue 120  green     bright             white struggles
hue  60  yellow    brightest          white fails

Same lightness value, four very different luminances.
Safe with white
blues, purples, reds
Marginal
greens, cyans
Fails with white
yellows

HSL lightness is a coordinate, not a measure of how bright a colour looks — a yellow at 45% lightness is far brighter to the eye than a blue at the same value. So a set generated across the full hue wheel at one lightness will contain avatars that fail contrast, and always the same hues. Automatic foreground selection fixes most of it by flipping to black where white fails; narrowing the hue range away from yellows and greens fixes the rest.

Before you ship the set

What to know about generated avatars

Determinism is the whole feature

An avatar derived from a seed needs no storage, no upload, and no cache invalidation — the same user gets the same face on every device and every render. A generator that reseeds randomly is useless for this, because the avatar changes on reload.

A hosted avatar API is a dependency you did not need

Pointing an img tag at a third-party avatar service adds a request per user per page, a privacy leak of your user identifiers, and an outage you cannot fix. The identical result can be computed locally, which is what these are.

Contrast fails on specific hues, predictably

Yellows and greens at a given HSL lightness are perceptually far brighter than blues and reds at the same value, so a full-wheel palette with white text will always produce unreadable avatars around those hues. Automatic foreground selection is the fix; a narrower hue range is the better one.

Initials come from the first and last word

'Ada Lovelace' should give AL, not AD. Taking two letters from a single word produces an acronym that does not exist, so a one-word seed gets one letter here — which also keeps it legible at 24 pixels.

Identicons are mirrored on purpose

A symmetrical grid reads as a deliberate mark while an asymmetric one reads as noise. Only the left three columns are seeded and the outer two are mirrored, which still gives thousands of distinct patterns before colour is applied.

SVG is the right format for an avatar

An avatar is drawn at 24 pixels in a comment thread and 200 in a profile header, and one SVG covers both at a few hundred bytes. Reach for PNG only where the destination will not take vector, such as an email template.

The judgement call

Which style, and when?

The four are not interchangeable — they carry different amounts of identity.

  • A team or contact list

    Initials

    Letters are the strongest cue when the reader already knows the names in the list.

  • Anonymous or pseudonymous users

    Identicon

    A distinct pattern per seed without implying a real name behind it.

  • A seed that is an ID, not a name

    Identicon or rings

    Initials taken from a UUID are meaningless. A pattern carries the same distinctness without the pretence.

  • Decorative tiles with no identity role

    Gradient

    Pleasant and distinct, but a reader cannot tell two apart at a glance — do not use it to identify people.

  • A seed users can change freely

    Any, with care

    The avatar changes when the seed does. Seed from a stable ID rather than a display name if that would surprise people.

  • Where a real photo exists

    Use the photo

    These are placeholders. Fall back to a generated avatar only when there is nothing to show.

Reference

How the avatar is derived

Hashing
FNV-1a into Mulberry32A seeded generator rather than Math.random, which is what makes the same seed reproduce the same avatar anywhere.
What is seeded
Hue onlySaturation and lightness are held at the values you set, so the set stays consistent and readable.
Contrast floor
3:1WCAG's minimum for large text, which is what an initial at avatar size is. Anything below is ringed in red.
Initials
First and last wordTwo words give two letters; one word gives one, because two letters from one word reads as a false acronym.
Identicon grid
5 × 5, mirroredThree seeded columns mirrored to five, giving several thousand patterns before colour is applied.
Export
SVG · PNG at 5 sizes · zip32 to 512 pixels. The batch zip carries both formats, named from each seed.

FAQ

Questions, answered plainly

How do I generate an avatar from a name or user ID?

Enter the name or ID as the seed and the Tinapps avatar generator hashes it into a colour and a pattern, so the same seed always produces the same avatar. There is no request and nothing stored — the avatar is computed from the seed each time, which means it is identical on every device and after every deployment.

Are these generated avatars deterministic?

Yes. The Tinapps avatar generator uses an FNV-1a hash feeding a Mulberry32 seeded generator, so a given seed produces the same avatar on any machine, forever. That is what makes generated avatars usable in production: no storage, no cache to invalidate, and no chance of a user's face changing on reload.

Why are some generated avatars hard to read?

Because HSL lightness is a coordinate rather than a measure of perceived brightness — a yellow at 45% lightness looks far brighter than a blue at the same value, so white initials fail on it. Leaving automatic foreground selection on flips those to black, and narrowing the hue range away from yellows and greens avoids the problem entirely.

Is this a self-hosted alternative to DiceBear or Gravatar?

The Tinapps avatar generator serves the same purpose without the dependency. A hosted avatar API costs a request per user per page, leaks your user identifiers to a third party, and fails when that service does — whereas these avatars are computed in your browser and handed to you as SVG or PNG files you can serve yourself.

Can I generate avatars for a whole list of users at once?

Yes. Paste up to 200 names or IDs into the batch field and every avatar is rendered with its contrast ratio shown, so an unreadable one is visible before you export. The zip contains both an SVG and a 256-pixel PNG for each seed, named from the seed itself.

What image format should I use for avatars?

SVG, wherever the destination accepts it. An avatar is drawn at 24 pixels in a comment thread and 200 in a profile header, and a single SVG of a few hundred bytes covers both without blurring. Use PNG only where vector is not accepted, such as most email templates.

Avatars are computed from the seed in your browser. Names, user IDs, and email addresses pasted here are never uploaded — which is the point, given that a hosted avatar service sees every one of them.

All design toolsTinapps homeFree · no account · nothing leaves your browser