Recolour a Lottie animation to match a brand without opening After Effects and without uploading it anywhere. Drop in a .json or .lottie and every editable colour is found — fills, strokes, gradient stops and solid layers, however deep they sit inside nested shape groups or precomps. The palette lists each distinct colour with how many times it is used, so changing the one that appears eleven times recolours all eleven at once, which is what rebranding an animation actually means in practice. Animated colours are handled properly too: if a fill changes colour over time, each keyframe is listed separately, because editing only the first is the classic mistake that leaves the colour snapping back partway through playback. Scrub the timeline, change the preview background, undo, and download the edited JSON. The file is parsed and rewritten entirely in your browser, which matters when the animation came from a client or a paid marketplace.
| Element | Stored as |
|---|---|
| Fill | `c.k` — three or four 0-1 channels |
| Stroke | `c.k` on the stroke item |
| Gradient | One flat array: position, r, g, b, repeated |
| Solid layer | `sc` — a plain hex string, not channels |
| Animated colour | `c.k` as a list of keyframes, one colour each |
| Nested group | `it` — shapes within shapes, any depth |
| Precomp | `assets[].layers[]` rather than top-level layers |
No. It is parsed, edited and re-serialised in your browser. That matters here specifically — Lottie files are routinely client work or paid marketplace purchases, and the usual alternative is uploading proprietary artwork to someone else's server.
Yes. A gradient's stops live in one flat array of positions and colour channels, and each stop is listed and editable separately. The stop count comes from the file's own declaration rather than the array length, because opacity stops are appended to the same array and would otherwise be mistaken for colours.
Each keyframe is listed as its own entry, labelled with its frame. Recolouring only the first keyframe is the usual mistake and produces an animation whose colour snaps back midway — listing them individually makes that impossible to do by accident.
Yes. A .lottie is a zip container, so it is unpacked in the browser and the animation inside is loaded. Download is as .json.
Because the count is of editable colour properties, not shapes. One visible shape can contribute a fill and a stroke, and an animated colour contributes one entry per keyframe. The count tells you how many places a change will land.
No. It is there so you can judge colours against light or dark, and is never written into the JSON. If you need a background baked in, add a solid layer in your animation tool.
Yes — only colour values are changed, and the structure is re-serialised exactly as it came in. Embedded image assets, expressions and layer structure are left untouched.
A Lottie file is Bodymovin's JSON dump of an After Effects composition, and its colours are not in one place. Fills sit under a shape's `c.k`, strokes under theirs, gradients as a single flat array of position and channel values with the stop count carried separately in `p`, and solid layers as a plain hex string in `sc` rather than as channels at all. Any of those may be nested several shape groups deep, or live inside a precomp under `assets` rather than in `layers`. Each may also be animated, in which case `c.k` holds a list of keyframe objects instead of channels. This walks all of it and returns one editable node per colour, including one per keyframe of an animated property — recolouring only the first keyframe is the classic mistake, and it makes the colour snap back partway through playback. Gradient stops are read using the declared stop count rather than the array length, because opacity stops are appended to the same array and counting them as colour invents stops that do not exist. Channels are 0-1 floats, so conversion to and from hex rounds rather than truncates, and any existing alpha channel is preserved on write. Edits are applied with a path-based setter that clones only the objects along the route to the changed value, leaving every untouched branch shared: a Lottie can be several megabytes, and deep-cloning the whole animation on each drag of a colour picker is what makes editors of this kind lag. lottie-web has no API for swapping a colour in place, so the player is rebuilt per edit — and handed a clone, because it mutates the object it is given, which would otherwise corrupt the copy being serialised for download. Everything runs in the page.