Color Layers
Script
Free
Layer Color Green Mist
By Jack Vaughan
Updated 11/1/2025
About
Sets the timeline layer color of selected layers and all their children to green mist. Useful for quickly organizing and visually grouping related layers in your timeline.
Code
// Layer color Green Mist.js// Sets the timeline layer colour of selected layers (and all descendants) to Green Mist.var setColorId = function(nodeId, colorIndex) {try { api.set(nodeId, { colorId: colorIndex }); return true; } catch (e) {}try { api.set(nodeId, { "attributes.colorId": colorIndex }); return true; } catch (_) {}return false;};var getChildrenSafe = function(nodeId) {try { var kids = api.getChildren(nodeId) || []; return kids.slice(); } catch (_) { return []; }};var applyRecursively = function(nodeId, colorIndex) {setColorId(nodeId, colorIndex);var children = getChildrenSafe(nodeId);for (var i = 0; i < children.length; i++) applyRecursively(children[i], colorIndex);};var selection = api.getSelection();if (!selection || !selection.length) {console.warn("Select layer(s) to set layer colour to Green Mist.");} else {var COLOR_INDEX = 3;for (var i = 0; i < selection.length; i++) applyRecursively(selection[i], COLOR_INDEX);console.log("\u2713 Set layer colour to Green Mist for " + selection.length + " root layer(s) and their children.");}