Identicon
Identicon by DiceBear, licensed under CC0 1.0 .
LICENSE
While our code is MIT licensed, the design of this avatar style is licensed under CC0 1.0. See details for more information.
Usage
Use this URL to request this avatar style via our HTTP API.
https://api.dicebear.com/9.x/identicon/svg
You can use the URL directly as image source.
See HTTP-API docs for more information.
First install the required packages via npm:
npm install @dicebear/core @dicebear/collection --save
Then you can create this avatar as follows:
import { createAvatar } from '@dicebear/core';
import { identicon } from '@dicebear/collection';
const avatar = createAvatar(identicon, {
// ... options
});
const svg = avatar.toString();
See JS-Library docs for more information.
First install the CLI package via npm:
npm install --global dicebear
Then you can create this avatar as follows:
dicebear identicon
See CLI docs for more information.
Options
seed
TypestringThe seed determines the initial value for the built-in PRNG. With the PRNG you can create the same avatar over and over again based.
FelixAnekahttps://api.dicebear.com/9.x/identicon/svg?seed=Felix
createAvatar(identicon, {
seed: "Felix"
});dicebear identicon --seed "Felix"
flip
Typebooleanfalsetruefalsehttps://api.dicebear.com/9.x/identicon/svg?flip=false
createAvatar(identicon, {
flip: false
});dicebear identicon --flip false
rotate
TypeintegerMinimum 0Maximum 3600901802700https://api.dicebear.com/9.x/identicon/svg?rotate=0
createAvatar(identicon, {
rotate: 0
});dicebear identicon --rotate 0
scale
TypeintegerMinimum 0Maximum 20050100200100https://api.dicebear.com/9.x/identicon/svg?scale=50
createAvatar(identicon, {
scale: 50
});dicebear identicon --scale 50
radius
TypeintegerMinimum 0Maximum 50010203040500https://api.dicebear.com/9.x/identicon/svg?radius=0
createAvatar(identicon, {
radius: 0
});dicebear identicon --radius 0
size
TypeintegerMinimum 13248648096https://api.dicebear.com/9.x/identicon/svg?size=32
createAvatar(identicon, {
size: 32
});dicebear identicon --size 32
backgroundColor
TypearrayItem Pattern ^(transparent|[a-fA-F0-9]{6})$b6e3f4c0aeded1d4f9ffd5dcffdfbfhttps://api.dicebear.com/9.x/identicon/svg?backgroundColor=b6e3f4,c0aede,d1d4f9
createAvatar(identicon, {
backgroundColor: ["b6e3f4","c0aede","d1d4f9"]
});dicebear identicon --backgroundColor "b6e3f4" "c0aede" "d1d4f9"
backgroundType
TypearraygradientLinearsolidsolidhttps://api.dicebear.com/9.x/identicon/svg?backgroundType=gradientLinear,solid
createAvatar(identicon, {
backgroundType: ["gradientLinear","solid"]
});dicebear identicon --backgroundType "gradientLinear" "solid"
backgroundRotation
Typearray Specify an array of two numbers for this option. The PRNG will generate a number between the two values, which will be used as the rotation degree. The rotation is only visible if backgroundType is set to ['gradientLinear'].
0360https://api.dicebear.com/9.x/identicon/svg?backgroundRotation=0,360
createAvatar(identicon, {
backgroundRotation: [0,360]
});dicebear identicon --backgroundRotation 0 360
translateX
TypeintegerMinimum -100Maximum 100-50-25025500https://api.dicebear.com/9.x/identicon/svg?translateX=-50
createAvatar(identicon, {
translateX: -50
});dicebear identicon --translateX -50
translateY
TypeintegerMinimum -100Maximum 100-50-25025500https://api.dicebear.com/9.x/identicon/svg?translateY=-50
createAvatar(identicon, {
translateY: -50
});dicebear identicon --translateY -50
clip
Typebooleantruehttps://api.dicebear.com/9.x/identicon/svg?clip=true
createAvatar(identicon, {
clip: true
});dicebear identicon --clip true
randomizeIds
TypebooleanThis option randomize the IDs in the generated SVG / XML. This can be useful for example if the avatars are included directly in the HTML and you want to avoid ID collisions.
falsehttps://api.dicebear.com/9.x/identicon/svg?randomizeIds=false
createAvatar(identicon, {
randomizeIds: false
});dicebear identicon --randomizeIds false
row1
Typearrayooxoooxoxooxxxoxoooxxoxoxxxoxxxxxxxooxoooxoxooxxxoxoooxxoxoxxxoxxxxxxxhttps://api.dicebear.com/9.x/identicon/svg?row1=ooxoo,oxoxo,oxxxo
createAvatar(identicon, {
row1: ["ooxoo","oxoxo","oxxxo"]
});dicebear identicon --row1 "ooxoo" "oxoxo" "oxxxo"
row2
Typearrayooxoooxoxooxxxoxoooxxoxoxxxoxxxxxxxooxoooxoxooxxxoxoooxxoxoxxxoxxxxxxxhttps://api.dicebear.com/9.x/identicon/svg?row2=ooxoo,oxoxo,oxxxo
createAvatar(identicon, {
row2: ["ooxoo","oxoxo","oxxxo"]
});dicebear identicon --row2 "ooxoo" "oxoxo" "oxxxo"
row3
Typearrayooxoooxoxooxxxoxoooxxoxoxxxoxxxxxxxooxoooxoxooxxxoxoooxxoxoxxxoxxxxxxxhttps://api.dicebear.com/9.x/identicon/svg?row3=ooxoo,oxoxo,oxxxo
createAvatar(identicon, {
row3: ["ooxoo","oxoxo","oxxxo"]
});dicebear identicon --row3 "ooxoo" "oxoxo" "oxxxo"
row4
Typearrayooxoooxoxooxxxoxoooxxoxoxxxoxxxxxxxooxoooxoxooxxxoxoooxxoxoxxxoxxxxxxxhttps://api.dicebear.com/9.x/identicon/svg?row4=ooxoo,oxoxo,oxxxo
createAvatar(identicon, {
row4: ["ooxoo","oxoxo","oxxxo"]
});dicebear identicon --row4 "ooxoo" "oxoxo" "oxxxo"
row5
Typearrayooxoooxoxooxxxoxoooxxoxoxxxoxxxxxxxooxoooxoxooxxxoxoooxxoxoxxxoxxxxxxxhttps://api.dicebear.com/9.x/identicon/svg?row5=ooxoo,oxoxo,oxxxo
createAvatar(identicon, {
row5: ["ooxoo","oxoxo","oxxxo"]
});dicebear identicon --row5 "ooxoo" "oxoxo" "oxxxo"
rowColor
TypearrayItem Pattern ^(transparent|[a-fA-F0-9]{6})$00acc11e88e55e35b16d4c417cb3428e24aa039be543a047546e7a00897b3949ab757575c0ca33d81b60e53935f4511efb8c00fdd835ffb300https://api.dicebear.com/9.x/identicon/svg?rowColor=00acc1,1e88e5,5e35b1
createAvatar(identicon, {
rowColor: ["00acc1","1e88e5","5e35b1"]
});dicebear identicon --rowColor "00acc1" "1e88e5" "5e35b1"
Details
| Naming | |
|---|---|
| Collection Import | import { identicon } from '@dicebear/collection'; |
| Package Import | import * as style from '@dicebear/identicon'; |
| CLI | dicebear identicon |
| HTTP-API | https://api.dicebear.com/9.x/identicon/svg |
| JSON Schema | https://api.dicebear.com/9.x/identicon/schema.json |
| Source | |
|---|---|
| Title | Identicon |
| Creator | DiceBear |
| Website | https://www.dicebear.com |
| License | CC0 1.0 |
| Source | https://www.dicebear.com |