pixelcanvas 0.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pixelcanvas-0.4.0/CHANGELOG.md +70 -0
- pixelcanvas-0.4.0/LICENSE +21 -0
- pixelcanvas-0.4.0/MANIFEST.in +9 -0
- pixelcanvas-0.4.0/PKG-INFO +110 -0
- pixelcanvas-0.4.0/README.md +281 -0
- pixelcanvas-0.4.0/docs/PYPI.md +70 -0
- pixelcanvas-0.4.0/pixelcanvas/__init__.py +77 -0
- pixelcanvas-0.4.0/pixelcanvas/_args.py +238 -0
- pixelcanvas-0.4.0/pixelcanvas/backdrop.py +2229 -0
- pixelcanvas-0.4.0/pixelcanvas/brush.py +78 -0
- pixelcanvas-0.4.0/pixelcanvas/canvas.py +590 -0
- pixelcanvas-0.4.0/pixelcanvas/catalog.py +3805 -0
- pixelcanvas-0.4.0/pixelcanvas/chart.py +2936 -0
- pixelcanvas-0.4.0/pixelcanvas/clay/__init__.py +58 -0
- pixelcanvas-0.4.0/pixelcanvas/clay/_manifest.py +75 -0
- pixelcanvas-0.4.0/pixelcanvas/clay/animal.py +209 -0
- pixelcanvas-0.4.0/pixelcanvas/clay/animal_build.py +783 -0
- pixelcanvas-0.4.0/pixelcanvas/clay/animal_rig.py +275 -0
- pixelcanvas-0.4.0/pixelcanvas/clay/character.py +1352 -0
- pixelcanvas-0.4.0/pixelcanvas/clay/face.py +288 -0
- pixelcanvas-0.4.0/pixelcanvas/clay/families.py +630 -0
- pixelcanvas-0.4.0/pixelcanvas/clay/hair.py +352 -0
- pixelcanvas-0.4.0/pixelcanvas/clay/markings.py +188 -0
- pixelcanvas-0.4.0/pixelcanvas/clay/props.py +486 -0
- pixelcanvas-0.4.0/pixelcanvas/clay/registry.py +185 -0
- pixelcanvas-0.4.0/pixelcanvas/clay/rig.py +367 -0
- pixelcanvas-0.4.0/pixelcanvas/clay/shapes.py +404 -0
- pixelcanvas-0.4.0/pixelcanvas/clay/species.py +424 -0
- pixelcanvas-0.4.0/pixelcanvas/clay/tables.py +173 -0
- pixelcanvas-0.4.0/pixelcanvas/cli.py +518 -0
- pixelcanvas-0.4.0/pixelcanvas/color.py +191 -0
- pixelcanvas-0.4.0/pixelcanvas/creature.py +4545 -0
- pixelcanvas-0.4.0/pixelcanvas/diagram.py +5232 -0
- pixelcanvas-0.4.0/pixelcanvas/drafting.py +4303 -0
- pixelcanvas-0.4.0/pixelcanvas/elements.py +3364 -0
- pixelcanvas-0.4.0/pixelcanvas/figure.py +3693 -0
- pixelcanvas-0.4.0/pixelcanvas/filters.py +313 -0
- pixelcanvas-0.4.0/pixelcanvas/flora.py +4528 -0
- pixelcanvas-0.4.0/pixelcanvas/form.py +2807 -0
- pixelcanvas-0.4.0/pixelcanvas/illustrate.py +1485 -0
- pixelcanvas-0.4.0/pixelcanvas/layers.py +759 -0
- pixelcanvas-0.4.0/pixelcanvas/layout.py +1141 -0
- pixelcanvas-0.4.0/pixelcanvas/manifest.py +4591 -0
- pixelcanvas-0.4.0/pixelcanvas/masks.py +155 -0
- pixelcanvas-0.4.0/pixelcanvas/mcp_server.py +634 -0
- pixelcanvas-0.4.0/pixelcanvas/noise.py +247 -0
- pixelcanvas-0.4.0/pixelcanvas/palette.py +762 -0
- pixelcanvas-0.4.0/pixelcanvas/pictograms/__init__.py +1075 -0
- pixelcanvas-0.4.0/pixelcanvas/pictograms/everyday.py +935 -0
- pixelcanvas-0.4.0/pixelcanvas/pictograms/kitchen_apps.py +245 -0
- pixelcanvas-0.4.0/pixelcanvas/pictograms/living.py +1080 -0
- pixelcanvas-0.4.0/pixelcanvas/pictograms/music_transport_buildings.py +995 -0
- pixelcanvas-0.4.0/pixelcanvas/pictograms/outdoor_home.py +223 -0
- pixelcanvas-0.4.0/pixelcanvas/pictograms/produce.py +158 -0
- pixelcanvas-0.4.0/pixelcanvas/pictograms/symbols.py +895 -0
- pixelcanvas-0.4.0/pixelcanvas/pictograms/tech_bio_story.py +307 -0
- pixelcanvas-0.4.0/pixelcanvas/reference.py +581 -0
- pixelcanvas-0.4.0/pixelcanvas/scenery.py +542 -0
- pixelcanvas-0.4.0/pixelcanvas/sdf.py +220 -0
- pixelcanvas-0.4.0/pixelcanvas/solid.py +5063 -0
- pixelcanvas-0.4.0/pixelcanvas/spec.py +5867 -0
- pixelcanvas-0.4.0/pixelcanvas/stylize.py +2502 -0
- pixelcanvas-0.4.0/pixelcanvas/text.py +3667 -0
- pixelcanvas-0.4.0/pixelcanvas/texture.py +2621 -0
- pixelcanvas-0.4.0/pixelcanvas/ui.py +6048 -0
- pixelcanvas-0.4.0/pixelcanvas/vector.py +2943 -0
- pixelcanvas-0.4.0/pixelcanvas/vision.py +597 -0
- pixelcanvas-0.4.0/pixelcanvas.egg-info/PKG-INFO +110 -0
- pixelcanvas-0.4.0/pixelcanvas.egg-info/SOURCES.txt +229 -0
- pixelcanvas-0.4.0/pixelcanvas.egg-info/dependency_links.txt +1 -0
- pixelcanvas-0.4.0/pixelcanvas.egg-info/entry_points.txt +2 -0
- pixelcanvas-0.4.0/pixelcanvas.egg-info/requires.txt +8 -0
- pixelcanvas-0.4.0/pixelcanvas.egg-info/top_level.txt +1 -0
- pixelcanvas-0.4.0/pyproject.toml +73 -0
- pixelcanvas-0.4.0/requirements.txt +7 -0
- pixelcanvas-0.4.0/scenes/__init__.py +0 -0
- pixelcanvas-0.4.0/scenes/_template_animals.py +65 -0
- pixelcanvas-0.4.0/scenes/_template_animation.py +60 -0
- pixelcanvas-0.4.0/scenes/_template_banner.py +63 -0
- pixelcanvas-0.4.0/scenes/_template_blank.py +45 -0
- pixelcanvas-0.4.0/scenes/_template_card.py +61 -0
- pixelcanvas-0.4.0/scenes/_template_characters.py +56 -0
- pixelcanvas-0.4.0/scenes/_template_chart.py +52 -0
- pixelcanvas-0.4.0/scenes/_template_comic.py +70 -0
- pixelcanvas-0.4.0/scenes/_template_dashboard.py +53 -0
- pixelcanvas-0.4.0/scenes/_template_diagram.py +59 -0
- pixelcanvas-0.4.0/scenes/_template_drawing.py +60 -0
- pixelcanvas-0.4.0/scenes/_template_figure.py +57 -0
- pixelcanvas-0.4.0/scenes/_template_floorplan.py +58 -0
- pixelcanvas-0.4.0/scenes/_template_icons.py +70 -0
- pixelcanvas-0.4.0/scenes/_template_illustration.py +68 -0
- pixelcanvas-0.4.0/scenes/_template_infographic.py +60 -0
- pixelcanvas-0.4.0/scenes/_template_interior.py +60 -0
- pixelcanvas-0.4.0/scenes/_template_isometric.py +58 -0
- pixelcanvas-0.4.0/scenes/_template_landscape.py +70 -0
- pixelcanvas-0.4.0/scenes/_template_nature.py +69 -0
- pixelcanvas-0.4.0/scenes/_template_people.py +66 -0
- pixelcanvas-0.4.0/scenes/_template_pets.py +57 -0
- pixelcanvas-0.4.0/scenes/_template_photo.py +58 -0
- pixelcanvas-0.4.0/scenes/_template_poster.py +57 -0
- pixelcanvas-0.4.0/scenes/_template_product.py +52 -0
- pixelcanvas-0.4.0/scenes/_template_scene3d.py +54 -0
- pixelcanvas-0.4.0/scenes/_template_still_life.py +62 -0
- pixelcanvas-0.4.0/scenes/_template_styled.py +57 -0
- pixelcanvas-0.4.0/scenes/_template_ui.py +59 -0
- pixelcanvas-0.4.0/scenes/_template_wallpaper.py +39 -0
- pixelcanvas-0.4.0/scenes/anim_campfire.py +132 -0
- pixelcanvas-0.4.0/scenes/aurora_lake.py +151 -0
- pixelcanvas-0.4.0/scenes/backdrop_mountain_dawn.py +36 -0
- pixelcanvas-0.4.0/scenes/backdrop_sheet.py +74 -0
- pixelcanvas-0.4.0/scenes/backdrop_wallpapers.py +87 -0
- pixelcanvas-0.4.0/scenes/chart_dashboard.py +86 -0
- pixelcanvas-0.4.0/scenes/chart_figure.py +77 -0
- pixelcanvas-0.4.0/scenes/chart_subscriptions.py +50 -0
- pixelcanvas-0.4.0/scenes/city_dusk.py +64 -0
- pixelcanvas-0.4.0/scenes/clay_campsite.py +69 -0
- pixelcanvas-0.4.0/scenes/clay_cast.py +82 -0
- pixelcanvas-0.4.0/scenes/clay_picnic.py +102 -0
- pixelcanvas-0.4.0/scenes/clay_stickers.py +67 -0
- pixelcanvas-0.4.0/scenes/clay_zoo.py +110 -0
- pixelcanvas-0.4.0/scenes/creature_meadow.py +102 -0
- pixelcanvas-0.4.0/scenes/creature_parade.py +106 -0
- pixelcanvas-0.4.0/scenes/diagram_architecture.py +73 -0
- pixelcanvas-0.4.0/scenes/diagram_explainer.py +88 -0
- pixelcanvas-0.4.0/scenes/diagram_flowchart.py +60 -0
- pixelcanvas-0.4.0/scenes/diagram_login_sequence.py +55 -0
- pixelcanvas-0.4.0/scenes/diagram_stone_lantern.py +63 -0
- pixelcanvas-0.4.0/scenes/drafting_apartment.py +111 -0
- pixelcanvas-0.4.0/scenes/drafting_bracket.py +128 -0
- pixelcanvas-0.4.0/scenes/drafting_floorplan.py +97 -0
- pixelcanvas-0.4.0/scenes/elements_campfire.py +106 -0
- pixelcanvas-0.4.0/scenes/elements_sheet.py +385 -0
- pixelcanvas-0.4.0/scenes/elements_storm.py +59 -0
- pixelcanvas-0.4.0/scenes/figure_cafe.py +129 -0
- pixelcanvas-0.4.0/scenes/figure_cast.py +73 -0
- pixelcanvas-0.4.0/scenes/flora_garden.py +149 -0
- pixelcanvas-0.4.0/scenes/flora_sheet.py +91 -0
- pixelcanvas-0.4.0/scenes/form_room.py +138 -0
- pixelcanvas-0.4.0/scenes/form_still_life.py +134 -0
- pixelcanvas-0.4.0/scenes/illustration_anime.py +107 -0
- pixelcanvas-0.4.0/scenes/illustration_chef.py +136 -0
- pixelcanvas-0.4.0/scenes/illustration_jazz.py +92 -0
- pixelcanvas-0.4.0/scenes/illustration_stickers.py +201 -0
- pixelcanvas-0.4.0/scenes/illustration_ukiyoe.py +123 -0
- pixelcanvas-0.4.0/scenes/layout_cafe_menu.py +51 -0
- pixelcanvas-0.4.0/scenes/layout_readme_banner.py +60 -0
- pixelcanvas-0.4.0/scenes/mountains_sunset.py +138 -0
- pixelcanvas-0.4.0/scenes/neon_poster.py +103 -0
- pixelcanvas-0.4.0/scenes/night_sky.py +63 -0
- pixelcanvas-0.4.0/scenes/palette_sheet.py +100 -0
- pixelcanvas-0.4.0/scenes/pictogram_sheet.py +122 -0
- pixelcanvas-0.4.0/scenes/poster_farmers_market.py +77 -0
- pixelcanvas-0.4.0/scenes/sea_sunset.py +72 -0
- pixelcanvas-0.4.0/scenes/solid_earbuds.py +41 -0
- pixelcanvas-0.4.0/scenes/solid_isometric.py +66 -0
- pixelcanvas-0.4.0/scenes/solid_product.py +52 -0
- pixelcanvas-0.4.0/scenes/solid_reading_nook.py +62 -0
- pixelcanvas-0.4.0/scenes/solid_toys.py +53 -0
- pixelcanvas-0.4.0/scenes/specs/animals.json +12 -0
- pixelcanvas-0.4.0/scenes/specs/card.json +14 -0
- pixelcanvas-0.4.0/scenes/specs/chart.json +11 -0
- pixelcanvas-0.4.0/scenes/specs/dashboard.json +16 -0
- pixelcanvas-0.4.0/scenes/specs/diagram.json +17 -0
- pixelcanvas-0.4.0/scenes/specs/icons.json +16 -0
- pixelcanvas-0.4.0/scenes/specs/landscape.json +11 -0
- pixelcanvas-0.4.0/scenes/specs/nature.json +13 -0
- pixelcanvas-0.4.0/scenes/specs/people.json +14 -0
- pixelcanvas-0.4.0/scenes/specs/poster.json +19 -0
- pixelcanvas-0.4.0/scenes/specs/room.json +20 -0
- pixelcanvas-0.4.0/scenes/specs/scene.json +13 -0
- pixelcanvas-0.4.0/scenes/specs/scene3d.json +16 -0
- pixelcanvas-0.4.0/scenes/specs/still_life.json +11 -0
- pixelcanvas-0.4.0/scenes/specs/ui.json +12 -0
- pixelcanvas-0.4.0/scenes/specs/wallpaper.json +12 -0
- pixelcanvas-0.4.0/scenes/still_life.py +115 -0
- pixelcanvas-0.4.0/scenes/style_showcase.py +69 -0
- pixelcanvas-0.4.0/scenes/texture_swatches.py +124 -0
- pixelcanvas-0.4.0/scenes/texture_wall.py +177 -0
- pixelcanvas-0.4.0/scenes/type_poster.py +121 -0
- pixelcanvas-0.4.0/scenes/type_specimen.py +146 -0
- pixelcanvas-0.4.0/scenes/ui_components.py +117 -0
- pixelcanvas-0.4.0/scenes/ui_landing.py +76 -0
- pixelcanvas-0.4.0/scenes/ui_landing_hero.py +47 -0
- pixelcanvas-0.4.0/scenes/ui_meditation.py +51 -0
- pixelcanvas-0.4.0/scenes/ui_mobile_app.py +116 -0
- pixelcanvas-0.4.0/scenes/vector_app_icons.py +32 -0
- pixelcanvas-0.4.0/scenes/vector_icons.py +71 -0
- pixelcanvas-0.4.0/setup.cfg +4 -0
- pixelcanvas-0.4.0/setup.py +11 -0
- pixelcanvas-0.4.0/skills/pixelcanvas/SKILL.md +179 -0
- pixelcanvas-0.4.0/skills/pixelcanvas/references/api.md +257 -0
- pixelcanvas-0.4.0/skills/pixelcanvas/references/backdrops.md +164 -0
- pixelcanvas-0.4.0/skills/pixelcanvas/references/catalog.md +77 -0
- pixelcanvas-0.4.0/skills/pixelcanvas/references/charts.md +185 -0
- pixelcanvas-0.4.0/skills/pixelcanvas/references/clay.md +220 -0
- pixelcanvas-0.4.0/skills/pixelcanvas/references/creatures.md +165 -0
- pixelcanvas-0.4.0/skills/pixelcanvas/references/diagrams.md +197 -0
- pixelcanvas-0.4.0/skills/pixelcanvas/references/drafting.md +232 -0
- pixelcanvas-0.4.0/skills/pixelcanvas/references/elements.md +204 -0
- pixelcanvas-0.4.0/skills/pixelcanvas/references/figures.md +161 -0
- pixelcanvas-0.4.0/skills/pixelcanvas/references/flora.md +192 -0
- pixelcanvas-0.4.0/skills/pixelcanvas/references/forms.md +214 -0
- pixelcanvas-0.4.0/skills/pixelcanvas/references/illustration.md +250 -0
- pixelcanvas-0.4.0/skills/pixelcanvas/references/pictograms.md +196 -0
- pixelcanvas-0.4.0/skills/pixelcanvas/references/reference.md +102 -0
- pixelcanvas-0.4.0/skills/pixelcanvas/references/review.md +250 -0
- pixelcanvas-0.4.0/skills/pixelcanvas/references/solid.md +233 -0
- pixelcanvas-0.4.0/skills/pixelcanvas/references/spec.md +158 -0
- pixelcanvas-0.4.0/skills/pixelcanvas/references/styles.md +242 -0
- pixelcanvas-0.4.0/skills/pixelcanvas/references/techniques.md +319 -0
- pixelcanvas-0.4.0/skills/pixelcanvas/references/textures.md +177 -0
- pixelcanvas-0.4.0/skills/pixelcanvas/references/typography.md +248 -0
- pixelcanvas-0.4.0/skills/pixelcanvas/references/ui.md +188 -0
- pixelcanvas-0.4.0/skills/pixelcanvas/references/vector.md +187 -0
- pixelcanvas-0.4.0/skills/pixelcanvas/scripts/bootstrap.py +307 -0
- pixelcanvas-0.4.0/skills/pixelcanvas-lite/SKILL.md +70 -0
- pixelcanvas-0.4.0/skills/pixelcanvas-lite/scripts/bootstrap.py +307 -0
- pixelcanvas-0.4.0/skills/pixelcanvas-lite/tools/compose.py +42 -0
- pixelcanvas-0.4.0/tools/build_gallery.py +152 -0
- pixelcanvas-0.4.0/tools/compose.py +464 -0
- pixelcanvas-0.4.0/tools/fonts.py +297 -0
- pixelcanvas-0.4.0/tools/install_skill.py +160 -0
- pixelcanvas-0.4.0/tools/kit.py +128 -0
- pixelcanvas-0.4.0/tools/layers.py +121 -0
- pixelcanvas-0.4.0/tools/look.py +783 -0
- pixelcanvas-0.4.0/tools/match.py +50 -0
- pixelcanvas-0.4.0/tools/new_scene.py +2380 -0
- pixelcanvas-0.4.0/tools/pc.py +24 -0
- pixelcanvas-0.4.0/tools/release_check.py +463 -0
- pixelcanvas-0.4.0/tools/render.py +1490 -0
- pixelcanvas-0.4.0/tools/styles.py +183 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.4.0 (2026-11-13)
|
|
4
|
+
|
|
5
|
+
Your agent now draws almost anything you can describe: illustrations, posters, dashboards, architecture diagrams,
|
|
6
|
+
floor plans, app screens, 3D product shots and clay characters. It designs the picture, draws it freehand in
|
|
7
|
+
Python with the kits as ingredients, checks it against your request and looks at it before handing it over.
|
|
8
|
+
|
|
9
|
+
First release on PyPI: `pip install pixelcanvas`, or `uvx pixelcanvas doctor` to try it without installing.
|
|
10
|
+
|
|
11
|
+

