vary
A color lightened or darkened per cell by a shade factor, alpha untouched.
vary(color: PaintSlot, factor: PaintSlot): PatternPaint
Import patterns from shaders/std and use patterns.vary.
factor is the shade output of a lattice word: 1 keeps the color, above 1 brightens, below 1 darkens. Use it on the cell fill so every tile reads slightly different.
Parameters
| Name | Type | Notes |
|---|---|---|
color | PaintSlot | |
factor | PaintSlot |
Example
paint: strokeOver({fill: vary(p('cellColor'), field.shade), stroke: p('color'), mask: field.lines, space: p('colorSpace')})
See also
gridLines— Square grid lines drawn in acellFrame, plus a per-cell shade for the fill.hexLines— Honeycomb lines (pointy-top hexagons) drawn in acellFrame, plus a per-cell shade.brickCourses— A brick wall: staggered rows with mortar gaps, optional rotation and per-row drift.strokeOver— Two colors mixed through a mask:fillwhere the mask is 0,strokewhere it is 1.