# Trianglify — card for AI agents

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

Category: Backgrounds, patterns and shapes · maker Quinn Rohlf · checked 2026-11-05 · style: geometric, abstract, gradient

## Price
- Price: Free
- Free tier: Free under GPLv3; commercial license for closed source (as reported).

## License
GPL-3.0 (library); generated images are yours — https://raw.githubusercontent.com/qrohlf/trianglify/HEAD/Readme.md

- commercial: **conditions** (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.
  (https://raw.githubusercontent.com/qrohlf/trianglify/HEAD/Readme.md)
- attribution: **no** (No credit needed)
  > you own the copyright to the output image files which you create using Trianglify
  (https://raw.githubusercontent.com/qrohlf/trianglify/HEAD/Readme.md)
- in app: **conditions** (Ship inside your app 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.
  (https://raw.githubusercontent.com/qrohlf/trianglify/HEAD/Readme.md)
- redistribute: **conditions** (Pass the files on to your users only 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.
  (https://raw.githubusercontent.com/qrohlf/trianglify/HEAD/Readme.md)

## Rules to follow
- Shipping the JS library in a site/app requires a GPL-compatible open-source project (or a paid license)
- Generating images offline and shipping only the SVG/PNG is fine

## Can an AI agent use it by itself?
**Yes** · package: Agent installs a package or loads it from a CDN

## 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. (sign-in: none)
- Formats: svg, png, js
- Not allowed: GPLv3 copyleft if the library is bundled

## How to connect
- Package (npm/PyPI)
- npm: `npm install trianglify`
- Repository: https://github.com/qrohlf/trianglify
- Website: https://trianglify.io

## Numbers (AgentGid data)
- Gid Score: 20
- GitHub stars: 10,089
- Downloads last week: 1,028

## Lines to paste 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/)
```

## Links
- AgentGid page: https://agentgid.com/assets/trianglify/
- Is it free for commercial use? https://agentgid.com/assets/trianglify/commercial-use/
- Source: https://raw.githubusercontent.com/qrohlf/trianglify/HEAD/Readme.md
- Source: https://raw.githubusercontent.com/qrohlf/trianglify/HEAD/LICENSE


## 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 to 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: Make a matching share picture for each page, sized for link previews, and save it as a file when the site is built. (idea, not from the official pages)
- Placeholder covers for empty items: Give projects, playlists or courses without a cover picture a colorful background made from their name. (idea, not from the official pages)

### How to start
- Install the package, or for a quick test load the ready browser file.

```
npm install --save trianglify
```

- 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)
```

- To keep your own site closed source, make the images ahead of time and ship only the image files.

### 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.

### Good to know
- Putting the library itself into a closed-source site or app needs a paid license from the author. Making images ahead of time avoids this.
- The last release, 4.1.1, came out in November 2020. Pin that exact version.
- Without a seed you get a new random picture on every load. Set a seed when the picture must stay the same.
- The online playground at trianglify.io needs JavaScript; it is a place to try the settings before writing code.
- Very small triangle sizes can make drawing much slower.

Checked 2026-11-12 against: https://trianglify.io, https://github.com/qrohlf/trianglify, https://github.com/qrohlf/trianglify/blob/HEAD/Readme.md, https://github.com/qrohlf/trianglify/blob/HEAD/LICENSE, https://registry.npmjs.org/trianglify

### Mistakes to avoid
- Don't: Bundling trianglify into a closed-source site or app → Do: 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.)
- Don't: <script src='https://unpkg.com/trianglify@^4/dist/trianglify.bundle.js'> on a live page → Do: 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.)
- Don't: Leaving seed unset and expecting the same background on every load → Do: Pass a seed, for example the post title or the page slug (With seed null the generator uses fresh random values each time.)
- Don't: Expecting a plain npm install for a browser-only project to be light → Do: 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.)

### 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.

---
AgentGid's catalog is curated: every entry was checked against the maker's official pages (registry, repository, license and pricing pages) on the date shown; a license value shows the quote it stands on wherever AgentGid has one. Usage numbers come from AgentGid's own scan of public repositories set up for AI coding agents. Claims by makers are reported, not tested by AgentGid.
