Skip to content
Mitra/ labUnaudited · testnet

003 /Lab

DitherImage

Runtime ordered dithering on a canvas: cell size, pattern, curve, colour.

Runtime canvas · controls below
Dithered profile of a classical statue head
Pre-rendered at build time (pnpm brand:dither)

Props

PropTypeDefaultDescription
src / altstring–Image and accessible name. Empty alt marks it decorative.
cellSizenumber3One dither cell in CSS px.
patternbayer8 | bayer4 | halftonebayer8Threshold matrix.
curve{gamma, contrast, bias}{1, 1, 0}Threshold curve applied to brightness.
colourmono | green | green-deepmonoTwo-colour palette.
channelluma | stonelumastone = min(r,g,b): saturated green falls to dark.
focus{x,y}{.5,.5}Cover-fit focus point.
revealbooleanfalseResolve from dark on first paint. Skipped under reduced motion.