1.0.6 • Published 4 years ago

avatarholder v1.0.6

Weekly downloads
25
License
ISC
Repository
github
Last release
4 years ago

Avatar Holder

Avatar Holder is a library that generate automatic avatars, with name/username initials.

New Features!

  • Save image to file
  • Get initials from person full name

You can also:

  • Choose color from background
  • Save image to any extension you want

Demo

Incoming...

Installation

Install into your project

npm install avatarholder --save

Require avatarholder library

let avatarholder = require('avatarholder');

And start to generating your avatars...

let image = avatarholder.generateAvatar('Pedro Miguel Carmo');

or save into files...

let pathFile = avatarholder.avatarholder.generateAvatarToFile('Pedro Miguel Carmo', './my-avatar.png');

Options

Avatar Holder can receive options, always on last param.

let responseToFile = avatarholder.generateAvatarToFile(
    'Pedro Miguel Carmo',
    './my-avatar.jpg',
    {
        size: 600,
        bgColor: '#eee'
    }
);

Full options available (optional):

OptionsDefaultDescription
size100Image size in pixels
font40Font size in pixels
bgColor-Background color. Random color if not sent
color-Constrast with background color if not sent

Development

Want to contribute? Great!

Buy pedromcarmo a Coffe Image of Buy pedromcarmo a Coffe

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.2

4 years ago

1.0.3

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago