# Weave Weave is an abstract vector avatar style that crosses translucent pastel stripes into a plaid-like woven pattern. Generate colorful SVG profile icons that work as avatar placeholders or decorative user identifiers. - **Style name:** `weave` - **Category:** Minimalist - **Animated:** no - **Creator:** DiceBear (https://www.dicebear.com) - **Source:** https://www.dicebear.com - **License:** CC0 1.0 (https://creativecommons.org/publicdomain/zero/1.0/) ## Usage Every library below produces the same SVG for the same seed and options. HTTP API: ``` https://api.dicebear.com/10.x/weave/svg?seed=John ``` JavaScript: ``` npm install @dicebear/core @dicebear/styles --save ``` ```js import { Style, Avatar } from '@dicebear/core'; import definition from '@dicebear/styles/weave.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("weave.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 weave ``` ```rust use dicebear_core::{Avatar, Style}; use serde_json::json; let style = Style::from_str(dicebear_styles::WEAVE)?; 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.Weave)) 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/weave.dart'; final style = Style.parse(weave); final avatar = Avatar(style, {'seed': 'John'}); final svg = avatar.svg; ``` CLI: ``` npm install --global dicebear ``` ``` dicebear weave ``` ## Presets 9 ready-made option sets for this style. Each is a plain set of render options: pass it to any of the libraries or send it as HTTP-API query parameters. You do not need to install anything for them, and any option a preset leaves out keeps varying with the seed. - **Sepia:** Three browns woven on tanned paper. - **Greyscale:** Three greys, no hue at all. - **Duotone:** Three steps of one indigo. - **Muted:** Dusty bands instead of the bright ones. - **Electric:** Acid bands at full saturation. - **Pastel Wall:** Soft backgrounds, the weave untouched. - **Bold Pop:** Saturated backgrounds, loud on purpose. - **Sunrise:** A warm gradient under the weave. - **Close Up:** Scaled in, so fewer bands fill the frame. The full option set of each one is at https://www.dicebear.com/styles/weave/presets/index.md. ## 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 | | `weaveVariant` | enum (array allowed) | `diagonal`, `diagonalBack`, `straight` | | `weaveProbability` | number | 0 to 100 | | `latticeVariant` | enum (array allowed) | `default` | | `latticeProbability` | number | 0 to 100 | | `bandAVariant` | enum (array allowed) | `medium`, `thin`, `twin`, `wide` | | `bandAProbability` | number | 0 to 100 | | `bandB02Variant` | enum (array allowed) | `medium`, `thin`, `twin`, `wide` | | `bandB02Probability` | number | 0 to 100 | | `bandC02Variant` | enum (array allowed) | `medium`, `thin`, `twin`, `wide` | | `bandC02Probability` | number | 0 to 100 | | `bandBVariant` | enum (array allowed) | `medium`, `thin`, `twin`, `wide` | | `bandBProbability` | number | 0 to 100 | | `bandCVariant` | enum (array allowed) | `medium`, `thin`, `twin`, `wide` | | `bandCProbability` | number | 0 to 100 | | `lineAccentVariant` | enum (array allowed) | `default` | | `lineAccentProbability` | number | 0 to 100 | | `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` | | `colorAColor` | color (array allowed) | Hex color, `#` optional | | `colorAColorFill` | enum (array allowed) | `solid`, `linear`, `radial` | | `colorAColorFillStops` | range | | | `colorAColorAngle` | range | -360 to 360 | | `colorAColorOrder` | enum | `random`, `fixed` | | `colorBColor` | color (array allowed) | Hex color, `#` optional | | `colorBColorFill` | enum (array allowed) | `solid`, `linear`, `radial` | | `colorBColorFillStops` | range | | | `colorBColorAngle` | range | -360 to 360 | | `colorBColorOrder` | enum | `random`, `fixed` | | `colorCColor` | color (array allowed) | Hex color, `#` optional | | `colorCColorFill` | enum (array allowed) | `solid`, `linear`, `radial` | | `colorCColorFillStops` | range | | | `colorCColorAngle` | range | -360 to 360 | | `colorCColorOrder` | enum | `random`, `fixed` | | `lineColor` | color (array allowed) | Hex color, `#` optional | | `lineColorFill` | enum (array allowed) | `solid`, `linear`, `radial` | | `lineColorFillStops` | range | | | `lineColorAngle` | range | -360 to 360 | | `lineColorOrder` | enum | `random`, `fixed` | The same table is available as JSON at `https://api.dicebear.com/10.x/weave/options.json`, and the raw definition at `https://api.dicebear.com/10.x/weave/definition.json`.