Skip to content

memo/github-identicon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

github-identicon

GitHub's identicon algorithm written in JS, crudely ported from https://github.com/dgraham/identicon

identicon

Install

npm install github-identicon

Usage

import { writeFileSync } from "node:fs";
import identicon from "github-identicon";

let id = Math.floor(Math.random() * 221110555);

const icon = identicon(id, 500);
writeFileSync(`${id}.png`, icon);

Notes

GitHub's identicons are taken from the ID of the account, not the username of it. Technically you can use anything other than a number, but it has no real value.

About

GitHub's identicon algorithm written in JS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •