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

@dicebear/avatars-jdenticon-sprites

Package Overview
Dependencies
Maintainers
1
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dicebear/avatars-jdenticon-sprites

Jdenticon sprite collection for DiceBear Avatars

  • 1.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.8K
decreased by-72.9%
Maintainers
1
Weekly downloads
 
Created
Source

DiceBear Avatars - Jdenticon Sprite Collection

license npm

Jdenticon wrapper for DiceBear Avatars.

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/v2/jdenticon/:seed.svg

The value of :seed can be anything you like - but don't use any sensitive or personal data here! The GET parameter options can be used to pass options.

Examples
previewurl
https://avatars.dicebear.com/v2/jdenticon/example.svg
https://avatars.dicebear.com/v2/jdenticon/example.svg?options[padding]=0.05&options[background]=%23f0f0f0

You also can use the HTTP API as fallback for Gravatar. Use the Gravatar hash as seed and add the parameter gravatar to your URL. With the parameter s you can also define the size of the Gravatar avatar.

https://avatars.dicebear.com/v2/jdenticon/48c424d839214264fc7f65b52235467c.svg?gravatar&s=248

NPM

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

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

Now you are ready to create your first Avatar.

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

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

Options

nametypedefaultdescription
huesarray of numbers between 0 and 360nullIcon hue
paddingnumber0Distance to the edge of the image
HTTP-API limitation Maximum value: 0.2
colorLightnessarray of two numbers between 0 and 1nullColored shapes - Lightness
grayscaleLightnessarray of two numbers between 0 and 1nullGrayscale shapes - Lightness
colorSaturationnumber between 0 and 1nullColored shapes - Saturation
grayscaleSaturationnumber between 0 and 1nullGrayscale shapes - Saturation
backgroundstringnullAny valid color identifier
HTTP-API limitation Only hex (3-digit, 6-digit and 8-digit) values are allowed. Use url encoded hash: %23.

Further information

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

Keywords

FAQs

Package last updated on 24 Jun 2019

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