alphaOf

The alpha channel of a color, as a number per pixel.

alphaOf(color: PaintSlot): PatternPaint

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

Parameters

NameTypeNotes
colorPaintSlot

Example

paint: withAlpha(streakColor, times(alphaOf(streakColor), streaks.mask))

See also

  • rgbOf — The RGB channels of a color, without its alpha.
  • withAlpha — A color with its alpha replaced by a separately built mask.

Used by

Chevron, FallingLines