gravatary
v1.0.0
Published
Gravatar Generator
Downloads
27
Maintainers
Readme
gravatary
The Gravatar Generator
Installation
npm i gravatary --save
Usage:
Create random gravatar
import gravatary from "gravatary";
let image = gravatary(); // data:image/png;base64,...
Create gravatar from hashstring without options.
import gravatary from "gravatary";
let image = gravatary("hashstring"); // data:image/png;base64,...
Create gravatar with hash and options.
import gravatary from "gravatary";
let image = gravatary("hashstring", {margin: 0.08, size: 450, background: [0, 0, 0]}); // data:image/png;base64,...
Options
Property | Type | Description
:---|:---|:---
margin | float
| inner margin
size | int
| px. size of an image
background | array of int
| RGB background for a gravatat