|
|
12
|
+
|
|
13
|
+
### What you can now draw
|
|
14
|
+
|
|
15
|
+
- **Freehand illustration**: `illustrate.Sketch` places shapes in fractions of the canvas, in nested local frames,
|
|
16
|
+
with blobs, tapered strokes, shading, highlights, outlines, glow, stickers and washes; `cv.draw()` adds a
|
|
17
|
+
supersampled Pillow layer.
|
|
18
|
+
- **Lit solids by default**: a photo, a 3D render or a request with no named style gets lit, shaded objects on a
|
|
19
|
+
receding ground (`Sketch.paint(spec=, shadow="ground")`, planar shading of polygon faces), without outlines.
|
|
20
|
+
- **Soft-cel and anime**: `Sketch.cel`, `sheen`, `eye`, `blush`, `ink`, `ramp` and `cel_tone`.
|
|
21
|
+
- **Posters, cards and type**: poster and card templates, themes, text effects and auto-fitting type in any
|
|
22
|
+
language; 57 one-call backdrops that keep a calm area for the title, and 60 palettes.
|
|
23
|
+
- **Charts and dashboards** (`chart`), **diagrams** with automatic layout (`diagram`: flowcharts, architecture,
|
|
24
|
+
trees, sequences, timelines, tables, callouts) and **UI screens** in device frames (`ui`), all also as SVG.
|
|
25
|
+
- **Engineering drawings and floor plans** (`drafting`): projected views, sections, dimensions, title blocks, walls,
|
|
26
|
+
doors and plan symbols, saved as PNG, SVG and DXF.
|
|
27
|
+
- **3D** (`solid`): numpy ray-marching with prefabs, materials, studio light, perspective and isometric cameras.
|
|
28
|
+
- **Clay characters** (`clay`): faces, 22 hair styles, 13 outfits, 15 expressions and 31 poses; 64 animal species in
|
|
29
|
+
15 poses; 33 props.
|
|
30
|
+
- **People and animals**: posed, dressed people with hands and faces (`figure`); 54 species with poses, gaits and
|
|
31
|
+
coats (`creature`).
|
|
32
|
+
- **Nature and materials**: trees, flowers and plants (`flora`); fire, smoke, water, weather, skies and light
|
|
33
|
+
(`elements`); 80 lit materials (`texture`); 2.5D objects and rooms with one light (`form`).
|
|
34
|
+
- **633 pictograms** in six styles (silhouette, duotone, line, shaded, sticker, cutout), also usable as masks.
|
|
35
|
+
- **43 art styles**, from oil and watercolour to ukiyo-e and risograph; `styles pick "REQUEST"` chooses one.
|
|
36
|
+
- **Text**: a list separator never starts or ends a line, and CJK lookup picks a font that covers the text.
|
|
37
|
+
|
|
38
|
+
### Tools
|
|
39
|
+
|
|
40
|
+
- `render SCENE --check` writes a check sheet and a report: image critique, a text audit, the objects drawn and
|
|
41
|
+
where, and the request checked item by item, ending with a FIX block that names what to change.
|
|
42
|
+
- The report names a missing thing only when the request clearly asks for it, counts a thing drawn under another
|
|
43
|
+
name, label or comment as present, and ends with "N requested items unconfirmed" or "every requested item is
|
|
44
|
+
confirmed - deliver".
|
|
45
|
+
- **Match a reference image** (#5): `match.py REF.png` prints a style sheet (palette with roles, lines, tone bands,
|
|
46
|
+
shadow shifts, highlights, paste-ready constants); `match.py REF.png DRAFT.png` lists the gaps, largest first;
|
|
47
|
+
`render --check --ref REF.png` adds them as a REFERENCE block.
|
|
48
|
+
- `kit find "REQUEST"` searches every kit at once and answers with one call per subject.
|
|
49
|
+
- `new NAME --prompt "REQUEST"` starts from the matching one of 30 starter templates, filled in for the request.
|
|
50
|
+
- Spec mode: `compose --example poster` writes a JSON spec and `compose SPEC.json --check` draws it, in 16 kinds
|
|
51
|
+
from posters to dashboards and 3D scenes. The new **pixelcanvas-lite** skill is built on it, so small local models
|
|
52
|
+
draw finished pictures too.
|
|
53
|
+
- `--layers` (PSD / ORA / PNG), `--svg` and `--dxf` on every render; `tools/build_gallery.py` rebuilds the gallery.
|
|
54
|
+
|
|
55
|
+
### Packaging
|
|
56
|
+
|
|
57
|
+
- `pip install pixelcanvas`, with a `pixelcanvas` command for every tool: `kit`, `new`, `render`, `compose`, `look`,
|
|
58
|
+
`match`, `styles`, `layers`, `fonts`, `install-skill`, `doctor`, `mcp`.
|
|
59
|
+
- `pixelcanvas install-skill` installs both skills for Claude Code, Codex, Cursor, opencode or any Agent Skills
|
|
60
|
+
tool, for one user or one project; `npx skills add treeleaves30760/pixelcanvas` works as before.
|
|
61
|
+
- Claude Code plugin: `/plugin marketplace add treeleaves30760/pixelcanvas`, then `/plugin install
|
|
62
|
+
pixelcanvas@pixelcanvas`.
|
|
63
|
+
- `pixelcanvas mcp` runs an MCP server with 11 tools and every reference page as a resource, for any MCP client.
|
|
64
|
+
- The skill's bootstrap finds or fetches the runtime by itself.
|
|
65
|
+
- CI runs the tests on Ubuntu, Windows and macOS with Python 3.9 and 3.13.
|
|
66
|
+
|
|
67
|
+
## 0.3.0 (2026-11-11)
|
|
68
|
+
|
|
69
|
+
Editable layers (PSD / ORA / PNG), media stylization, inspection views for vision models, typography and SDF
|
|
70
|
+
shapes; the skill installs with `npx skills add`.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 treeleaves30760
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
include LICENSE CHANGELOG.md README.md requirements.txt docs/PYPI.md
|
|
2
|
+
recursive-include tools *.py
|
|
3
|
+
recursive-include scenes *.py *.json
|
|
4
|
+
recursive-include skills *.md *.py *.json
|
|
5
|
+
prune gallery
|
|
6
|
+
prune outputs
|
|
7
|
+
prune tests
|
|
8
|
+
prune docs/images
|
|
9
|
+
global-exclude __pycache__ *.py[cod] ROOT.txt zz_*
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pixelcanvas
|
|
3
|
+
Version: 0.4.0
|
|
4
|
+
Summary: An agent skill and library that draws finished pictures with code: numpy + Pillow, no image model
|
|
5
|
+
Author: treeleaves30760
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/treeleaves30760/pixelcanvas
|
|
8
|
+
Project-URL: Repository, https://github.com/treeleaves30760/pixelcanvas
|
|
9
|
+
Project-URL: Issues, https://github.com/treeleaves30760/pixelcanvas/issues
|
|
10
|
+
Project-URL: Changelog, https://github.com/treeleaves30760/pixelcanvas/blob/main/CHANGELOG.md
|
|
11
|
+
Project-URL: Documentation, https://github.com/treeleaves30760/pixelcanvas#readme
|
|
12
|
+
Keywords: agent-skill,claude-code,codex,opencode,mcp,ai-agents,procedural-generation,image-generation,text-to-image,generative-art,numpy,pillow,poster,diagram,chart,svg,dxf,typography,psd,layers
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Environment :: Console
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: Intended Audience :: Science/Research
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
24
|
+
Classifier: Operating System :: OS Independent
|
|
25
|
+
Classifier: Topic :: Artistic Software
|
|
26
|
+
Classifier: Topic :: Multimedia :: Graphics
|
|
27
|
+
Classifier: Topic :: Multimedia :: Graphics :: 3D Rendering
|
|
28
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
29
|
+
Classifier: Topic :: Scientific/Engineering :: Visualization
|
|
30
|
+
Requires-Python: >=3.9
|
|
31
|
+
Description-Content-Type: text/markdown
|
|
32
|
+
License-File: LICENSE
|
|
33
|
+
Requires-Dist: numpy>=1.22
|
|
34
|
+
Requires-Dist: Pillow>=9.1
|
|
35
|
+
Provides-Extra: fast
|
|
36
|
+
Requires-Dist: scipy>=1.8; extra == "fast"
|
|
37
|
+
Provides-Extra: test
|
|
38
|
+
Requires-Dist: pytest; extra == "test"
|
|
39
|
+
Dynamic: license-file
|
|
40
|
+
|
|
41
|
+
# pixelcanvas
|
|
42
|
+
|
|
43
|
+
**Your coding agent draws finished pictures with code. No image model.**
|
|
44
|
+
|
|
45
|
+

