# Avataaars Avataaars is a popular cartoon vector avatar style with half-body characters and a wide range of hairstyles, clothing, accessories, and facial expressions. Generate customizable SVG profile icons for user accounts, dashboards, and social applications. - **Style name:** `avataaars` - **Category:** Characters - **Animated:** no - **Creator:** Pablo Stanley (https://twitter.com/pablostanley) - **Source:** https://avataaars.com/ - **License:** Free for personal and commercial use (https://avataaars.com/) ## Usage Every library below produces the same SVG for the same seed and options. HTTP API: ``` https://api.dicebear.com/10.x/avataaars/svg?seed=John ``` JavaScript: ``` npm install @dicebear/core @dicebear/styles --save ``` ```js import { Style, Avatar } from '@dicebear/core'; import definition from '@dicebear/styles/avataaars.json' with { type: 'json' }; const style = new Style(definition); const avatar = new Avatar(style, { seed: 'John' }); const svg = avatar.toString(); ``` PHP: ``` composer require dicebear/core dicebear/styles ``` ```php 'John']); $svg = (string) $avatar; ``` Python: ``` pip install dicebear-core dicebear-styles ``` ```python from importlib.resources import files from dicebear import Avatar, Style style = Style.from_json( files("dicebear_styles").joinpath("avataaars.json").read_text("utf-8") ) avatar = Avatar(style, {"seed": "John"}) svg = avatar.to_string() ``` Rust: ``` cargo add dicebear-core serde_json cargo add dicebear-styles --features avataaars ``` ```rust use dicebear_core::{Avatar, Style}; use serde_json::json; let style = Style::from_str(dicebear_styles::AVATAAARS)?; let avatar = Avatar::new(&style, json!({ "seed": "John" }))?; let svg = avatar.to_svg(); ``` Go: ``` go get github.com/dicebear/dicebear-go/v10 go get github.com/dicebear/styles/v10 ``` ```go import ( dicebear "github.com/dicebear/dicebear-go/v10" "github.com/dicebear/styles/v10" ) style, _ := dicebear.NewStyle([]byte(styles.Avataaars)) avatar, _ := dicebear.NewAvatar(style, map[string]any{"seed": "John"}) svg := avatar.SVG() ``` Dart: ``` dart pub add dicebear_core dicebear_styles ``` ```dart import 'package:dicebear_core/dicebear_core.dart'; import 'package:dicebear_styles/avataaars.dart'; final style = Style.parse(avataaars); final avatar = Avatar(style, {'seed': 'John'}); final svg = avatar.svg; ``` CLI: ``` npm install --global dicebear ``` ``` dicebear avataaars ``` ## Options Every option below works in all libraries and as a query parameter of the HTTP API. The ones built from a component name (`Variant`, `Probability`) or from a color group (`Color`, `ColorFill`, `ColorFillStops`, `ColorAngle`, `ColorOrder`) belong to this style; the rest are [core options](https://www.dicebear.com/guides/core-options/) that every style accepts. | Option | Type | Values | | --- | --- | --- | | `seed` | string | | | `size` | number | 1 to 4096 | | `idRandomization` | boolean | | | `title` | string | | | `flip` | enum (array allowed) | `none`, `horizontal`, `vertical`, `both` | | `fontFamily` | string (array allowed) | | | `fontWeight` | number (array allowed) | 1 to 1000 | | `scale` | range | 0 to 10 | | `borderRadius` | range | 0 to 50 | | `rotate` | range | -360 to 360 | | `translateX` | range | -1000 to 1000 | | `translateY` | range | -1000 to 1000 | | `accessoriesVariant` | enum (array allowed) | `eyepatch`, `kurt`, `prescription01`, `prescription02`, `round`, `sunglasses`, `wayfarers` | | `accessoriesProbability` | number | 0 to 100 | | `clothesVariant` | enum (array allowed) | `blazerAndShirt`, `blazerAndSweater`, `collarAndSweater`, `graphicShirt`, `hoodie`, `overall`, `shirtCrewNeck`, `shirtScoopNeck`, `shirtVNeck` | | `clothesProbability` | number | 0 to 100 | | `clothesGraphicVariant` | enum (array allowed) | `bat`, `bear`, `cumbia`, `deer`, `diamond`, `hola`, `pizza`, `resist`, `skull`, `skullOutline` | | `clothesGraphicProbability` | number | 0 to 100 | | `eyebrowsVariant` | enum (array allowed) | `angry`, `angryNatural`, `default`, `defaultNatural`, `flatNatural`, `frownNatural`, `raisedExcited`, `raisedExcitedNatural`, `sadConcerned`, `sadConcernedNatural`, `unibrowNatural`, `upDown`, `upDownNatural` | | `eyebrowsProbability` | number | 0 to 100 | | `eyesVariant` | enum (array allowed) | `closed`, `cry`, `default`, `eyeRoll`, `happy`, `hearts`, `side`, `squint`, `surprised`, `wink`, `winkWacky`, `xDizzy` | | `eyesProbability` | number | 0 to 100 | | `facialHairVariant` | enum (array allowed) | `beardLight`, `beardMajestic`, `beardMedium`, `moustacheFancy`, `moustacheMagnum` | | `facialHairProbability` | number | 0 to 100 | | `mouthVariant` | enum (array allowed) | `concerned`, `default`, `disbelief`, `eating`, `grimace`, `sad`, `screamOpen`, `serious`, `smile`, `tongue`, `twinkle`, `vomit` | | `mouthProbability` | number | 0 to 100 | | `noseVariant` | enum (array allowed) | `default` | | `noseProbability` | number | 0 to 100 | | `topVariant` | enum (array allowed) | `bigHair`, `bob`, `bun`, `curly`, `curvy`, `dreads`, `dreads01`, `dreads02`, `frida`, `frizzle`, `fro`, `froBand`, `hat`, `hijab`, `longButNotTooLong`, `miaWallace`, `shaggy`, `shaggyMullet`, `shavedSides`, `shortCurly`, `shortFlat`, `shortRound`, `shortWaved`, `sides`, `straight01`, `straight02`, `straightAndStrand`, `theCaesar`, `theCaesarAndSidePart`, `turban`, `winterHat02`, `winterHat03`, `winterHat04`, `winterHat1` | | `topProbability` | number | 0 to 100 | | `accessoriesColor` | color (array allowed) | Hex color, `#` optional | | `accessoriesColorFill` | enum (array allowed) | `solid`, `linear`, `radial` | | `accessoriesColorFillStops` | range | | | `accessoriesColorAngle` | range | -360 to 360 | | `accessoriesColorOrder` | enum | `random`, `fixed` | | `clothesColor` | color (array allowed) | Hex color, `#` optional | | `clothesColorFill` | enum (array allowed) | `solid`, `linear`, `radial` | | `clothesColorFillStops` | range | | | `clothesColorAngle` | range | -360 to 360 | | `clothesColorOrder` | enum | `random`, `fixed` | | `facialHairColor` | color (array allowed) | Hex color, `#` optional | | `facialHairColorFill` | enum (array allowed) | `solid`, `linear`, `radial` | | `facialHairColorFillStops` | range | | | `facialHairColorAngle` | range | -360 to 360 | | `facialHairColorOrder` | enum | `random`, `fixed` | | `hairColor` | color (array allowed) | Hex color, `#` optional | | `hairColorFill` | enum (array allowed) | `solid`, `linear`, `radial` | | `hairColorFillStops` | range | | | `hairColorAngle` | range | -360 to 360 | | `hairColorOrder` | enum | `random`, `fixed` | | `hatColor` | color (array allowed) | Hex color, `#` optional | | `hatColorFill` | enum (array allowed) | `solid`, `linear`, `radial` | | `hatColorFillStops` | range | | | `hatColorAngle` | range | -360 to 360 | | `hatColorOrder` | enum | `random`, `fixed` | | `skinColor` | color (array allowed) | Hex color, `#` optional | | `skinColorFill` | enum (array allowed) | `solid`, `linear`, `radial` | | `skinColorFillStops` | range | | | `skinColorAngle` | range | -360 to 360 | | `skinColorOrder` | enum | `random`, `fixed` | | `backgroundColor` | color (array allowed) | Hex color, `#` optional | | `backgroundColorFill` | enum (array allowed) | `solid`, `linear`, `radial` | | `backgroundColorFillStops` | range | | | `backgroundColorAngle` | range | -360 to 360 | | `backgroundColorOrder` | enum | `random`, `fixed` | The same table is available as JSON at `https://api.dicebear.com/10.x/avataaars/options.json`, and the raw definition at `https://api.dicebear.com/10.x/avataaars/definition.json`.