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

1. Price: trianglify.io
Free under GPLv3; commercial license for closed source (as reported).
trianglify.ioNo quote yet: price is read from the official pages.
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.com3. Credit the author: raw.githubusercontent.com
“you own the copyright to the output image files which you create using Trianglify”raw.githubusercontent.com
4. Agent access: github.com/qrohlf/trianglify
An agent can install it by itself with npm install trianglify. No key or account is needed.
github.com/qrohlf/trianglifyLicense 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
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
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
The library is GPLv3; the images it makes are yours.
<script src='https://unpkg.com/trianglify@^4/dist/trianglify.bundle.js'> on a live pageThe ^4 range follows whatever comes next, and every visitor's browser then calls unpkg.com.
With seed null the generator uses fresh random values each time.
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.
“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
“you own the copyright to the output image files which you create using Trianglify” raw.githubusercontent.com
“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
“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
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.
- 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/)
Agent installs a package or loads it from a CDN.
npm install trianglifyFormats: svg, png, js
Alternatives
Trianglify This page
Pick Pattern Craft when you want ready background patterns and gradients as copy-paste CSS or Tailwind code with an MIT license.
Pick Hero Patterns when you want small repeating background patterns in one color instead of a full triangle picture.
Pick Haikei when you want to design waves, blobs and other backgrounds in a web app and export them, without code.
Animated React components, text effects and backgrounds in JS/TS with CSS or Tailwind; install the source with the shadcn CLI or jsrepo.
Zero-dependency WebGL shader components: mesh gradients, grain, dithering, liquid metal, god rays, halftone, fluted glass; React or vanilla JS.
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.