Generate unique snowflake SVGs from cryptographic strings — like SSH randomart, but prettier.
Spot similar keys at a glance. Every input produces a deterministic, visually distinct snowflake with true 6-fold symmetry (D6 dihedral group), just like real ice crystals. Same input always gives the same snowflake. Different inputs give different snowflakes. Display them next to SSH fingerprints, wallet addresses, or API keys so users can quickly tell them apart without comparing long hex strings character by character.
npm install @temikus/flurryimport { generateSnowflake, generateSnowflakeSync } from "@temikus/flurry";
// Async (uses Web Crypto API)
const svg = await generateSnowflake("SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8");
// Sync (bundled SHA-256, no Web Crypto dependency)
const svg = generateSnowflakeSync("SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8");
// With options
const svg = await generateSnowflake(input, {
size: 400, // viewBox size (default: 400)
color: "#a8d8ea", // branch color (default: ice blue)
backgroundColor: "transparent", // default: transparent
strokeOnly: false, // outline mode (default: false)
});<script src="https://unpkg.com/@temikus/flurry"></script>
<script>
Flurry.generateSnowflakeSync("my-key", { size: 200 });
</script>const container = document.getElementById("avatar");
container.innerHTML = await generateSnowflake(user.publicKey);- Hash the input string with SHA-256 (32 bytes)
- Parse the bytes into snowflake growth parameters (arm length, curvature, branch count/angle/length, tip decorations, center pattern)
- Generate geometry for a single 30-degree half-sector
- Mirror for bilateral symmetry, then rotate 6 times for full D6 dihedral symmetry
- Render as an SVG string with
<defs>/<use>for efficiency
Requires Node.js 20+ and just.
just install # Install dependencies
just dev # Run demo dev server
just test # Run tests
just build # Build library
just build-demo # Build demo site
just lint # Type-checkApache 2.0