Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@dicebear/avatars-bottts-sprites

Package Overview
Dependencies
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dicebear/avatars-bottts-sprites

Bottts sprite collection for DiceBear Avatars

  • 4.2.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.4K
decreased by-85.11%
Maintainers
1
Weekly downloads
 
Created
Source

DiceBear Avatars - Bottts Sprite Collection

license npm

Designed by Pablo Stanley, the Sketch library can be found on bottts.com.

Usage

Our free HTTP-API is the easiest way to use this sprite collection. Just use the following URL as image source.

https://avatars.dicebear.com/api/bottts/:seed.svg

The value of :seed can be anything you like - but don't use any sensitive or personal data here!

Examples
previewurl
https://avatars.dicebear.com/api/bottts/example.svg
https://avatars.dicebear.com/api/bottts/example.svg?options[colors][]=cyan
https://avatars.dicebear.com/api/bottts/example.svg?options[colors][]=cyan&options[primaryColorLevel]=200

NPM

Install the Avatars and this sprite collection with the following command.

npm install --save @dicebear/avatars @dicebear/avatars-bottts-sprites

Now you are ready to create your first Avatar.

import Avatars from '@dicebear/avatars';
import sprites from '@dicebear/avatars-bottts-sprites';

let avatars = new Avatars(sprites());
let svg = avatars.create('custom-seed');

Options

namealiastypedefaultdescription
radiusrnumber0Avatar border radius
base64boolfalseReturn avatar as base64 data uri instead of XML
Not supported by the HTTP API
widthwnumbernullFixed width
heighthnumbernullFixed height
marginmnumber0Avatar margin in percent
HTTP-API limitation Max value 25
backgroundbstringnullAny valid color identifier
HTTP-API limitation Only hex (3-digit, 6-digit and 8-digit) values are allowed. Use url encoded hash: %23.
userAgentstringwindow.navigator.userAgentUser-Agent for legacy browser fallback
Automatically detected by the HTTP API
colorsarray of stringsnullPossible values: amber, blue, blueGrey, brown, cyan, deepOrange, deepPurple, green, grey, indigo, lightBlue, lightGreen, lime, orange, pink, purple, red, teal, yellow
primaryColorLevelnumber600Possible values: 50, 100, 200, 300, 400, 500, 600, 700, 800, 900
secondaryColorLevelnumber400Possible values: 50, 100, 200, 300, 400, 500, 600, 700, 800, 900
colorfulbooleanfalseAssigns sides and top a random secondary color
mouthChancenumber100Probability in percent avatar will have a mouth
sidesChancenumber100Probability in percent avatar will have side elements
textureChancenumber50Probability in percent avatar will have texture
topChancenumber100Probability in percent avatar will have a top element

Further information

You can find the DiceBear Avatars documentation at avatars.dicebear.com

Keywords

FAQs

Package last updated on 20 Jun 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc