Male

Designed by Florian Körner. Heavy inspired by 8biticon.

Usage#

HTTP-API (recommended)#

Our free HTTP-API is the easiest way to use this avatar style. Just use the following URL as image source.

https://avatars.dicebear.com/api/male/:seed.svg

See the HTTP API documentation for more information.

Examples#

previewurl
https://avatars.dicebear.com/api/male/example.svg
https://avatars.dicebear.com/api/male/example.svg?mood[]=happy
https://avatars.dicebear.com/api/male/example.svg?mood[]=sad

NPM#

Install the Avatars and this avatar style with the following command.

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

Now you are ready to create your first Avatar.

import Avatars from '@dicebear/avatars';
import sprites from '@dicebear/avatars-male-sprites';
let options = {};
let avatars = new Avatars(sprites, options);
let svg = avatars.create('custom-seed');

Options#

namealiastypedefaultdescription
radiusrnumber0Avatar border radius
dataUriboolfalseReturn avatar as data uri instead of XML
Not supported by the HTTP API
widthwnumbernullFixed width
heighthnumbernullFixed height
marginmnumber0Avatar margin in percent
HTTP-API limitation Max value 25
backgroundbstringnullAny valid color identifier
HTTP-API limitation Only hex (3-digit, 6-digit and 8-digit) values are allowed. Use url encoded hash: %23.
moodarray of strings['happy', 'sad', 'surprised']Possible values: sad, happy, surprised