Skip to content
Agents tracked: 506 Releases (7d): 634 Agent status: 4 with issuesSince last limit reset: Claude 15d · Codex 0d For AI agents: Markdown Updated Nov 26, 2026

p5.brush

by acamposuribe (GitHub)

MIT JavaScript library that adds pencil, charcoal, marker, watercolor-fill and hatching brushes to p5.js 2.x (or standalone WebGL2) for generative art and prints.

Illustrations Code libraryOpen source

GitHub repo
A watercolor sun and sea, a charcoal horizon, a hatched box outlined in pencil and a marker stroke, drawn in one setup() call.
Made by AgentGid with p5.brush 3.0.0 with p5.js 2.2.3 (jsDelivr), rendered in headless Chromium. MIT License; the picture is our own sketch drawn with the library, no files of the library are shown.

2. Commercial use: github.com/acamposuribe/p5.brush/blob/main/LICENSE.md

“to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software”

MIT; keep the license notice with copies of the code

github.com/acamposuribe/p5.brush/blob/main/LICENSE.md

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

p5.brush: pencil, ink and watercolor marks in code

p5.brush is a free drawing library that makes pictures drawn in code look hand-made: pencil and charcoal lines, marker and pen strokes, watercolor fills and hatching. It works on top of p5.js, or on its own in any modern browser, and it is made for generative art and large prints. You may use it in paid products under the MIT license.

Where you can use it

Hand-drawn look for generative art

Give a generative art piece the texture of real pencils, pens and charcoal instead of clean computer lines, for prints or online editions.

Watercolor fills for shapes

Fill circles, rectangles and free shapes with color that spreads, pools and dries like watercolor, so flat shapes look painted.

Shading with hatch lines

Shade areas with even rows of hatch lines at the angle and spacing you choose, like an ink drawing.

Strokes that bend along a flow

Make lines curve and wave on their own by turning on a built-in flow field such as waves, spiral or a gentle hand wobble.

Your own brushes

Design a new brush with its own texture and pressure in the online Brush Maker, then paste the generated code into the sketch.

Sketchy illustrations on a landing page Idea

Draw a hero illustration or section dividers in code with a pencil-and-watercolor look, instead of exporting static images.

p5.brush popularity

36 / 100
Gid Score, same scale as developer tools
1,501
GitHub stars
28.1K
npm downloads, last 7 days
+159.1% in 4 weeks
p5.brush: downloads per weeknpm, p5.brush 28,798
p5.brush: GitHub starsacamposuribe/p5.brush 1,501

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

How to start

Tell your AI assistant

“Add p5.brush 3.0.0 to my p5.js 2 sketch, use a WEBGL canvas, and draw a pencil line and a watercolor circle.”

Show codeStep 1 or Step 2

Load p5.js 2.x first, then p5.brush, in this order.

<script src="path_to/p5.min.js"></script>
<script src="path_to/p5.brush.js"></script>

Mistakes to avoid

Use it with p5.js 1.x or a default 2D canvas
Load p5.js 2.x and create the canvas with createCanvas(w, h, WEBGL)

The p5 build requires p5.js 2.x and a WEBGL canvas

Mix p5 calls such as push(), background() or randomSeed() into a standalone sketch
In the standalone build use brush.push(), brush.clear() and brush.seed(), and call brush.render() at the end of each frame

The two builds have different calls; mixing them breaks the sketch

Import p5.brush as a module and call brush functions in global mode
In instance mode call brush.instance(p) inside the sketch function before setup and draw

With p5 and p5.brush as modules, p5 runs in instance mode

Load p5.brush before p5.js
Put the p5.min.js script tag first, then p5.brush.js

The README gives this order

License

MIT license. License. You may use it in paid apps, client work and art for sale, and ship it inside your app; keep the copyright and license notice with copies of the code. No visible credit is needed.

Commercial use
Yes

“to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software” github.com/acamposuribe/p5.brush/blob/main/LICENSE.md

Credit
Not needed

“The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.” github.com/acamposuribe/p5.brush/blob/main/LICENSE.md

Inside your app or game
Can ship inside your app

“to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software” github.com/acamposuribe/p5.brush/blob/main/LICENSE.md

Pass the files on to your users
Allowed

“to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software” github.com/acamposuribe/p5.brush/blob/main/LICENSE.md

AI training
Not stated
Bots and bulk downloads
Not stated

AllowedWith conditionsNot allowedNot stated or not checked yet

Is p5.brush 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 p5.brush. Paste them into your prompt or AGENTS.md.

License rules
- p5.brush (Illustrations). MIT JavaScript library that adds pencil, charcoal, marker, watercolor-fill and hatching brushes to p5.js 2.x (or standalone WebGL2) for generative art and prints. Price: free; commercial use OK; no credit needed.
  Connect: npm p5.brush.
  Rule: Keep the MIT copyright and permission notice in copies of the code.
  Rule: Needs p5.js 2.x and a WEBGL canvas (or the standalone build in a WebGL2 browser).
  Rule: Install with npm install p5.brush (README).
  License: https://github.com/acamposuribe/p5.brush/blob/main/LICENSE.md (checked 2026-11-25; details: https://agentgid.com/assets/p5-brush/)
Can an agent use it by itself?
Yes.

Agent installs a package or loads it from a CDN.

Install
npm install p5.brush
API, key or account
Not needed. Everything runs on your side.
MCP server
None found
Credit line, if you want one
p5.brush, MIT License: keep the LICENSE notice with the code; no credit on screen is needed
This card for machines

Alternatives

p5.brush This page

Free Commercial OK npm

Paper Shaders

Ready moving gradients and grain textures for page backgrounds, without drawing anything yourself.

Free Commercial OK npm

Trianglify

Generated low-poly triangle backgrounds as SVG or PNG, a geometric look instead of a hand-drawn one.

Free With conditions npm

React Kawaii

Open source library of cute SVG illustrations delivered as React components.

Free Commercial OK npm

Free Gophers Pack

Pack of 100+ gopher characters, goroutines and illustrations about Go, in SVG and PNG with transparent background.

Free Commercial OK Download

Mega Doodles Pack

Over 160 hand-drawn doodle illustrations in SVG and PNG, such as clouds, stars, cats and rockets.

Free With conditions Download

All illustrations

Questions

Do I need p5.js?

For the main build, yes, p5.js 2.x with a WEBGL canvas. The standalone build works without p5.js in a browser with WebGL2.

Can I sell art or ship an app made with it?

Yes. It is under the MIT license; keep the license notice with copies of the code.

Can I make my own brush?

Yes. Add one with brush.add(), or design it in the online Brush Maker and paste the code it gives you.

Why does my p5.js 1.x sketch not work with it?

The library needs p5.js 2.x or higher.