Style

LinearGradient

A fill that blends colors along a line.

Object type style pins

A LinearGradient blends its stops along the line from start to end. Across that line, the color stays the same. Before the start and after the end, the first and last stop's colors continue.

Hierarchy

Parents
Paint
Subtypes
None

Properties

NameTypeNotes
startPoint
endPoint
stopsArray<ColorStop>

Nodes

Break LinearGradient

Node id break/LinearGradient

Inputs

NameTypeDefaultNotes
objectLinearGradienttype default

Outputs

NameTypeNotes
startPoint
endPoint
stopsArray<ColorStop>

Make LinearGradient

Node id make/LinearGradient

Inputs

NameTypeDefaultNotes
startPoint{ x: -50, y: 0 }
endPoint{ x: 50, y: 0 }
stopsArray<ColorStop>[{ offset: 0, color: { r: 0, g: 0, b: 0, a: 1 } }, { offset: 1, color: { r: 255, g: 255, b: 255, a: 1 } }]

Outputs

NameTypeNotes
objectLinearGradient

Set LinearGradient

Node id set/LinearGradient

Inputs

NameTypeDefaultNotes
objectLinearGradienttype default
startPoint—
endPoint—
stopsArray<ColorStop>—

Outputs

NameTypeNotes
objectLinearGradient

Lerp LinearGradient

Node id lerp/LinearGradient

Inputs

NameTypeDefaultNotes
aLinearGradienttype default
bLinearGradienttype default
tnumber0.5

Outputs

NameTypeNotes
resultLinearGradient

Notes

  • Shape units. start and end are in the shape's own units, before its position, rotation and scale (like a Polygon's vertices), so the gradient moves, turns and scales with the shape. (0, 0) is the shape's position: the center of a Circle or a Rectangle.
  • Default. Make LinearGradient goes from (−50, 0) to (50, 0), black to white: across a shape 100 wide, centered.
  • Stops. An array of ColorStops, read in offset order. Stops at the same offset make a hard edge, and a single stop is a flat color. A gradient with no stops is a node error.
  • Spanning nothing. If start and end are the same point, the shape is filled with the last stop's color.
  • Used as a Shape's fill or a Stroke's color (a Paint).

Lerp

Lerp LinearGradient blends start, end and the stops, pairwise in offset order (offset and color). That needs as many stops on both sides: with different counts the result is a copy of a below t = 0.5 and of b from 0.5 on. t is clamped to 0, 1.

© 2026 Wirepaint