Jdenticon
Jdenticon wrapper for DiceBear Avatars.
#
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.
#
Examplespreview | url |
---|---|
https://avatars.dicebear.com/api/jdenticon/example.svg | |
https://avatars.dicebear.com/api/jdenticon/example.svg?padding=0.05&background=%23f0f0f0 |
#
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 . |
hues | array of numbers between 0 and 360 | null | Icon hue | |
colorLightness | array of two numbers between 0 and 1 | null | Colored shapes - Lightness | |
grayscaleLightness | array of two numbers between 0 and 1 | null | Grayscale shapes - Lightness | |
colorSaturation | number between 0 and 1 | null | Colored shapes - Saturation | |
grayscaleSaturation | number between 0 and 1 | null | Grayscale shapes - Saturation |