|
|
46
|
+
|
|
47
|
+
pixelcanvas is an Agent Skill and a Python library. Claude Code, Codex, Cursor, opencode or any agent that can run
|
|
48
|
+
Python reads the skill, picks a kit for the request, writes a short scene file and renders it with numpy + Pillow.
|
|
49
|
+
Every picture is code: exact text in any language, editable layers, and a `--check` report that tells the agent what
|
|
50
|
+
to fix before it hands the picture over.
|
|
51
|
+
|
|
52
|
+
## What it draws
|
|
53
|
+
|
|
54
|
+
- **Posters, cards, banners and wallpapers** with strong typography, 57 backdrops, 60 palettes and 43 art styles
|
|
55
|
+
(oil, watercolour, ukiyo-e, risograph ...).
|
|
56
|
+
- **Diagrams, charts, dashboards and UI screens** with automatic layout, exported as PNG and SVG.
|
|
57
|
+
- **Technical drawings and floor plans**: views, sections, dimensions, exported as SVG and DXF.
|
|
58
|
+
- **3D scenes**: ray-marched prefabs, studio product shots, isometric rooms, and clay characters and animals in 31
|
|
59
|
+
poses and 64 species.
|
|
60
|
+
- **Illustration**: posed people, animals, trees and flowers, fire, water and skies, 80 lit materials and 633
|
|
61
|
+
pictograms.
|
|
62
|
+
|
|
63
|
+
## Install
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
pip install pixelcanvas
|
|
67
|
+
pixelcanvas doctor
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Or run it without installing: `uvx pixelcanvas doctor`.
|
|
71
|
+
|
|
72
|
+
Give the skill to your agent (Claude Code by default; also `agents`, `codex`, `cursor`, `opencode`):
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
pixelcanvas install-skill claude
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
This installs two skills: `pixelcanvas` (Python scenes, every kit) and `pixelcanvas-lite` (a small JSON spec, made
|
|
79
|
+
for small local models). Then ask your agent: *"draw me a poster for a jazz night"*.
|
|
80
|
+
|
|
81
|
+
The MCP server works with any MCP client: `pixelcanvas mcp`.
|
|
82
|
+
|
|
83
|
+
## A first picture in three commands
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
pixelcanvas compose --example poster > poster.json
|
|
87
|
+
pixelcanvas compose poster.json --check
|
|
88
|
+
pixelcanvas compose poster.json --deliver final/
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
The first command writes a complete poster spec (a title, a backdrop, three potted plants, the date and place), the
|
|
92
|
+
second draws a draft and reports what to fix, the third renders it full size into `final/poster.png`. Edit the JSON,
|
|
93
|
+
or ask your agent to, and run it again.
|
|
94
|
+
|
|
95
|
+
For any other picture your agent runs the same loop in Python:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
pixelcanvas kit find "a corgi sitting under an oak tree at sunset"
|
|
99
|
+
pixelcanvas new corgi --prompt "a corgi sitting under an oak tree at sunset"
|
|
100
|
+
pixelcanvas render corgi.py --scale 0.5 --check
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
`kit find` names the call for each subject of the request, `new` writes a starter scene for it, and `render --check`
|
|
104
|
+
draws a draft and prints what to improve. `pixelcanvas --help` lists every command.
|
|
105
|
+
|
|
106
|
+
## More
|
|
107
|
+
|
|
108
|
+
The gallery, the full documentation and every kit's reference page are on GitHub:
|
|
109
|
+
[github.com/treeleaves30760/pixelcanvas](https://github.com/treeleaves30760/pixelcanvas#readme).
|
|
110
|
+
Release notes: [CHANGELOG](https://github.com/treeleaves30760/pixelcanvas/blob/main/CHANGELOG.md).
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
# pixelcanvas
|
|
2
|
+
|
|
3
|
+
**Your coding agent draws finished pictures with code: posters, diagrams, dashboards, 3D scenes and
|
|
4
|
+
illustrations, with numpy + Pillow. No image model, no GPU, no API key.**
|
|
5
|
+
|
|
6
|
+

|
|
7
|
+
|
|
8
|
+
[](LICENSE)
|
|
9
|
+

|
|
10
|
+

|
|
11
|
+

|
|
12
|
+
|
|
13
|
+
[繁體中文](README-zh.md)
|
|
14
|
+
|
|
15
|
+
pixelcanvas is an **Agent Skill** and a **Python package**. Claude Code, Codex, opencode, Cursor, Gemini CLI or any
|
|
16
|
+
agent with a shell reads [`SKILL.md`](skills/pixelcanvas/SKILL.md), designs the picture, draws it in Python, runs a
|
|
17
|
+
check that names what to fix, and looks at the result before handing it over. Every picture is a short scene file:
|
|
18
|
+
exact text in any language, editable layers, SVG and DXF when you want them.
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npx skills add treeleaves30760/pixelcanvas
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Then ask: *"Make a bilingual poster for a piano night called NOCTURNE"*, *"Draw the architecture of our commerce
|
|
25
|
+
platform"*, *"An isometric reading nook with a cat on the armchair"*.
|
|
26
|
+
|
|
27
|
+
## What you can ask for
|
|
28
|
+
|
|
29
|
+
Every picture below was drawn by pixelcanvas from the request under it. The scene files are in [`scenes/`](scenes/).
|
|
30
|
+
|
|
31
|
+
**Posters, print and type**
|
|
32
|
+
|
|
33
|
+
| | | |
|
|
34
|
+
|---|---|---|
|
|
35
|
+
|  |  |  |
|
|
36
|
+
| *"A bilingual English and Traditional Chinese concert poster for 'NOCTURNE' with a moon, a 'one night only' seal, the date, venue and tickets"* | *"A flyer for a weekend farmers' market in Taipei: title 週末小農市集, illustrated vegetables, warm paper background"* | *"A poster for a jazz night called 'Blue Hour', Friday 21:00 at The Velvet Room, a saxophone, deep blue and gold"* |
|
|
37
|
+
|  |  |  |
|
|
38
|
+
| *"A café menu for 'Fika & Co.': Coffee, Tea, Pastries, five items each with prices, a coffee cup and a croissant, serif type on cream paper"* | *"A README banner for 'driftwood', a dotfiles tool: bold name, the tagline 'your shell, everywhere', a terminal with three commands"* | *"Twelve app icons for a productivity suite in one style: rounded tiles, soft gradients, long shadows, each labelled"* |
|
|
39
|
+
|
|
40
|
+
**Screens, charts and diagrams**
|
|
41
|
+
|
|
42
|
+
| | | |
|
|
43
|
+
|---|---|---|
|
|
44
|
+
|  |  |  |
|
|
45
|
+
| *"A meditation app home screen: 'Good evening, Sam', a breathing timer at 4:32, Sleep / Focus / Calm cards, a tab bar, dark purple theme"* | *"A landing page hero for Northwave: navigation, the headline 'Ship product updates your customers actually read', two buttons and a dashboard screenshot"* | *"An analytics dashboard for a subscription app: MRR, active users, churn and NPS tiles, revenue line, sign-ups by channel, plan mix donut"* |
|
|
46
|
+
|  |  |  |
|
|
47
|
+
| *"An architecture diagram of a commerce platform: clients, CDN and gateway, services, an event bus with workers, data stores. Dark theme, grouped by tier"* | *"A flowchart of a release pipeline from a merged pull request to production, with test, smoke-test and approval decisions and retry loops"* | *"A sequence diagram of a passkey sign-in between the user, browser, API, auth service and user database, with an alt frame for a failed signature"* |
|
|
48
|
+
|
|
49
|
+
**Engineering drawings and figures**
|
|
50
|
+
|
|
51
|
+
| | | |
|
|
52
|
+
|---|---|---|
|
|
53
|
+
|  |  |  |
|
|
54
|
+
| *"An A3 engineering drawing of an aluminium angle bracket: front, top, right and section views, an isometric view, dimensions and a title block"* | *"A floor plan of a two-bedroom apartment: doors with swings, windows, furniture, room names with areas, dimensions, a north arrow and a scale bar"* | *"A textbook figure of a Japanese stone lantern with callouts naming its parts from the jewel on top to the base, and its height"* |
|
|
55
|
+
|
|
56
|
+
**3D and clay characters**
|
|
57
|
+
|
|
58
|
+
| | | |
|
|
59
|
+
|---|---|---|
|
|
60
|
+
|  |  |  |
|
|
61
|
+
| *"An isometric cutaway of a cosy reading nook: armchair, floor lamp, a full bookshelf, a round rug, a cat on the armrest, rain outside"* | *"A clay hiker and her dog at a campsite at night: a glowing orange tent, a campfire with rising sparks, pines and the Milky Way"* | *"A product shot of white wireless earbuds in an open charging case on a pale pink seamless backdrop, soft studio light"* |
|
|
62
|
+
|  |  |  |
|
|
63
|
+
| *"Meet the cast: ten clay characters in a row, from an explorer to a superhero, each labelled"* | *"A field-guide sheet of thirty clay animals on little stands, each labelled"* | *"Toys on a checker floor: a car, a ball, a puppy, a waving kid, ABC blocks and a rocket"* |
|
|
64
|
+
|
|
65
|
+
**Illustration, nature and styles**
|
|
66
|
+
|
|
67
|
+
| | | |
|
|
68
|
+
|---|---|---|
|
|
69
|
+
|  |  |  |
|
|
70
|
+
| *"A great wave with Mount Fuji in the distance and two fishing boats, in the style of a ukiyo-e woodblock print"* | *"A sticker sheet of nine cute animals, each with a white die-cut border and a tiny label, on a pastel background"* | *"A campfire on the shore of a mountain lake at night, sparks rising, the moon reflected in the water"* |
|
|
71
|
+
|  |  |  |
|
|
72
|
+
| *"A wide banner: aurora over a mirror lake between pine forests, the title 'pixelcanvas'"* | *"The sun setting over a calm sea, its path of light on the waves"* | *"A studio still life on a marble board: a glass bottle, a terracotta mug, a glass sphere and a gold ball"* |
|
|
73
|
+
|  |  |  |
|
|
74
|
+
| *"The same landscape in twelve media"*: 43 named styles, from oil and watercolour to stained glass and blueprint | 633 pictograms in six styles, ready to place by name | *"A red and white lighthouse at dusk, titled 'Harbour Light'"*: the scene in the next section |
|
|
75
|
+
|
|
76
|
+
## Install
|
|
77
|
+
|
|
78
|
+
Pick the route that fits your agent; each one is a single step.
|
|
79
|
+
|
|
80
|
+
| Route | Command |
|
|
81
|
+
|---|---|
|
|
82
|
+
| Any Agent Skills tool (Claude Code, Codex, Cursor, Gemini CLI, opencode ...) | `npx skills add treeleaves30760/pixelcanvas` |
|
|
83
|
+
| Claude Code plugin | `/plugin marketplace add treeleaves30760/pixelcanvas` then `/plugin install pixelcanvas@pixelcanvas` |
|
|
84
|
+
| pip, then give the skills to your agent | `pip install pixelcanvas && pixelcanvas install-skill claude` (or `agents`, `codex`, `cursor`, `opencode`) |
|
|
85
|
+
| From a clone | `git clone https://github.com/treeleaves30760/pixelcanvas && cd pixelcanvas && pip install -r requirements.txt && python tools/install_skill.py` |
|
|
86
|
+
|
|
87
|
+
The skill installs a `scripts/bootstrap.py` that sets up the runtime on first use, so the first request just works.
|
|
88
|
+
`pixelcanvas doctor` checks Python, numpy, Pillow, fonts and write access; `uvx pixelcanvas doctor` runs it without
|
|
89
|
+
installing. Every option, per tool and per project: [docs/INSTALL.md](docs/INSTALL.md).
|
|
90
|
+
|
|
91
|
+
## How it works: plan, draw, check, look
|
|
92
|
+
|
|
93
|
+
**1. Plan.** The agent writes an inventory of the picture in the scene's docstring and copies the request into
|
|
94
|
+
`PROMPT`, word for word.
|
|
95
|
+
|
|
96
|
+
**2. Draw.** It writes the whole scene in one go. Shapes are placed in fractions of the canvas, and every
|
|
97
|
+
object comes out lit and shaded, with glow, soft-cel bands, outlines for flat and ink styles, and exact text built in:
|
|
98
|
+
|
|
99
|
+
```python
|
|
100
|
+
"""lighthouse: red and white, on a dark cliff at the right, lamp glowing, beam over the sea; title 'Harbour Light'"""
|
|
101
|
+
from pixelcanvas import Canvas
|
|
102
|
+
from pixelcanvas.illustrate import Sketch, paper, grade
|
|
103
|
+
PROMPT = "a red and white lighthouse at dusk, titled 'Harbour Light'"
|
|
104
|
+
DEFAULT_SIZE = (1600, 900)
|
|
105
|
+
|
|
106
|
+
def render(width=1600, height=900, seed=1, log=lambda step: None):
|
|
107
|
+
cv = Canvas(width, height)
|
|
108
|
+
sk = Sketch(cv, light=(-0.6, -0.4))
|
|
109
|
+
log("sky and sea")
|
|
110
|
+
cv.gradient([(0, "#1d2150"), (0.5, "#f29a72"), (0.6, "#6a78b0"), (1, "#1c2a55")])
|
|
111
|
+
sk.spot(0.3, 0.6, 0.25, 0.012, "#ffd9a8", 0.6) # light on the water
|
|
112
|
+
log("cliff")
|
|
113
|
+
sk.paint(sk.blob([(0.5, 1.05), (0.6, 0.72), (0.78, 0.64), (1.05, 0.62), (1.05, 1.05)]), "#3c3048", shade=0.5)
|
|
114
|
+
log("beam")
|
|
115
|
+
cv.paint("#fff1c4", sk.polygon([(0.81, 0.2), (0.0, 0.3), (0.0, 0.52)]), 0.25)
|
|
116
|
+
log("lighthouse")
|
|
117
|
+
with sk.at(0.81, 0.42, 0.44): # local frame: 1 unit = 0.44 of the height
|
|
118
|
+
sk.paint(sk.polygon([(-0.12, 0.45), (-0.08, -0.35), (0.08, -0.35), (0.12, 0.45)]), "#f4efe6",
|
|
119
|
+
shade=0.4, line=True, name="lighthouse")
|
|
120
|
+
for y in (-0.2, 0.1, 0.38):
|
|
121
|
+
sk.paint(sk.box(-0.118, y - 0.06, 0.118, y + 0.06), "#d2423c", shade=0.4)
|
|
122
|
+
sk.paint(sk.box(-0.07, -0.5, 0.07, -0.35, 0.02), "#ffe9a8", glow="#ffd27a")
|
|
123
|
+
sk.paint(sk.polygon([(-0.11, -0.5), (0, -0.64), (0.11, -0.5)]), "#d2423c", line=True)
|
|
124
|
+
log("title")
|
|
125
|
+
cv.text("Harbour Light", box=(0.06, 0.08, 0.56, 0.22), color="#fff4e0", font="serif", bold=True)
|
|
126
|
+
grade(paper(cv), "golden", 0.6)
|
|
127
|
+
return cv
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
**3. Check.** `python tools/render.py gallery/src/harbour_light.py --check` renders it and writes a report: image
|
|
131
|
+
critique, a text audit, every object and where it landed, and the request checked item by item. It ends with a
|
|
132
|
+
FIX block that names what to change, or clears the picture:
|
|
133
|
+
|
|
134
|
+
```text
|
|
135
|
+
PROMPT "a red and white lighthouse at dusk, titled 'Harbour Light'"
|
|
136
|
+
every quoted text is drawn
|
|
137
|
+
COVERAGE (subjects of the request and what answers to them):
|
|
138
|
+
all 1 subjects of the request are accounted for
|
|
139
|
+
AS REQUESTED (count, colour, place and text the request spells out, against the picture; ✗ names what to change):
|
|
140
|
+
lighthouse: 1 drawn, 1 requested ✓; red and white requested, white painted ✓
|
|
141
|
+
'Harbour Light': drawn ✓
|
|
142
|
+
FIX: nothing flagged - look at the picture once, then deliver
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
**4. Look.** The agent opens the PNG, and zooms in with `tools/look.py` (guides, zoom, value map, edges, probe)
|
|
146
|
+
where a detail needs a closer look. Here is the picture that scene draws:
|
|
147
|
+
|
|
148
|
+

|
|
149
|
+
|
|
150
|
+
For structured pictures the agent starts from a template instead of a blank file:
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
pixelcanvas kit find "a corgi sitting under an oak tree at sunset" # the call for each subject
|
|
154
|
+
pixelcanvas new corgi --prompt "a corgi sitting under an oak tree at sunset" --dir ./art
|
|
155
|
+
pixelcanvas render ./art/corgi.py --scale 0.5 --check
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
## Match a reference image
|
|
159
|
+
|
|
160
|
+
Hand the agent a picture and say "in this style". `match.py` reads the reference as numbers, the agent draws with
|
|
161
|
+
them, and the same tool lists what still differs, largest gap first.
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
python tools/match.py REF.png # style sheet: palette with roles, lines, tone bands, highlights
|
|
165
|
+
python tools/match.py REF.png DRAFT.png # the draft's gaps to the reference and one match figure
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
On the anime illustration in [`scenes/illustration_anime.py`](scenes/illustration_anime.py):
|
|
169
|
+
|
|
170
|
+
```text
|
|
171
|
+
roles: background #508fdd, skin #ef8987, line #5d313a, accent #a62250
|
|
172
|
+
lines: #5d313a (coloured), width 0.0037 of the height (~4 px at 1080)
|
|
173
|
+
shading by region (largest first):
|
|
174
|
+
#d1535e 11%: hard bands, 3 tones; shadow #b12854 = L -0.12, hue -13 deg; highlight band #f88f96 (L +0.17)
|
|
175
|
+
#fde3d4 5% (skin): hard bands, 3 tones; shadow #dabbb0 = L -0.12, hue -10 deg
|
|
176
|
+
PASTE (scene docstring / constants):
|
|
177
|
+
PALETTE = ["#508fdd", "#80b7ed", "#b8d4ec", "#f4efe9", "#d2555f", "#a62250", "#e89c2a", "#ef8987"]
|
|
178
|
+
LINE, LINE_WIDTH = "#5d313a", 0.0037 # sk.cel(..., line=LINE, line_width=LINE_WIDTH)
|
|
179
|
+
SHIFT, BANDS = (-0.119, -11.9), 2 # sk.cel(mask, base, bands=BANDS, shift=SHIFT)
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
A draft with purple hair against that reference:
|
|
183
|
+
|
|
184
|
+
```text
|
|
185
|
+
match 89/100 against the reference
|
|
186
|
+
1. [palette gap 0.17] palette distance 0.021 (OKLab) - use the reference colours: #d2555f (draft nearest #896eb3), #a62250 (draft nearest #664697), #ef8987 (draft nearest #e59c35)
|
|
187
|
+
2. [lines gap 0.26] line #372d3d width 0.0037 vs #5d313a width 0.0037 - line="#5d313a", line_width=0.0037
|
|
188
|
+
3. [contrast gap 0.35] value range 0.35-1.00 vs 0.49-1.00 - less contrast
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
Inside the render loop, `render.py SCENE --check --ref REF.png` (or `REFERENCE = "REF.png"` in the scene) adds the
|
|
192
|
+
same gaps as a REFERENCE block. The protocol: [reference.md](skills/pixelcanvas/references/reference.md).
|
|
193
|
+
|
|
194
|
+
## What is in the box
|
|
195
|
+
|
|
196
|
+
| Kit | Draws | Reference |
|
|
197
|
+
|---|---|---|
|
|
198
|
+
| `illustrate` | freehand drawing: `Sketch` shapes in fractions, local frames, blobs, tapered strokes, lit shading, soft-cel bands, sheen, eyes and blush, stickers, washes; `cv.draw()` gives a supersampled Pillow layer | [illustration.md](skills/pixelcanvas/references/illustration.md) |
|
|
199
|
+
| `reference` | match a reference image: style sheet, paste-ready constants, gaps of a draft (`tools/match.py`) | [reference.md](skills/pixelcanvas/references/reference.md) |
|
|
200
|
+
| `text`, `layout` | type in any language with CJK fallback, auto-fit, effects; poster and card templates, themes | [typography.md](skills/pixelcanvas/references/typography.md) |
|
|
201
|
+
| `chart` | charts, KPI tiles and whole dashboards | [charts.md](skills/pixelcanvas/references/charts.md) |
|
|
202
|
+
| `diagram` | flowcharts, architecture, trees, sequences, timelines, tables, callouts, with automatic layout | [diagrams.md](skills/pixelcanvas/references/diagrams.md) |
|
|
203
|
+
| `ui` | app and web screens in device frames, with auto layout | [ui.md](skills/pixelcanvas/references/ui.md) |
|
|
204
|
+
| `drafting` | engineering sheets (views, sections, dimensions, title blocks) and floor plans, to PNG, SVG and DXF | [drafting.md](skills/pixelcanvas/references/drafting.md) |
|
|
205
|
+
| `vector` | shapes, paths, icons and groups to raster and SVG | [vector.md](skills/pixelcanvas/references/vector.md) |
|
|
206
|
+
| `pictograms` | 633 pictograms in six styles, also usable as masks | [pictograms.md](skills/pixelcanvas/references/pictograms.md) |
|
|
207
|
+
| `solid` | numpy ray-marched 3D: prefabs, materials, studio light, perspective and isometric cameras | [solid.md](skills/pixelcanvas/references/solid.md) |
|
|
208
|
+
| `clay` | 3D clay characters in 31 poses, 64 animal species, props | [clay.md](skills/pixelcanvas/references/clay.md) |
|
|
209
|
+
| `figure`, `creature` | posed, dressed people and animals on a skeleton | [figures.md](skills/pixelcanvas/references/figures.md), [creatures.md](skills/pixelcanvas/references/creatures.md) |
|
|
210
|
+
| `flora`, `elements`, `scenery` | trees, flowers, fire, smoke, water, weather, skies, landscapes | [flora.md](skills/pixelcanvas/references/flora.md), [elements.md](skills/pixelcanvas/references/elements.md) |
|
|
211
|
+
| `texture`, `form` | 80 lit materials; 2.5D objects and rooms with one light | [textures.md](skills/pixelcanvas/references/textures.md), [forms.md](skills/pixelcanvas/references/forms.md) |
|
|
212
|
+
| `backdrop`, `palette` | one-call backgrounds and wallpapers that keep a calm area for text; named palettes | [backdrops.md](skills/pixelcanvas/references/backdrops.md) |
|
|
213
|
+
| `stylize` | 43 art styles, chosen from the request with `styles pick` | [styles.md](skills/pixelcanvas/references/styles.md) |
|
|
214
|
+
|
|
215
|
+
`pixelcanvas kit find "REQUEST"` searches every kit at once, and 30 starter templates (`pixelcanvas new --list`)
|
|
216
|
+
cover posters, charts, diagrams, UI, floor plans, product shots, people, pets and more.
|
|
217
|
+
|
|
218
|
+
## Small local models
|
|
219
|
+
|
|
220
|
+
A model running on your own machine draws through the **pixelcanvas-lite** skill: it writes one small JSON spec and
|
|
221
|
+
`compose` draws it through the kits, in 16 kinds from posters and wallpapers to dashboards, rooms and 3D scenes.
|
|
222
|
+
Every run ends with one `NEXT:` line that says what to do. No Python to write.
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
pixelcanvas install-skill opencode --skill pixelcanvas-lite
|
|
226
|
+
pixelcanvas compose --example poster > poster.json
|
|
227
|
+
pixelcanvas compose poster.json --check
|
|
228
|
+
pixelcanvas compose poster.json --deliver final/
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
The spec format: [spec.md](skills/pixelcanvas/references/spec.md).
|
|
232
|
+
|
|
233
|
+
## Editable layers, SVG and DXF
|
|
234
|
+
|
|
235
|
+
Every `log("step")` in a scene becomes a layer. `--layers` writes the picture as `SCENE.psd` (Photoshop, Photopea,
|
|
236
|
+
GIMP, Affinity), `SCENE.ora` (Krita, GIMP) and a folder of PNGs, so a person can move, hide or repaint any object.
|
|
237
|
+
`--svg` writes the vector drawings (diagrams, charts, UI, icons) as SVG, and `--dxf` writes drafting sheets for CAD.
|
|
238
|
+
|
|
239
|
+
```bash
|
|
240
|
+
python tools/render.py drafting_bracket --svg --dxf
|
|
241
|
+
python tools/render.py clay_campsite --layers
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
## MCP server
|
|
245
|
+
|
|
246
|
+
`pixelcanvas mcp` speaks the Model Context Protocol on stdin / stdout with 11 tools (`kinds`, `new_scene`,
|
|
247
|
+
`write_scene`, `read_scene`, `render`, `look`, `find`, `reference`, `ask`, `animate`, `layers`) and every reference
|
|
248
|
+
page as a resource.
|
|
249
|
+
|
|
250
|
+
```bash
|
|
251
|
+
claude mcp add --scope project pixelcanvas -- python -m pixelcanvas.mcp_server
|
|
252
|
+
codex mcp add pixelcanvas -- python -m pixelcanvas.mcp_server
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
Claude Desktop, Cursor and opencode configs: [docs/INSTALL.md](docs/INSTALL.md#as-an-mcp-server).
|
|
256
|
+
|
|
257
|
+
## Reference pages
|
|
258
|
+
|
|
259
|
+
- [SKILL.md](skills/pixelcanvas/SKILL.md): the loop, freehand drawing, checked pictures, art direction, the kit table
|
|
260
|
+
- [api.md](skills/pixelcanvas/references/api.md): the full API index
|
|
261
|
+
- [illustration.md](skills/pixelcanvas/references/illustration.md), [techniques.md](skills/pixelcanvas/references/techniques.md),
|
|
262
|
+
[typography.md](skills/pixelcanvas/references/typography.md), [review.md](skills/pixelcanvas/references/review.md)
|
|
263
|
+
- one page per kit in [`skills/pixelcanvas/references/`](skills/pixelcanvas/references/)
|
|
264
|
+
- [CHANGELOG.md](CHANGELOG.md): what is new in 0.4
|
|
265
|
+
|
|
266
|
+
## Contributing
|
|
267
|
+
|
|
268
|
+
Pictures, kits and fixes are welcome. [`CLAUDE.md`](CLAUDE.md) has the project map and the steps for a new kit (a
|
|
269
|
+
registry, strict options, manifest hooks, a reference page whose code blocks run, a starter template and an example
|
|
270
|
+
scene). Run the tests before a pull request:
|
|
271
|
+
|
|
272
|
+
```bash
|
|
273
|
+
pip install -r requirements.txt pytest
|
|
274
|
+
python -m pytest -q
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
`python tools/build_gallery.py` rebuilds this gallery from the scenes.
|
|
278
|
+
|
|
279
|
+
## Licence
|
|
280
|
+
|
|
281
|
+
MIT, see [LICENSE](LICENSE).
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# pixelcanvas
|
|
2
|
+
|
|
3
|
+
**Your coding agent draws finished pictures with code. No image model.**
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
pixelcanvas is an Agent Skill and a Python library. Claude Code, Codex, Cursor, opencode or any agent that can run
|
|
8
|
+
Python reads the skill, picks a kit for the request, writes a short scene file and renders it with numpy + Pillow.
|
|
9
|
+
Every picture is code: exact text in any language, editable layers, and a `--check` report that tells the agent what
|
|
10
|
+
to fix before it hands the picture over.
|
|
11
|
+
|
|
12
|
+
## What it draws
|
|
13
|
+
|
|
14
|
+
- **Posters, cards, banners and wallpapers** with strong typography, 57 backdrops, 60 palettes and 43 art styles
|
|
15
|
+
(oil, watercolour, ukiyo-e, risograph ...).
|
|
16
|
+
- **Diagrams, charts, dashboards and UI screens** with automatic layout, exported as PNG and SVG.
|
|
17
|
+
- **Technical drawings and floor plans**: views, sections, dimensions, exported as SVG and DXF.
|
|
18
|
+
- **3D scenes**: ray-marched prefabs, studio product shots, isometric rooms, and clay characters and animals in 31
|
|
19
|
+
poses and 64 species.
|
|
20
|
+
- **Illustration**: posed people, animals, trees and flowers, fire, water and skies, 80 lit materials and 633
|
|
21
|
+
pictograms.
|
|
22
|
+
|
|
23
|
+
## Install
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
pip install pixelcanvas
|
|
27
|
+
pixelcanvas doctor
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Or run it without installing: `uvx pixelcanvas doctor`.
|
|
31
|
+
|
|
32
|
+
Give the skill to your agent (Claude Code by default; also `agents`, `codex`, `cursor`, `opencode`):
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
pixelcanvas install-skill claude
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
This installs two skills: `pixelcanvas` (Python scenes, every kit) and `pixelcanvas-lite` (a small JSON spec, made
|
|
39
|
+
for small local models). Then ask your agent: *"draw me a poster for a jazz night"*.
|
|
40
|
+
|
|
41
|
+
The MCP server works with any MCP client: `pixelcanvas mcp`.
|
|
42
|
+
|
|
43
|
+
## A first picture in three commands
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
pixelcanvas compose --example poster > poster.json
|
|
47
|
+
pixelcanvas compose poster.json --check
|
|
48
|
+
pixelcanvas compose poster.json --deliver final/
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
The first command writes a complete poster spec (a title, a backdrop, three potted plants, the date and place), the
|
|
52
|
+
second draws a draft and reports what to fix, the third renders it full size into `final/poster.png`. Edit the JSON,
|
|
53
|
+
or ask your agent to, and run it again.
|
|
54
|
+
|
|
55
|
+
For any other picture your agent runs the same loop in Python:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
pixelcanvas kit find "a corgi sitting under an oak tree at sunset"
|
|
59
|
+
pixelcanvas new corgi --prompt "a corgi sitting under an oak tree at sunset"
|
|
60
|
+
pixelcanvas render corgi.py --scale 0.5 --check
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
`kit find` names the call for each subject of the request, `new` writes a starter scene for it, and `render --check`
|
|
64
|
+
draws a draft and prints what to improve. `pixelcanvas --help` lists every command.
|
|
65
|
+
|
|
66
|
+
## More
|
|
67
|
+
|
|
68
|
+
The gallery, the full documentation and every kit's reference page are on GitHub:
|
|
69
|
+
[github.com/treeleaves30760/pixelcanvas](https://github.com/treeleaves30760/pixelcanvas#readme).
|
|
70
|
+
Release notes: [CHANGELOG](https://github.com/treeleaves30760/pixelcanvas/blob/main/CHANGELOG.md).
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
"""
|
|
3
|
+
pixelcanvas — draw and retouch pictures with pixel-level computation (numpy + Pillow)
|
|
4
|
+
=====================================================================================
|
|
5
|
+
|
|
6
|
+
Three layers of API:
|
|
7
|
+
|
|
8
|
+
* Low level (``from pixelcanvas import *``): Canvas, noise, masks, brushes, blending, filters, colour, text.
|
|
9
|
+
Anything can be drawn from this layer.
|
|
10
|
+
* Freehand (``from pixelcanvas import Sketch, paper, grade``, module ``illustrate``): shapes in canvas fractions,
|
|
11
|
+
one-call shading / outline / shadow / glow, local frames for characters; ``cv.draw()`` is a supersampled Pillow
|
|
12
|
+
ImageDraw layer on the same canvas.
|
|
13
|
+
* Kits, loaded on first use (``from pixelcanvas import flora, elements, solid, diagram, chart, drafting, texture,
|
|
14
|
+
vector, layout, stylize, form, figure, creature, clay, pictograms, palette, backdrop, ui, spec, catalog``): one
|
|
15
|
+
call per subject — a tree, a campfire, a 3D mug, a flowchart, a chart, an engineering sheet, a material, a style.
|
|
16
|
+
* Landscape recipes (``from pixelcanvas.scenery import *``): Scene + sky / sun / clouds / mountains / mist / river /
|
|
17
|
+
trees / light rays / post-processing.
|
|
18
|
+
|
|
19
|
+
Every kit records what it drew in ``cv.manifest`` (see ``pixelcanvas.manifest``), so ``render.py --check`` can say
|
|
20
|
+
in plain text which objects are in the picture, where, and whether the request was met.
|
|
21
|
+
|
|
22
|
+
Conventions
|
|
23
|
+
-----------
|
|
24
|
+
* Coordinates: x right, y down; arrays ``arr[y, x]``; ``cv.xy()`` gives the (X, Y) pixel grids, ``cv.uv()`` 0~1 (U, V).
|
|
25
|
+
* Masks: float32 (H, W), 0 = untouched, 1 = fully painted.
|
|
26
|
+
* Colours: '#rrggbb' / (r, g, b) 0~1 / (255, 128, 0) / a full (H, W, 3) map; HDR values > 1 are allowed.
|
|
27
|
+
* Order: background (gradient) → far to near, each through its mask → post (bloom / soft_clip / contrast /
|
|
28
|
+
vignette) → save.
|
|
29
|
+
|
|
30
|
+
Minimal example
|
|
31
|
+
---------------
|
|
32
|
+
>>> from pixelcanvas import *
|
|
33
|
+
>>> cv = Canvas(640, 360)
|
|
34
|
+
>>> cv.gradient([(0, '#0b1a3a'), (1, '#f6c28f')]) # sky gradient
|
|
35
|
+
>>> X, Y = cv.xy()
|
|
36
|
+
>>> cv.glow(400, 200, 60, '#fff0c0', strength=1.2) # glow (HDR)
|
|
37
|
+
>>> ridge = 220 - 60 * fbm1d(640, 120, seed=1) # ridge line: one y per column
|
|
38
|
+
>>> cv.paint('#223344', clamp01(Y - ridge[None, :] + 0.5)) # below the ridge = mountain
|
|
39
|
+
>>> cv.put(10, 10, '#ff0000') # one pixel
|
|
40
|
+
>>> cv.soft_clip(0.8).save('demo.png', preview='demo_small.jpg')
|
|
41
|
+
"""
|
|
42
|
+
import importlib as _importlib
|
|
43
|
+
|
|
44
|
+
from . import color, noise, masks, brush, filters, text, sdf, vision, layers, manifest
|
|
45
|
+
from .color import * # noqa: F401,F403
|
|
46
|
+
from .noise import * # noqa: F401,F403
|
|
47
|
+
from .masks import * # noqa: F401,F403
|
|
48
|
+
from .brush import * # noqa: F401,F403
|
|
49
|
+
from .filters import * # noqa: F401,F403
|
|
50
|
+
from .text import * # noqa: F401,F403
|
|
51
|
+
from .canvas import Canvas
|
|
52
|
+
from . import illustrate
|
|
53
|
+
from .illustrate import Sketch, paper, grade, limit_palette, MOODS, grow, edge, signed_distance
|
|
54
|
+
|
|
55
|
+
__version__ = "0.4.0"
|
|
56
|
+
|
|
57
|
+
# heavy kits: imported on first attribute access (``pixelcanvas.flora`` / ``from pixelcanvas import flora``) and
|
|
58
|
+
# never star-imported, so names such as box / union / texture never shadow the 2D helpers above
|
|
59
|
+
_LAZY = ("stylize", "scenery", "vector", "diagram", "chart", "drafting", "solid", "texture", "elements", "flora",
|
|
60
|
+
"form", "figure", "creature", "layout", "clay", "pictograms", "palette", "backdrop", "ui", "spec", "catalog",
|
|
61
|
+
"cli", "mcp_server")
|
|
62
|
+
|
|
63
|
+
__all__ = ["Canvas", "__version__"] + color.__all__ + noise.__all__ + masks.__all__ + brush.__all__ + filters.__all__ \
|
|
64
|
+
+ text.__all__ + ["sdf", "vision", "layers", "stylize", "manifest", "illustrate", "Sketch", "paper", "grade",
|
|
65
|
+
"limit_palette", "MOODS", "grow", "edge", "signed_distance"]
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
def __getattr__(name):
|
|
69
|
+
if name in _LAZY:
|
|
70
|
+
mod = _importlib.import_module(f".{name}", __name__)
|
|
71
|
+
globals()[name] = mod
|
|
72
|
+
return mod
|
|
73
|
+
raise AttributeError(f"module 'pixelcanvas' has no attribute {name!r}")
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
def __dir__():
|
|
77
|
+
return sorted(set(globals()) | set(_LAZY))
|