Color Layers
Script
Free
Layer Color Hot Pink
By Jack Vaughan
Updated 11/1/2025
About
Sets the timeline layer color of selected layers and all their children to hot pink. Useful for quickly organizing and visually grouping related layers in your timeline.
Code
// Layer color Hot Pink.js// Sets the timeline layer colour of selected layers (and all descendants) to Hot Pink.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 Hot Pink.");} else {var COLOR_INDEX = 14;for (var i = 0; i < selection.length; i++) applyRecursively(selection[i], COLOR_INDEX);console.log("\u2713 Set layer colour to Hot Pink for " + selection.length + " root layer(s) and their children.");}