mixOf

A straight blend from one value to another by an amount from 0 to 1.

mixOf(from: PaintSlot, to: PaintSlot, amount: PaintSlot): PatternPaint

Import patterns from shaders/std and use patterns.mixOf.

Works on colors, RGB and single numbers alike, channel by channel with no color-space handling. For a color mix in a chosen color space use strokeOver.

Parameters

NameTypeNotes
fromPaintSlot
toPaintSlot
amountPaintSlot

Example

mixOf(alphaOf(p('colorA')), alphaOf(p('colorB')), bands)

See also

  • strokeOver — Two colors mixed through a mask: fill where the mask is 0, stroke where it is 1.
  • times — The product of two values: a mask scaled by a prop, an RGB dimmed by a shade, two masks combined.

Used by

Chevron, IsometricCubes