Get started with identicon.js CDN

BSD-2-Clause licensed

Identicon.js: Lightweight library generating unique, pixelated string/hash images.

Tags:
  • GitHub-style
  • identicon

Stable version

Copied!

How to start using identicon.js CDN


<!DOCTYPE html>
<html>
<head>
  <title>Get started with identicon.js CDN - cdnhub.io</title>
  <script src="https://cdn.cdnhub.io/identicon.js/2.3.3/identicon.min.js"></script>
</head>
<body>
  <button id="generate">Generate Identicon</button>
  <canvas id="canvas" width="100" height="100"></canvas>
  <script>
    document.getElementById('generate').addEventListener('click', function() {
      const hash = new HashAbility().hex(Math.random().toString(16).slice(2, 32));
      new Identicon(document.getElementById('canvas'), hash, 100).start();
    });
  </script>
</body>
</html>
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!

All versions