Glass
Glass is an abstract vector avatar style featuring translucent, geometric glass-effect shapes. Generate modern, design-forward customizable profile icons for apps with a premium aesthetic.
Glass 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/glass/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 { glass } from '@dicebear/collection';
const avatar = createAvatar(glass, {
// ... 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 glass
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/glass/svg?seed=Felix
createAvatar(glass, {
seed: "Felix"
});dicebear glass --seed "Felix"
flip
Typebooleanfalsetruefalsehttps://api.dicebear.com/9.x/glass/svg?flip=false
createAvatar(glass, {
flip: false
});dicebear glass --flip false
rotate
TypeintegerMinimum 0Maximum 3600901802700https://api.dicebear.com/9.x/glass/svg?rotate=0
createAvatar(glass, {
rotate: 0
});dicebear glass --rotate 0
scale
TypeintegerMinimum 0Maximum 20050100200100https://api.dicebear.com/9.x/glass/svg?scale=50
createAvatar(glass, {
scale: 50
});dicebear glass --scale 50
radius
TypeintegerMinimum 0Maximum 50010203040500https://api.dicebear.com/9.x/glass/svg?radius=0
createAvatar(glass, {
radius: 0
});dicebear glass --radius 0
size
TypeintegerMinimum 13248648096https://api.dicebear.com/9.x/glass/svg?size=32
createAvatar(glass, {
size: 32
});dicebear glass --size 32
backgroundColor
TypearrayItem Pattern ^(transparent|[a-fA-F0-9]{6})$b6e3f4c0aeded1d4f9ffd5dcffdfbf7e47eb7eeb4747b4eb47d0eb47eb7e47eb4747eb6247eb9947ebb447ebd047ebeb62eb4799eb47477eeb4747eb4762eb4799eb6247eb9947ebb4eb47b447ebd0eb47d047ebeb7e47eb47d0eb47ebeb477eeb4747eb4762eb4799eb6247eb9947ebb447ebd047ebeb47https://api.dicebear.com/9.x/glass/svg?backgroundColor=b6e3f4,c0aede,d1d4f9
createAvatar(glass, {
backgroundColor: ["b6e3f4","c0aede","d1d4f9"]
});dicebear glass --backgroundColor "b6e3f4" "c0aede" "d1d4f9"
backgroundType
TypearraygradientLinearsolidsolidhttps://api.dicebear.com/9.x/glass/svg?backgroundType=gradientLinear,solid
createAvatar(glass, {
backgroundType: ["gradientLinear","solid"]
});dicebear glass --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/glass/svg?backgroundRotation=0,360
createAvatar(glass, {
backgroundRotation: [0,360]
});dicebear glass --backgroundRotation 0 360
translateX
TypeintegerMinimum -100Maximum 100-50-25025500https://api.dicebear.com/9.x/glass/svg?translateX=-50
createAvatar(glass, {
translateX: -50
});dicebear glass --translateX -50
translateY
TypeintegerMinimum -100Maximum 100-50-25025500https://api.dicebear.com/9.x/glass/svg?translateY=-50
createAvatar(glass, {
translateY: -50
});dicebear glass --translateY -50
clip
Typebooleantruehttps://api.dicebear.com/9.x/glass/svg?clip=true
createAvatar(glass, {
clip: true
});dicebear glass --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/glass/svg?randomizeIds=false
createAvatar(glass, {
randomizeIds: false
});dicebear glass --randomizeIds false
shape1
Typearrayadeginrtadeginrthttps://api.dicebear.com/9.x/glass/svg?shape1=a,d,e
createAvatar(glass, {
shape1: ["a","d","e"]
});dicebear glass --shape1 "a" "d" "e"
shape1OffsetX
TypearrayMax Items 2Specify an array of two numbers for this option. The PRNG will generate a number between the two values, which will be used as offset.
-8080https://api.dicebear.com/9.x/glass/svg?shape1OffsetX=-80,80
createAvatar(glass, {
shape1OffsetX: [-80,80]
});dicebear glass --shape1OffsetX -80 80
shape1OffsetY
TypearrayMax Items 2Specify an array of two numbers for this option. The PRNG will generate a number between the two values, which will be used as offset.
-8080https://api.dicebear.com/9.x/glass/svg?shape1OffsetY=-80,80
createAvatar(glass, {
shape1OffsetY: [-80,80]
});dicebear glass --shape1OffsetY -80 80
shape1Rotation
TypearrayMax Items 2Specify 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.
-180180https://api.dicebear.com/9.x/glass/svg?shape1Rotation=-180,180
createAvatar(glass, {
shape1Rotation: [-180,180]
});dicebear glass --shape1Rotation -180 180
shape2
Typearrayadeginrtadeginrthttps://api.dicebear.com/9.x/glass/svg?shape2=a,d,e
createAvatar(glass, {
shape2: ["a","d","e"]
});dicebear glass --shape2 "a" "d" "e"
shape2OffsetX
TypearrayMax Items 2Specify an array of two numbers for this option. The PRNG will generate a number between the two values, which will be used as offset.
-8080https://api.dicebear.com/9.x/glass/svg?shape2OffsetX=-80,80
createAvatar(glass, {
shape2OffsetX: [-80,80]
});dicebear glass --shape2OffsetX -80 80
shape2OffsetY
TypearrayMax Items 2Specify an array of two numbers for this option. The PRNG will generate a number between the two values, which will be used as offset.
-8080https://api.dicebear.com/9.x/glass/svg?shape2OffsetY=-80,80
createAvatar(glass, {
shape2OffsetY: [-80,80]
});dicebear glass --shape2OffsetY -80 80
shape2Rotation
TypearrayMax Items 2Specify 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.
-160160https://api.dicebear.com/9.x/glass/svg?shape2Rotation=-160,160
createAvatar(glass, {
shape2Rotation: [-160,160]
});dicebear glass --shape2Rotation -160 160
Details
| Naming | |
|---|---|
| Collection Import | import { glass } from '@dicebear/collection'; |
| Package Import | import * as style from '@dicebear/glass'; |
| CLI | dicebear glass |
| HTTP-API | https://api.dicebear.com/9.x/glass/svg |
| JSON Schema | https://api.dicebear.com/9.x/glass/schema.json |
| Source | |
|---|---|
| Title | Glass |
| Creator | DiceBear |
| Website | https://www.dicebear.com |
| License | CC0 1.0 |
| Source | https://www.dicebear.com |