Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
After-Effects Extendscript doesn't let you use the actual color picker ships with After-Effects. Using $.colorPicker() opens the OS color picker which sucks on windows. This method adds a temporary null to a comp, then uses the "Edit Value" command in order to launch the AE color picker. Once done, the function returns the data of the new color …
function GoodBoyNinjaColorPicker(startValue){
// find the active comp
var crntComp = app.project.activeItem;
if (!crntComp || !(crntComp instanceof CompItem)) {
alert("Please open a comp first");
return [];
// add a temp null;
var tempLayer = crntComp.layers.addShape();
var newColorControl = tempLayer("ADBE Effect Parade").addProperty("ADBE Color Control");
var theColorProp = newColorControl("ADBE Color Control-0001");
// set the value given by the function arguments
if (startValue && startValue.length == 3) {
// prepare to execute
var editValueID = 2240 // or app.findMenuCommandId("Edit Value...");
theColorProp.selected = true;
// harvest the result
var result = theColorProp.value;
// remove the null
if (tempLayer) {
return result;
// launch the true color picker with a white color
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment