palletface

Quick start

Install

Use an ESM project. For Node, use 22.12+ or 24.

npm install palletface

Generate an SVG

Save as avatar.mjs and run node avatar.mjs to write avatar.svg.

import { writeFileSync } from 'node:fs'
import { palletface } from 'palletface'

const svg = palletface('user-123', {
  style: 'pixel-letter',
  name: 'Ada',
  px: 80,
})

writeFileSync('avatar.svg', svg)

The avatars in these docs and in the playground are drawn by the library itself when the site is built.