Custom Command: Animate­Color

Alexander Martin

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:

PropertyTypeDefaultDescription
propertyStringcolorThe name of the property to set. Must be either color or backgroundColor.
componentIdStringSELFThe id of the component.
durationInteger400The duration of the animation (in milliseconds)
intervalInteger60The update interval (in milliseconds)
repeatCountInteger0Number of times to repeat. If set to -1, the animation will repeat forever.
fromArrayREQUIREDThe initial RGB value.
toArrayREQUIREDThe final RGB value.
DownloadOpen in Editor
2
0
Likes1
Share
Supported Viewport Profiles
  • Mobile Portrait, Small
  • Mobile Landscape, Medium
  • Mobile Landscape, Large
  • Hub Round
  • Hub Landscape, Small
  • Hub Landscape, Medium
  • Hub Landscape, Large
  • TV Fullscreen
Minimum required APL version1.4
Comments

Be the first to comment.