Skip to content
Agents tracked: 502 Releases (7d): 613 Agent status: 4 with issuesSince last limit reset: Claude 7d · Codex 5d For AI agents: Markdown Updated Nov 18, 2026

Trianglify

by Quinn Rohlf

JS library that generates low-poly triangle pattern backgrounds as SVG/PNG/canvas; GPLv3 code, you own the images.

Backgrounds, patterns and shapes Code libraryOpen sourcegeometricabstractgradient

GitHub repoWebsite
Six backgrounds made by Trianglify, two from text seeds, two with set color ranges, one with an even grid and one with outlines only; the label under each shows the options used.
Made by AgentGid with trianglify 4.1.1 (dist/trianglify.bundle.js from the npm tarball, hash checked against the registry). The images are output of the library; the README says you own the copyright to images you create with it. The library itself (GPLv3) is not shipped on our page.

2. Commercial use: raw.githubusercontent.com

“If you are interested in using Trianglify in a closed-source project, please email qr@qrohlf.com to purchase a commercial license.”

Shipping only the generated images is fine; including the library needs a GPL-compatible open-source project or a paid license.

raw.githubusercontent.com

License checked Nov 5, 2026 against 1 official page. Tap a verdict to see its source. How we checked Report an error

Trianglify: low-poly triangle backgrounds from code

Trianglify is a free code library that draws colorful backgrounds made of triangles, in the low-poly style. You set the size and colors, and it gives you a picture for a web page or an image file. The same seed text always gives the same picture, so each blog post or user can get its own fixed background.

Where you can use it

A unique header for every blog post

A unique header for every blog post

Use the post title as the seed so each article gets its own triangle header that stays the same on every visit.

A full-page background

Fill the whole window with a triangle pattern as the background of a landing page or a login screen.

Background images in brand colors

Pass your own color stops to get backgrounds that match your brand, then save them as image files for your site.

Line art backgrounds

Draw only the triangle outlines for a light web-like pattern behind text or charts.

Social share images Idea

Make a matching share picture for each page, sized for link previews, and save it as a file when the site is built.

Placeholder covers for empty items Idea

Give projects, playlists or courses without a cover picture a colorful background made from their name.

Trianglify popularity

20 / 100
Gid Score, same scale as developer tools
10,089
GitHub stars
1,028
npm downloads, last 7 days
-21.3% in 4 weeks
Trianglify: downloads per weeknpm, trianglify 1,028
Trianglify: GitHub starsqrohlf/trianglify 10,089

Downloads from api.npmjs.org, stars from GitHub, checked Nov 17, 2026. How the Gid Score is calculated

How to start

Tell your AI assistant

“Use trianglify 4.1.1 in a small build script to make one 1200x630 PNG background per blog post, using the post title as the seed, and ship only the image files, not the library.”

Or install it yourself.

npm install --save trianglify
Show code

Call trianglify with a width, a height and other options, then draw the result as a drawing (toSVG) or a picture (toCanvas).

const options = { height: 400, width: 600 }
const pattern = trianglify(options)

Mistakes to avoid

Bundling trianglify into a closed-source site or app
Make the images at build time and ship only the SVG or PNG files, or buy a commercial license

The library is GPLv3; the images it makes are yours.

<script src='https://unpkg.com/trianglify@^4/dist/trianglify.bundle.js'> on a live page
Pin trianglify 4.1.1 and serve dist/trianglify.bundle.js from your own site, or better, ship only images

The ^4 range follows whatever comes next, and every visitor's browser then calls unpkg.com.

Leaving seed unset and expecting the same background on every load
Pass a seed, for example the post title or the page slug

With seed null the generator uses fresh random values each time.

Expecting a plain npm install for a browser-only project to be light
Use the ready dist/trianglify.bundle.js in the browser; in Node make sure node-canvas can build

The npm package lists canvas as a normal dependency, which builds native code on install.

License

GPL-3.0 (library); generated images are yours license. The code is under the GPL 3 license, so a site or app that includes it must be open source too, or you buy a paid license from the author. The pictures you make with it are yours, and shipping only those pictures has no such rule.

Commercial use
With conditions

“If you are interested in using Trianglify in a closed-source project, please email qr@qrohlf.com to purchase a commercial license.” raw.githubusercontent.com

Credit
Not needed

“you own the copyright to the output image files which you create using Trianglify” raw.githubusercontent.com

Inside your app or game
With conditions

“This means that any websites, apps, or other projects that include the Trianglify javascript library need to be released under a compatible open-source license.” raw.githubusercontent.com

Pass the files on to your users
With conditions

“If you just want to use an image file that was generated using Trianglify in your project, and do not plan to distribute the Trianglify source code or compiled versions of it, you do not need to worry about the license restrictions described above.” raw.githubusercontent.com

AI training
Not stated
Bots and bulk downloads
Not stated

AllowedWith conditionsNot allowedNot stated or not checked yet

Is Trianglify free for commercial use? The full answer Not legal advice. Check the license page before you ship.

For your agent

License rules tell your agent what it may do with Trianglify. Paste them into your prompt or AGENTS.md.

License rules
- Trianglify (Backgrounds, patterns and shapes). JS library that generates low-poly triangle pattern backgrounds as SVG/PNG/canvas; GPLv3 code, you own the images. Price: free; commercial use with conditions; no credit needed; ship inside your app with conditions; pass the files on to your users only with conditions. Style: geometric, abstract, gradient.
  Connect: npm trianglify.
  Get files: npm install trianglify; best practice: generate SVG/PNG at build time (Node) and ship only the image, not the library (svg, png, js).
  Not allowed: GPLv3 copyleft if the library is bundled
  Rule: Shipping the JS library in a site/app requires a GPL-compatible open-source project (or a paid license)
  Rule: Generating images offline and shipping only the SVG/PNG is fine
  License: https://raw.githubusercontent.com/qrohlf/trianglify/HEAD/Readme.md (checked 2026-11-05; details: https://agentgid.com/assets/trianglify/)
Can an agent use it by itself?
Yes.

Agent installs a package or loads it from a CDN.

Install
npm install trianglify
How an agent gets files
npm install trianglify; best practice: generate SVG/PNG at build time (Node) and ship only the image, not the library.

Formats: svg, png, js

API, key or account
Not needed. Everything runs on your side.
MCP server
None found
This card for machines

Alternatives

Trianglify This page

Free With conditions npm

Pattern Craft

Pick Pattern Craft when you want ready background patterns and gradients as copy-paste CSS or Tailwind code with an MIT license.

Free Commercial OK Download

Hero Patterns

Pick Hero Patterns when you want small repeating background patterns in one color instead of a full triangle picture.

Free Commercial OK Download

Haikei

Pick Haikei when you want to design waves, blobs and other backgrounds in a web app and export them, without code.

Free Commercial OK Download

React Bits

Animated React components, text effects and backgrounds in JS/TS with CSS or Tailwind; install the source with the shadcn CLI or jsrepo.

Free tier Commercial OK Download

Paper Shaders

Zero-dependency WebGL shader components: mesh gradients, grain, dithering, liquid metal, god rays, halftone, fluted glass; React or vanilla JS.

Free Commercial OK npm

All backgrounds, patterns and shapes

Questions

Can I use the pictures in a paid product?

Yes. You own the images you make with it, and shipping only the images is free of the GPL rules.

Can I put the library in my closed-source app?

Only with a paid commercial license from the author; otherwise the project must use a compatible open-source license.

Will the same settings give the same picture?

Yes, when you set a seed. Without a seed every run is random.

Can I choose the colors?

Yes. Use a named color set such as YlGnBu or pass your own list of colors.