GitHub's identicon algorithm written in JS, crudely ported from https://github.com/dgraham/identicon
npm install github-identicon
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);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.