npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@rajesh-200/logo-generator

v2.0.1

Published

Deterministic avatar/logo generator that creates unique SVG designs with 5 pattern families including grid, mosaic, triangular, pixel art, and circular designs

Downloads

11

Readme

Logo Generator

A deterministic avatar/logo generator that creates unique SVG designs based on input text. The generator produces consistent, visually appealing designs that are perfect for avatars, logos, or decorative elements.

Features

  • Generates unique SVG designs based on input text
  • Deterministic output (same input always produces the same design)
  • 5 distinct pattern families:
    • Grid Pattern (6x6 classic grid)
    • Mosaic Pattern (12x12 dense grid)
    • Triangular Pattern (geometric designs)
    • Space Invaders Pattern (retro pixel art style)
    • Circular Pattern (symmetric circular designs)
  • 15+ carefully curated color palettes including:
    • Modern vibrant schemes
    • Pastel combinations
    • Vivid duotones
    • Nature-inspired palettes
    • Muted professional colors
    • Cool neon variants
    • Retro color schemes
    • Soft gradients
  • 5 variants within each pattern family
  • Pure TypeScript/JavaScript with no dependencies
  • Outputs clean, optimized SVG
  • Full TypeScript type definitions

Installation

npm install @rajesh-200/logo-generator

Usage

import { generateAvatarSVG } from '@rajesh-200/logo-generator';

// Generate an SVG with default size (240x240)
const svg = generateAvatarSVG('hello world');

// Generate an SVG with custom size
const largeSvg = generateAvatarSVG('hello world', 480);

// Use in HTML
document.getElementById('avatar').innerHTML = svg;

API

generateAvatarSVG(text: string, size?: number, patternType?: number): string

Generates an SVG logo based on the input text.

Parameters:

  • text: The input text that determines the design (required)
  • size: The size of the SVG in pixels (optional, default: 240)
  • patternType: The specific pattern family to use (optional):
    • 0: Grid Pattern - 6x6 classic grid with various shapes
    • 1: Mosaic Pattern - 12x12 dense grid for detailed designs
    • 2: Triangular Pattern - Geometric designs with triangular tiles
    • 3: Space Invaders Pattern - Retro pixel art style
    • 4: Circular Pattern - Symmetric circular designs
    If not provided, the pattern is selected deterministically based on the input text.

Returns:

  • A string containing the SVG code

Notes:

  • Each pattern type has 5 variants that are selected deterministically from the input text
  • The color palette is also selected deterministically from 15+ carefully curated options
  • The output is consistent: the same input text will always generate the same design

Examples

// Generate with default settings (pattern selected from text)
const defaultSvg = generateAvatarSVG('hello world');

// Generate a larger grid pattern specifically
const gridSvg = generateAvatarSVG('hello world', 480, 0);

// Generate a space invaders style pattern
const pixelArtSvg = generateAvatarSVG('hello world', 240, 3);

Pattern Types

The generator creates five main types of patterns:

  1. Grid Pattern (type 0)

    • 6x6 classic grid
    • Shape variants: squares, circles, rounded squares, diamonds, outlines
    • Perfect for simple, bold logos
  2. Mosaic Pattern (type 1)

    • 12x12 dense grid for intricate designs
    • Same shape variations as the grid pattern
    • Ideal for detailed avatars
  3. Triangular Pattern (type 2)

    • Geometric design based on triangular tiles
    • Variants include different arrangements and decorative elements
    • Optional gradients and outlines
    • Great for modern, geometric logos
  4. Space Invaders Pattern (type 3)

    • Retro pixel art style inspired by classic games
    • Symmetric design with pixel-perfect edges
    • Perfect for gaming-related avatars or retro style
  5. Circular Pattern (type 4)

    • Symmetric circular designs
    • Multiple layers and arrangements
    • Ideal for softer, more organic logos

Each pattern type has 5 variants that are automatically selected based on the input text, and uses colors from the 15+ carefully curated palettes.

License

MIT

Author

raJEsh-200