Skip to main content

Pixel Art

Sean Moore Lionel Quinn Lydia Ellis Bryan Phelps Ronald Frank Annette Klein Brent Hill Stanley Newman Grace Singleton

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/pixel-art/:seed.svg

See the HTTP API documentation for more information.

NPM#

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

npm install --save @dicebear/avatars @dicebear/pixel-art

Now you are ready to create your first Avatar.

import { createAvatar } from '@dicebear/avatars';
import * as style from '@dicebear/pixel-art';
let svg = createAvatar(style, {
seed: 'custom-seed',
// ... and other options
});

Options#

Base options#

seed

Seed

Alias: s

Default: undefined

Type: string

dataUri

Data URI

Default: false

Type: boolean

flip

Flip

Default: false

Type: boolean

rotate

Rotate

Default: 0

Type: integer

Minimum: 0

Maximum: 360

scale

Scale

Default: 100

Type: integer

Minimum: 0

Maximum: 200

radius

Radius

Alias: r

Default: 0

Type: integer

Minimum: 0

Maximum: 50

size

Size

Default: undefined

Type: integer

Minimum: 1

backgroundColor

Background Color

Alias: b

Default: undefined

Type:

translateX

Translate X%

Default: 0

Type: integer

Minimum: -100

Maximum: 100

translateY

Translate Y%

Default: 0

Type: integer

Minimum: -100

Maximum: 100

Style options#

beard

Beard

Default: variant04, variant03, variant02, variant01

Type: array

Items:

Type: string

Enum: variant04, variant03, variant02, variant01

beardProbability

Beard Probability

Default: 10

Type: integer

Minimum: 0

Maximum: 100

eyes

Eyes

Default: variant13, variant12, variant11, variant10, variant09, variant08, variant07, variant06, variant05, variant04, variant03, variant02, variant01

Type: array

Items:

Type: string

Enum: variant13, variant12, variant11, variant10, variant09, variant08, variant07, variant06, variant05, variant04, variant03, variant02, variant01

eyebrows

Eyebrows

Default: variant13, variant12, variant11, variant10, variant09, variant08, variant07, variant06, variant05, variant04, variant03, variant02, variant01

Type: array

Items:

Type: string

Enum: variant13, variant12, variant11, variant10, variant09, variant08, variant07, variant06, variant05, variant04, variant03, variant02, variant01

mouth

Mouth

Default: surprised03, surprised02, happy09, happy08, happy07, happy06, happy05, happy04, happy03, happy02, happy01, sad08, sad07, sad06, sad05, sad04, sad03, sad02, sad01, surprised01

Type: array

Items:

Type: string

Enum: surprised03, surprised02, happy09, happy08, happy07, happy06, happy05, happy04, happy03, happy02, happy01, sad08, sad07, sad06, sad05, sad04, sad03, sad02, sad01, surprised01

hair

Hair

Default: short11, short10, short09, short08, short07, short06, short05, short04, short03, short02, long15, short01, long14, long13, long12, long11, long10, long09, long08, long07, long06, long05, long04, long03, long02, long01

Type: array

Items:

Type: string

Enum: short11, short10, short09, short08, short07, short06, short05, short04, short03, short02, long15, short01, long14, long13, long12, long11, long10, long09, long08, long07, long06, long05, long04, long03, long02, long01

hairProbability

Hair Probability

Default: 100

Type: integer

Minimum: 0

Maximum: 100

accessories

Accessories

Default: variant04, variant03, variant02, variant01

Type: array

Items:

Type: string

Enum: variant04, variant03, variant02, variant01

accessoriesProbability

Accessories Probability

Default: 10

Type: integer

Minimum: 0

Maximum: 100

glasses

Glasses

Default: variant07, variant06, variant05, variant04, variant03, variant02, variant01

Type: array

Items:

Type: string

Enum: variant07, variant06, variant05, variant04, variant03, variant02, variant01

glassesProbability

Glasses Probability

Default: 20

Type: integer

Minimum: 0

Maximum: 100

hat

Hat

Default: variant01, variant02, variant03, variant04, variant05, variant06, variant07, variant08, variant09, variant10, variant11, variant12

Type: array

Items:

Type: string

Enum: variant01, variant02, variant03, variant04, variant05, variant06, variant07, variant08, variant09, variant10, variant11, variant12

hatProbability

Hat Probability

Default: 10

Type: integer

Minimum: 0

Maximum: 100

clothing

Clothing

Default: variant25, variant24, variant23, variant22, variant21, variant20, variant19, variant18, variant17, variant16, variant15, variant14, variant13, variant12, variant11, variant10, variant09, variant08, variant07, variant06, variant05, variant04, variant03, variant02, variant01

Type: array

Items:

Type: string

Enum: variant25, variant24, variant23, variant22, variant21, variant20, variant19, variant18, variant17, variant16, variant15, variant14, variant13, variant12, variant11, variant10, variant09, variant08, variant07, variant06, variant05, variant04, variant03, variant02, variant01

skinColor

Skin Color

Default: variant01, variant02, variant03, variant04, variant05, variant06, variant07, variant08

Type: array

Items:

Type: string

Enum: variant01, variant02, variant03, variant04, variant05, variant06, variant07, variant08

or

Type: string

Pattern: ^#([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})$

hairColor

Hair Color

Default: variant01, variant02, variant03, variant04, variant05, variant06, variant07, variant08, variant09, variant10

Type: array

Items:

Type: string

Enum: variant01, variant02, variant03, variant04, variant05, variant06, variant07, variant08, variant09, variant10

or

Type: string

Pattern: ^#([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})$

accessoriesColor

Accessories Color

Default: gold01, gold02, gold03, silver01, silver02

Type: array

Items:

Type: string

Enum: gold01, gold02, gold03, silver01, silver02

or

Type: string

Pattern: ^#([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})$

mouthColor

Mouth Color

Default: variant01, variant02, variant03, variant04

Type: array

Items:

Type: string

Enum: variant01, variant02, variant03, variant04

or

Type: string

Pattern: ^#([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})$

clothesColor

Clothes Color

Default: yellow01, yellow02, yellow03, red01, red02, red03, blue01, blue02, blue03, green01, green02, green03

Type: array

Items:

Type: string

Enum: yellow01, yellow02, yellow03, red01, red02, red03, blue01, blue02, blue03, green01, green02, green03

or

Type: string

Pattern: ^#([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})$

hatColor

Hat Color

Default: pink01, blue01, green01, purple01, red01, black01, gray01

Type: array

Items:

Type: string

Enum: pink01, blue01, green01, purple01, red01, black01, gray01

or

Type: string

Pattern: ^#([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})$

glassesColor

Glasses Color

Default: green01, blue01, red01, black01, black02, black03

Type: array

Items:

Type: string

Enum: green01, blue01, red01, black01, black02, black03

or

Type: string

Pattern: ^#([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})$