Package-level declarations
Types
Splits a figure into zones by nearest prototype. Every ZoneSample is one prototype: the mean OKLab colour of the 3×3 pixels around the click, so a single noisy pixel cannot decide it. Every masked pixel then takes the zone of the prototype nearest to it, its lightness weighted as the ZoneSettings say; of prototypes equally near, the first wins.
The zone stage: one label map per frame of a clip by NearestZone, with the artist's strokes on top by ZoneBrush, cached under the frames, the masks and the ZoneSettings. Adding a sample or retuning the weight labels every frame again and touches nothing upstream.
A point the artist clicked: pixel (x, y) of frame of the clip, in working-frame pixels.
How a clip's figure is split into zones — skin, shirt, trousers — each shaded with one ramp; stored per clip in profile.json.
One stroke of the zone brush on frame of a clip: figure under a disc of radius pixels along points joins zone, whatever the nearest sample said. Strokes apply in the order painted.