avatar-initials-generator
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

initials-avatar-generator

Circle avatar generator for Node.js

Examples

David Mart Leela Turanga Pavel Durov Nick Minard

TSDoc

defaultPalette (variable: string[])

Color Palette

getBgColor (function)

getFontColor (function)

IAGConfig (interface)

Members:

  • palette (string[])
  • width (number)
  • fontProportion (number)
  • maxLetters (number)

draw (function)

getInitials (function)

generate (function)

Generate avatar

Parameters:

  • name (string) - Full name to be split into initials
  • config (IAGConfig) - Configuration
generate('Pavel Durov', {
  width: 300,
  palette: ['#d97706', '#4f46e5', '#9333ea'],
  maxLetters: 2,
  fontProportion: 0.6
});

Dependents (1)

Package Sidebar

Install

npm i avatar-initials-generator

Weekly Downloads

10

Version

0.0.2

License

Apache-2.0

Unpacked Size

314 kB

Total Files

26

Last publish

Collaborators

  • david.mart