This custom command allows a transition between two RGB values of the properties "color" and "backgroundColor".
Just copy the "AnimateColor" command into your APL document and use it like this:
{
"type": "Text",
"text": "MyText",
"id": "myTextId",
"onMount": [
{
"type": "AnimateColor",
"componentId": "myTextId",
"from": [255, 255, 255],
"to": [0, 176, 230]
}
]
}
AnimateColor supports the following properties:
Property | Type | Default | Description |
---|
property | String | color | The name of the property to set. Must be either color or backgroundColor. |
componentId | String | SELF | The id of the component. |
duration | Integer | 400 | The duration of the animation (in milliseconds) |
interval | Integer | 60 | The update interval (in milliseconds) |
repeatCount | Integer | 0 | Number of times to repeat. If set to -1, the animation will repeat forever. |
from | Array | REQUIRED | The initial RGB value. |
to | Array | REQUIRED | The final RGB value. |