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