JavaScript Initial Avatar Creator: Render an avatar image with the user initials

Recommend this page to a friend!
  Info   View files Example   Demos   Screenshots Screenshots   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 195 All time: 256 This week: 6Up
Version License JavaScript version Categories
initial-avatar 1.0BSD License1.0Graphics, Text processing
Description Author

This object can render an avatar image with the user initials.

It takes the name of the user and creates a canvas object on which it renders the initial letters of the person name.

The background color of the image is picked by computing an hash of the user name. The foreground color is picked automatically to be a complimentary color of the background.

The size of the image and the font are configurable parameters. The font size is computed automatically from the image size and font type.

The generate image can be returned as a binary data string, or assigned to a given page img element, or creating a new img element.

Innovation Award
JavaScript Programming Innovation award nominee
November 2014
Number 3
Avatars are graphics that are usually used by applications to represent their users.

This object can create simple avatar graphics by rending the user initials on a canvas image.

Manuel Lemos
Picture of Arturs Sosins
  Performance   Level  
Name: Arturs Sosins <contact>
Classes: 51 packages by
Country: Latvia Latvia
Age: 35
All time rank: 1
Week rank: 6 Down1 in Latvia Latvia Equal
Innovation award
Innovation award
Nominee: 8x

Winner: 6x

  Create your avatarExternal page  

Open in a separate window

Screenshots  
  • as.png
  Files folder image Files  
File Role Description
Accessible without login Plain text file example.html Example Example for users to try
Plain text file initialAvatar.js Class Main class source
Accessible without login Plain text file simple_example.html Example Simple example

 Version Control Unique User Downloads Download Rankings  
 0%
Total:195
This week:0
All time:256
This week:6Up