How to Create a Dark Mode & Light Mode Adaptive Transparent Logo Animation
By the Charmotion team · Updated · How we write guides

Make two color versions of your logo, light artwork for dark backgrounds and dark artwork for light ones, then animate both with identical motion. Export each with a transparent background, switch between them by theme, and test both modes. WebM with VP9 alpha works in most desktop browsers; Safari needs its own check.
Key takeaways
- A dark mode adaptive transparent logo animation changes colors, not motion.
- Build both colorways from one source so shapes and timing match exactly.
- Use a transparent WebM with VP9 alpha for most browsers, and test Safari separately.
- Switch files with CSS on the web, or bind a theme property in one Rive file.
- Check edges, wordmark contrast and the loop on both backgrounds before publishing.
Already have a character or logo? See examples in real app screens: splash, onboarding, loading and empty-state screens, with the animation that plays in each.
What changes between dark mode and light mode?
A dark mode adaptive transparent logo animation keeps the same motion and changes only the colors of the mark. A black logo on white loses its shape on a dark page, and a white logo disappears on a white one. The fix is two color versions of one design with identical geometry and timing, so the switch looks like a recolor rather than a different animation.
This guide covers how to create a dark mode adaptive transparent logo animation, from the source files and the transparent export to the theme switch and the tests. It is written for logos, not characters. If you first need the basics of keeping transparency over page content, read how to put a transparent animation over content.
Three things usually change between themes:
- Fills of the symbol and the wordmark.
- Strokes or keylines, which often need a light color on dark pages.
- Accents and shadows, which may be dropped entirely on one theme.
Motion, timing, easing and the first and last frames stay the same in both versions.
How do you prepare two logo versions that match?
Start from a vector source (SVG or a layered file) when you have one. A flat PNG works too, but make it large enough to stay sharp at the size it will play. Keep the canvas size, padding and anchor points identical across both versions so the switch does not jump.
Create the dark-page version by changing colors only. The table shows the usual decisions.
| Element | Light page version | Dark page version |
|---|---|---|
| Symbol fill | Dark or brand color with strong contrast on white | Light or brand tint with strong contrast on dark |
| Wordmark | Dark text | Light text |
| Keyline (outline) | None, or a thin light halo | Thin dark halo, or none |
| Accent or glow | Subtle, or removed | Can be brighter, but must stay readable |
If one color can work on both pages, use a keyline: a thin outline in a contrasting color lets the same fill read on light and dark backgrounds. Test it at small sizes, because the outline can look heavy there.
A logo with no source files needs a clean cutout first. How to get an AI logo with a transparent background covers that step. Charmotion's Motion Studio can also turn a logo into a website hero or app launch animation: you get three free concepts, then 5 credits for the build of the one you pick. Plans are listed on the pricing page. Whatever tool you use, export both colorways from the same source so they stay matched.
Which transparent format works on dark and light pages?
Two formats cover most cases: a WebM file with an alpha channel for web pages, and a Rive file for logos that need to react at runtime. Each has a different limit.
A WebM file encoded with VP8 or VP9 can carry a per-pixel alpha channel, which lets the page show through the video. Google's Chrome team says Chrome 31 added alpha support for WebM. A Svgator guide says Chrome, Edge and Firefox show the alpha layer of a VP8 or VP9 WebM, while Safari ignores it. Reports differ on a few edge cases, so check your own file in every browser you support.
| Format | Where transparency shows | Best for |
|---|---|---|
| Transparent WebM (VP9 alpha) | Chrome, Edge and Firefox; Safari is reported to ignore alpha | A looping logo video on a web page |
| Rive file (.riv) | Drawn by the Rive runtime on the page or in the app | A logo that changes theme or state from code |
A .riv file bundles the artwork, state machines and data binding settings in one file that a website or mobile app loads directly. Rive's runtimes are open source and play any .riv file, so playback is free. The editor side is different: files made on the free plan cannot be exported as .riv, and free exports play a Rive splash screen. Read Rive pricing and commercial use before you plan a release.
If Safari visitors matter to you, do not rely on the WebM alone. Serve a second format or a static fallback to Safari, and test on a real device.
How do you export a transparent WebM with alpha?
Export each colorway from your editor with a transparent background, as a master file that keeps alpha. Then encode the WebM with FFmpeg's libvpx-vp9 encoder and an alpha-capable pixel format. A commonly shared command looks like this:
ffmpeg -i logo-light.mov -c:v libvpx-vp9 -pix_fmt yuva420p -auto-alt-ref 0 -b:v 2M logo-light.webmThree parts of that command matter:
- -pix_fmt yuva420p keeps the alpha channel. Without it, the transparent layer is discarded and replaced with a black or white background.
- -auto-alt-ref 0 turns off alternate reference frames. A community guide says enabled alt-ref frames can cause rendering glitches or strip the alpha channel.
- -c:v libvpx-vp9 selects the VP9 encoder. If your source is already a VP9 WebM with alpha, place this option before -i so FFmpeg decodes the alpha layer too.
If your FFmpeg build rejects a flag, check its encoder options with the help output for libvpx-vp9 before changing the command. After encoding, run the file through the transparent video checker, then view it on the page where it will run. A file that looks right in a standalone player is not proof that the embed will look right.
How do you switch the logo when the theme changes?
There are two practical routes: two video elements toggled by CSS, or one Rive file whose colors are bound to a theme value.
Route 1: two WebM files and CSS. This follows the visitor's operating system setting through prefers-color-scheme. Place both videos in the same container and let the stylesheet show one.
<div class='logo'>
<video class='logo-light' src='/logo-light.webm' autoplay muted loop playsinline></video>
<video class='logo-dark' src='/logo-dark.webm' autoplay muted loop playsinline></video>
</div>
<style>
.logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
.logo-light { display: none; }
.logo-dark { display: block; }
}
</style>If your site has its own theme toggle, set a class such as dark on the html element and write the same rules as .dark .logo-light and .dark .logo-dark. The logo then follows the switch your visitors actually use.
Route 2: one Rive file with a theme property. Rive's editor supports data binding, which can drive any property from live data in an app or game. Define the light and dark colors as bound properties inside the file, then have the app set the theme value when the user switches. You keep one file and one set of states. Rive's runtime API exposes data binding on web, React Native, Flutter, Apple, Android and Unity. For Flutter specifics, see how to add animation to a Flutter app.
Shipping that file in an app requires a paid plan. As of December 2026, Rive lists Cadet at $9 per seat per month with up to 3 seats, and its exports have no splash screen. Free-plan exports play a splash screen, so test that before a launch.
How do you test both modes before you publish?
Test the pair where visitors will see it. Check each colorway on a light and a dark background, at every size it will appear, including the smallest.
| Check | What to look for |
|---|---|
| Edges | No white or black fringe around the symbol on either background |
| Wordmark | Readable at the smallest size in both themes |
| Loop | The first and last frames line up, so there is no visible jump |
| Theme switch | The right file appears when the OS setting or the site toggle changes |
| Browsers | Chrome, Edge, Firefox and Safari, on desktop and on a phone |
| Reduced motion | The logo still reads as a clear static mark when motion is reduced |
Safari needs its own pass. The Svgator guide reports that Safari ignores WebM alpha, so if your audience uses it, serve a fallback and check on a real iPhone or Mac. For the motion side of the same check, read accessible animation and reduced motion.
How to create a dark mode adaptive transparent logo animation
- Prepare two colorways. Start from one vector or high-resolution source. Keep the canvas, padding and anchor points identical, then make a light-artwork version for dark pages and a dark-artwork version for light pages by changing colors only.
- Animate one master and copy the timing. Animate the master version, then apply the same keyframes, easing and frame count to the second colorway so both loops match exactly.
- Export transparent masters. Export each colorway with a transparent background from your editor as a master file that keeps alpha.
- Encode the WebM with alpha. Encode with FFmpeg using -c:v libvpx-vp9, -pix_fmt yuva420p and -auto-alt-ref 0, then run each file through a transparent video checker.
- Wire the theme switch. Show the matching video with prefers-color-scheme or a site class, or bind a theme value in one Rive file and set it from app code.
- Test on both backgrounds. Check edges, wordmark contrast, the loop seam, the theme switch, reduced motion, and Chrome, Edge, Firefox and Safari on desktop and phone.
Frequently asked questions
Can one transparent logo animation work on both dark and light backgrounds?
Sometimes. If the mark uses a mid-tone color with a contrasting keyline, such as a thin white or dark outline, one version can read on both. Test it on both backgrounds at small sizes. If the wordmark color is close to the background in either theme, make a second colorway instead.
Why does my transparent WebM show a black or white box?
The file was usually encoded without an alpha-capable pixel format. Encode with libvpx-vp9 and -pix_fmt yuva420p, which keeps the transparent layer. Also confirm the playing browser supports WebM alpha. Chrome, Edge and Firefox show it, while Safari is reported to ignore it, so give Safari a fallback.
Do I need a paid Rive plan to ship a theme-switching file?
Yes, for an app or product. Free-plan files cannot be exported as .riv for use in an app, and free exports play a Rive splash screen. As of December 2026, the Cadet plan is listed at $9 per seat per month, allows up to 3 seats and has no splash screen. Check Rive's pricing page before you ship.
Sources
- Rive pricing, Rive
- Rive Editor, Rive
- .riv file format and export limits, ICS Media
- Alpha transparency in Chrome video, Google Chrome
- What is a WebM file?, Svgator
- Process VP9 WebM video with alpha channel, Salivity (community guide)