1.0.2 • Published 11 months ago

random-pixel-avatar v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

random-pixel-avatar

A simple library to generate random symmetric pixel avatars.

Installation

npm install random-pixel-avatar
const { createAvatar } = require('random-pixel-avatar');

// Generate a 5x5 avatar with each pixel being 20x20 pixels
const dataUrl = createAvatar({
  size: 5,
  pixelSize: 20,
  baseColor?: "#FF0000",
  account?: ""
});

// Create an image element and set the src to the generated data URL
const img = new Image();
img.src = dataUrl;
document.body.appendChild(img);
1.0.2

11 months ago

1.0.1

12 months ago

1.0.0

12 months ago