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 newNull = crntComp.layers.addNull();
var newColorControl = newNull("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) {
theColorProp.setValue(startValue);
}
// prepare to execute
var editValueID = 2240 // or app.findMenuCommandId("Edit Value...");
theColorProp.selected = true;
app.executeCommand(editValueID);
// harvest the result
var result = theColorProp.value;
// remove the null
if (newNull) {
newNull.remove();
}
return result;
}
// launch the true color picker with a white color
alert(GoodBoyNinjaColorPicker([1,1,1]));
This seem to do the trick. Could use some more error checking, also it takes an array of size 3 for the default value and returns an array of size 4 cause the harvested color has an alpha channel. If somebody wants to use it and make it feel even nicer you could make the new null a shy and turn on shy layers for the comp (but don't just turn it off later because the user could have it on to begin with, instead store the original state and revert to it).
Hope it helps someone.
Bye!