Avataaars
Designed by Pablo Stanley. The Sketch library can be found on avataaars.com.
#
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.
See the HTTP API documentation for more information.
#
Examples#
NPMInstall the Avatars and this avatar style with the following command.
Now you are ready to create your first Avatar.
#
Optionsname | alias | type | default | description |
---|---|---|---|---|
radius | r | number | 0 | Avatar border radius |
dataUri | bool | false | Return avatar as data uri instead of XML Not supported by the HTTP API | |
width | w | number | null | Fixed width |
height | h | number | null | Fixed height |
margin | m | number | 0 | Avatar margin in percent HTTP-API limitation Max value 25 |
background | b | string | null | Any valid color identifier HTTP-API limitation Only hex (3-digit, 6-digit and 8-digit) values are allowed. Use url encoded hash: %23 . |
style | string | transparent | One of: transparent , circle | |
mode | string | include | include or exclude passed options. | |
top | array of strings | null | Possible values: longHair , shortHair , eyepatch , hat , hijab , turban | |
topChance | number | 100 | Probability in percent | |
hatColor | array of strings | null | Possible values: black , blue , gray , heather , pastel , pink , red , white | |
hairColor | array of strings | null | Possible values: auburn , black , blonde , brown , pastel , platinum , red , gray | |
accessories | array of strings | null | Possible values: kurt , prescription01 , prescription02 , round , sunglasses , wayfarers | |
accessoriesChance | number | 10 | Probability in percent | |
accessoriesColor | array of strings | null | Possible values: black , blue , gray , heather , pastel , pink , red , white | |
facialHair | array of strings | null | Possible values: medium , light , majestic , fancy , magnum | |
facialHairChance | number | 10 | Probability in percent | |
facialHairColor | array of strings | null | Possible values: auburn , black , blonde , brown , pastel , platinum , red , gray | |
clothes | array of strings | null | Possible values: blazer , sweater , shirt , hoodie , overall | |
clothesColor | array of strings | null | Possible values: black , blue , gray , heather , pastel , pink , red , white | |
eyes | array of strings | null | Possible values: close , cry , default , dizzy , roll , happy , hearts , side , squint , surprised , wink , winkWacky | |
eyebrow | array of strings | null | Possible values: angry , default , flat , raised , sad , unibrow , up , frown | |
mouth | array of strings | null | Possible values: concerned , default , disbelief , eating , grimace , sad , scream , serious , smile , tongue , twinkle , vomit | |
skin | array of strings | null | Possible values: tanned , yellow , pale , light , brown , darkBrown , black |