Pixel-Art Avatar Generator In JavaScript – Avatars

Category: Javascript , Recommended | February 27, 2019
Author: DiceBear
Views Total: 1,447
Official Page: Go to website
Last Update: February 27, 2019
License: MIT


Pixel-Art Avatar Generator In JavaScript – Avatars


Avatars is a JavaScript library to dynamically generate Github-like, SVG based pixel-art avatars for both browser and node.js environment.

How to use it:

Install the Avatars with NPM.

$ npm install @dicebear/avatars --save

Install a sprite collection of your choice.

# male
$ npm install @dicebear/avatars-male-sprites --save

# female
$ npm install @dicebear/avatars-female-sprites --save

# identicon
$ npm install @dicebear/avatars-identicon-sprites --save

Or include the Avatars library from a CDN

<script src="https://unpkg.com/@dicebear/[email protected]/dist/avatars.min.js"></script>
<script src="https://unpkg.com/@dicebear/[email protected]/dist/sprites.min.js"></script>

Generate an avatar.

import Avatars from '@dicebear/avatars';
import SpriteCollection from '@dicebear/avatars-male-sprites';

let avatars = new Avatars(SpriteCollection);
let svg = avatars.create('custom-seed');



  • Update

v2.0.4 (11/06/2018)

  • Fix: Color modification

You Might Be Interested In:

Leave a Reply