# Canvas Render

> Change the offscreen renderer, palette recolor, z-position order, or magenta mask, and ask the user to check WebGL and the CPU fallback. Use when editing sources/canvas/, palette recolor, z-positions, or renderer output.

- Skill: `liberatedpixelcup/canvas-render` (Agent Skill)
- Install (CLI): `npx skillmds@latest add liberatedpixelcup/canvas-render`
- Raw SKILL.md: https://api.skillmd.com/api/skills/liberatedpixelcup/canvas-render/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: liberatedpixelcup (https://skillmd.com/u/liberatedpixelcup)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/liberatedpixelcup/canvas-render

---


# Canvas render

Palette recoloring is the only WebGL/CPU branch, in `recolorImage()` in
[`sources/canvas/palette-recolor.ts`](../../../sources/canvas/palette-recolor.ts).
The two implementations can disagree, and only one runs on a given machine.

You cannot confirm both paths. Ask the user to follow
[Force CPU Mode](../../../PALETTE_RECOLOR_GUIDE.md#force-cpu-mode-testing) and
[Visual Verification](../../../PALETTE_RECOLOR_GUIDE.md#visual-verification-steps):
`setPaletteRecolorMode("cpu")`, then `setPaletteRecolorMode("webgl")`, and
compare with `getPaletteRecolorStats()`.

Lower `zPos` draws first and ends up behind
([ARCHITECTURE.md](../../../ARCHITECTURE.md#render-path)). Magenta `#FF2CE6` is
keyed out in [`sources/canvas/mask.ts`](../../../sources/canvas/mask.ts).

ZIP export drawing and render timing (WebGL and CPU) are a separate check:
[performance-profiling](../performance-profiling/SKILL.md). Visual
correctness of both recolor paths is still this skill.

