<Gradient>
A color gradient object. Gradients can have an arbitrary number of color stops. Gradient inherits from Image so you can use textures and animations, but not custom shapes.
Gradient attributes
Attribute | Description |
direction | Gradient direction |
from | Default start color |
to | Default end color |
Additionally, this asset type inherits all Image attributes.
direction [string]
Gradient direction. Default value is right.
Value |
"down" |
"left" |
"right" |
"up" |
Example:
direction = "left"
from [color]
Default start color. Setting this property is equivalent to setting a color stop at position 0.0.
Example:
from = "Red"
to [color]
Default end color. Setting this property is equivalent to setting a color stop at position 1.0.
Example:
from = "Red"
Valid child tags
Tag | Description |
<Stop> | Color animation stop |
<Stop>
Adds a color stop to the gradient. The position should be a value between 0.0 and 1.0, or 0% and 100%.
Attribute | Description | Type |
color | Color value | Color |
position | Stop position | Color |
Example:
<Stop color="blue" position="0.5"/>
Valid meta class values
Class | Description |
"actor" | Hint to editor that this object is a character/actor. |
Examples:
<Gradient name="My gradient" from="Green" to="Purple" />
<Gradient name="My gradient" color="Yellow">
<Stop color="Green" position="50%" />
<Stop color="Purple" position="100%" />
</Gradient>