Style
RadialGradient
A fill that blends colors from an inner circle to an outer one.
Object type style pins
A RadialGradient blends its stops from an inner circle (innerCenter,
innerRadius; offset 0) to an outer circle (outerCenter, outerRadius;
offset 1). Inside the inner circle and outside the outer one, the first and
last stop's colors continue.
Hierarchy
- Parents
Paint- Subtypes
- None
Properties
| Name | Type | Notes |
|---|---|---|
| innerCenter | Point | |
| innerRadius | number | |
| outerCenter | Point | |
| outerRadius | number | |
| stops | Array<ColorStop> |
Nodes
Break RadialGradient
Node id break/RadialGradient
Inputs
| Name | Type | Default | Notes |
|---|---|---|---|
| object | RadialGradient | type default |
Outputs
Make RadialGradient
Node id make/RadialGradient
Inputs
| Name | Type | Default | Notes |
|---|---|---|---|
| innerCenter | Point | { x: 0, y: 0 } | |
| innerRadius | number | 0 | |
| outerCenter | Point | { x: 0, y: 0 } | |
| outerRadius | number | 50 | |
| stops | Array<ColorStop> | [{ offset: 0, color: { r: 0, g: 0, b: 0, a: 1 } }, { offset: 1, color: { r: 255, g: 255, b: 255, a: 1 } }] |
Outputs
| Name | Type | Notes |
|---|---|---|
| object | RadialGradient |
Set RadialGradient
Node id set/RadialGradient
Inputs
| Name | Type | Default | Notes |
|---|---|---|---|
| object | RadialGradient | type default | |
| innerCenter | Point | — | |
| innerRadius | number | — | |
| outerCenter | Point | — | |
| outerRadius | number | — | |
| stops | Array<ColorStop> | — |
Outputs
| Name | Type | Notes |
|---|---|---|
| object | RadialGradient |
Lerp RadialGradient
Node id lerp/RadialGradient
Inputs
| Name | Type | Default | Notes |
|---|---|---|---|
| a | RadialGradient | type default | |
| b | RadialGradient | type default | |
| t | number | 0.5 |
Outputs
| Name | Type | Notes |
|---|---|---|
| result | RadialGradient |
Notes
- Shape units. Centers and radii are in the shape's own units, before its position, rotation and scale, so the gradient moves, turns and scales with the shape. (0, 0) is the shape's position.
- Default. Make RadialGradient is a disc of radius 50 around (0, 0): inner radius 0, outer radius 50, black at the center to white at the edge.
- Off-center light. Moving the inner circle away from the outer one's center gives a highlight off to one side.
- Radii can't be negative: that's a node error on the Make or Set node.
- Stops. An array of ColorStops, as for LinearGradient. If both circles are the same, 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 RadialGradient blends both centers, both radii 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.
Related types
- LinearGradient, ColorStop and Paint.
- A glowing ball in a gradient frame, a worked example.