Skip to content

coderLukasF/basicprofilepic-gen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Basic profile picture generator

This repository is just a simple profile picture generator, with a background and text color. It saves the image as a png as output.png If you need a basic profile picture generator for your website, this should work pretty well. It is NodeJS and requires the canvas package, which is pretty easy to install:

npm install canvas

The function has very simple parameters. Here is an example:

generateProfilePicture("Lukas", "#ff5522", "#FFF", 800, 800);

The first parameter is the name, which the program shortens into the first letter for the text. The second parameter is the background color, make sure its a hex. The third parameter is the text color, make sure its a hex. Psst.. If you are making a random hex generator, make sure to add some filtering to the background color and text so you wont accidentally get the same color background color and text color and cant read it.

The fourth parameter is the width in pixels of the image. The fifth parameter is the height in pixels of the image.

If I dont respond to your PR within 1 business day, please email me. (My contact is on my home page)

About

Generates basic profile pictures with letters and background colors.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors