# Pixel Canvas
> ⚠️ **Experimental — generated with no human supervision** by the daily MCP pipeline to exercise gno tooling. Not audited. See [r/moul/x/daily](https://github.com/moul/gno-contracts/blob/main/r/moul/x/daily/README.md).
---
A shared 16x16 canvas. Anyone can paint one cell at a time from a fixed 9-colour
palette, and the board renders in gnoweb as a grid of coloured blocks.
Painting is **last-write-wins** — that's the point of a shared canvas. Both
strokes still count toward the painter tallies, so overwriting someone doesn't
erase their contribution from the leaderboard.
```
Paint(x, y, colour) → colours a cell, returns the total stroke count
At(x, y) → the colour name of a cell ("white" when untouched)
PainterAt(x, y) → who last painted it ("" when untouched)
Strokes() → total paints ever
Palette() → the accepted colour names
/r/moul/x/daily/pixelcanvas/v0 → the canvas, palette and top painters
/r/moul/x/daily/pixelcanvas/v0:4,9 → who painted that cell, and what colour
```
Coordinates are 0-based with `(0,0)` at the **top-left**, and are `x` (column)
then `y` (row) — so `(3,7)` is column 3 of row 7. Colour names are matched
case- and space-insensitively.
Palette: `white`, `red`, `orange`, `yellow`, `green`, `blue`, `purple`,
`brown`, `black`.
The grid is a fixed `[Size*Size]int` of palette indices rather than a tree:
every cell exists from the start and the whole grid is walked on each render,
so an array is both simpler and cheaper than a sparse structure.
Only an EOA can paint (`IsUserCall`), so another realm can't spray the canvas
on a user's behalf.
Built for gno 0.9. Live on both testnets (agent address):
- sapphire — https://sapphire.testnets.gno.land/r/g12cs4cehujpffpjpywmkqj43m6u5ya53nj69sjz/pixelcanvas
- pearl — https://pearl.testnets.gno.land/r/g12cs4cehujpffpjpywmkqj43m6u5ya53nj69sjz/pixelcanvas
<!-- BEGIN GNOCONTRACTS FOOTER (generated by `make readmes`; do not edit below) -->
---
Part of **[moul/gno-contracts](https://github.com/moul/gno-contracts)** — moul's versioned gno.land contracts. See the repository for the full catalog, build/test tooling, and usage.
**Dependency graph:**

> 🧪 **Highly experimental — potentially vibe-coded.** Not audited; may break, change, or be removed at any time. Do not use with anything of value. Full disclaimer: [DISCLAIMER](https://github.com/moul/gno-contracts/blob/main/DISCLAIMER.md).
<!-- END GNOCONTRACTS FOOTER -->
At(x int, y int) string
Paint(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, x int, y int, colour string) int
PainterAt(x int, y int) string
Palette() string
Render(path string) string
Strokes() int
Signatures reconstructed verbatim from vm/qfuncs — interface params keep their inline definitions.
vm/qrender output, sanitized (docs/render-security.md) and displayed in an empty-sandbox iframe — scripts, forms and popups cannot run. Links stay inert in-preview; right-click to open.