Assign Colors

Uniquely sets the fill and/or stroke style of every vector element to individual colors sampled along a chosen gradient.

Interface

Inputs

ParameterDetailsPossible Types
Content

The content with vector paths to apply the fill and/or stroke style to.

Primary Input

Table<Graphic>
Table<Vector>
Fill

Whether to style the fill.

Default: true

bool
Stroke

Whether to style the stroke.

Default: false

bool
Gradient

The range of colors to select from.

Default: Table { element: [GradientStops { position: [0.0, 1.0], midpoint: [0.5, 0.5], color: [Color { red: 0.0, green: 0.0, blue: 0.0, alpha: 1.0 }, Color { red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0 }] }], transform: [DAffine2 { matrix2: DMat2 { x_axis: DVec2(1.0, 0.0), y_axis: DVec2(0.0, 1.0) }, translation: DVec2(0.0, 0.0) }], alpha_blending: [AlphaBlending { blend_mode: Normal, opacity: 1.0, fill: 1.0, clip: false }], source_node_id: [None] }

Table<GradientStops>
Reverse

Whether to reverse the gradient.

Default: false

bool
Randomize

Whether to randomize the color selection for each element from throughout the gradient.

Default: false

bool
Seed

The seed used for randomization.

Seed to determine unique variations on the randomized color selection.

Default: 0

u32
Repeat Every

The number of elements to span across the gradient before repeating. A 0 value will span the entire gradient once.

Default: 0

u32

Outputs

ProductDetailsPossible Types
Result

The value produced by the node operation.

Primary Output

Table<Graphic>
Table<Vector>