Noggin Preview
Seeded people avatars in seven skin tones, with twelve hairstyles (including afros and locs), glasses, beards, hats and headscarves, in six outfits. Try them in the playground.
Until Noggin is marked stable, the Noggin a seed draws can change in a minor version, so pin the minor (~2.2.0) if you store seeds and need the same person back.
Use
import { noggin, nogginDataUri } from 'seedkin/noggin';
const svg = noggin(user.id);
const src = nogginDataUri(user.id, { size: 40, skin: 4 });
The seed is salted, so one id's Botling and Noggin are unrelated.
Options
noggin() takes the same options as snoot(), plus skin. palette picks one of the six outfits in PALETTES, or takes a whole palette object; title defaults to 'Person avatar'. Below 40px it draws a simpler 9x9 Noggin from the same traits.
Skin tones
skin is an index into SKIN_TONES, lightest first, so people can pick their own. A seed's hair colour and outfit always stand out from its skin; pick another skin tone and they move to the next colours that do.
Exports
traits, resolveTraits, grid, smallGrid, paletteFor, SKIN_TONES, HAIR_COLOURS, HAIRS, EYES, MOUTHS, FACIAL, EYEWEAR, HEADWEAR and SHAPES are exported as for Botling (see Advanced).