Opus Motion ★ Star on GitHub

Product · colorway-swap

Colourway swap

A product cycles through a list of colourways: the image is recoloured (luminance tint, or the procedural speaker repaints), the backdrop disc and name follow, and a row of swatch chips highlights the active one.

A free, MIT-licensed product animation from the Opus Motion Library — 616 motions for Remotion, React and plain HTML.

Colourway swap: three frames of the product animation, start, middle and end
Colourway swap — start, middle and end of the 7.0-second motion.

What Colourway swap is for

Colour options for any product — phones, shoes, bottles, cars, apparel; pass your product image and a `colorways` list.

  • colorway
  • colour
  • color
  • variants
  • swatch
  • product
  • options
  • recolor
  • ecommerce
  • configurator

Details

Category
Product & e-commerce animations
Length
7.0 s (210 frames at 30 fps)
Formats
16:9, 1:1, 9:16
Weight
light
Transparent overlay
yes
Seamless loop
no
Text props
title
Colour props
background ink accent
Image props
src
Mood
photo
Roles
subject

Use Colourway swap in Remotion, React or HTML

Remotion project

terminal
# copy this motion into your Remotion project
node cli/mgl.mjs add colorway-swap --to ../my-app/src

# render an mp4 (run in the library folder)
node cli/mgl.mjs render colorway-swap --props '{"title":"Pick your colour","background":"#F3EFE7","ink":"#1B1B22","accent":"#1B1B22","src":""}'

# or export for apps / editors: mp4 | webm-alpha | prores-alpha | gif | png | poster
node cli/mgl.mjs export colorway-swap --as webm-alpha --props '{"title":"Pick your colour","background":"#F3EFE7","ink":"#1B1B22","accent":"#1B1B22","src":""}'

React / Next.js

tsx
import {MotionPlayer} from 'opus-motion-library/web';

<MotionPlayer
  motion="colorway-swap"
  props={{
    title: 'Pick your colour',
    background: '#F3EFE7',
    ink: '#1B1B22',
    accent: '#1B1B22',
    src: '',
  }}
  playOnView
  loop="auto"
/>

Plain HTML / WordPress

html
<script src="opus-motion.element.js" defer></script>

<opus-motion motion="colorway-swap"
  props='{"title":"Pick your colour","background":"#F3EFE7","ink":"#1B1B22","accent":"#1B1B22","src":""}'>
</opus-motion>

Compose spec (multi-scene video)

json
{
  "width": 1920,
  "height": 1080,
  "fps": 30,
  "scenes": [
    {
      "motion": "colorway-swap",
      "props": {
        "title": "Pick your colour",
        "background": "#F3EFE7",
        "ink": "#1B1B22",
        "accent": "#1B1B22",
        "src": ""
      }
    }
  ]
}

Colourway swap props

9 parameters — change any of them to make the motion yours.

PropDefaultWhat it does
title"Pick your colour"heading at the top (empty hides it)
colorways[{"name":"Midnight","color":"#2B2E3B"},{"name":"Coral","color":"#FF6A55"},{"name":"Lago…array of {name, color} (up to 8)
src""product image (public/ path or URL), tinted per colourway; empty draws a neutral speaker
background"#F3EFE7"backdrop colour or 'transparent'
ink"#1B1B22"text colour
accent"#1B1B22"active-swatch ring colour
hold34frames each colourway is held
swap14frames the colour blend takes
startAt16frame the cycle starts

Notes & credits

Technique sources:

  • original (round 3)