Skip to content

hhanekom/boring-avatars-api

Repository files navigation

boring avatars as a service

Generate unique, customizable SVG avatars from any string -- usernames, emails, or anything else.

Built on boring avatars. Free, open source, and logs nothing.

Usage

<img src="https://boringavatarsapi.hkom.org/{STRING}.svg" />

Options

variant

Change the avatar style.

<img src="https://boringavatarsapi.hkom.org/{STRING}.svg?variant=sunset" />

Available values: marble, beam, pixel, sunset, ring, bauhaus


colors

Set a custom color palette. Pass up to 5 comma-separated hex colors, with or without #.

<img src="https://boringavatarsapi.hkom.org/{STRING}.svg?colors=FF0000,00FF00,0000FF,FFFF00,FF00FF" />

square

Render the avatar as a square instead of a circle. Accepts true or 1.

<img src="https://boringavatarsapi.hkom.org/{STRING}.svg?square=true" />

size

Set the width and height of the avatar in pixels. Defaults to 64.

<img src="https://boringavatarsapi.hkom.org/{STRING}.svg?size=128" />