How to change color of a Tint fx with $.colorPicker?


i have doest work. im trying make color picker script change color of tint fx value.

var defaultcolor = 0xff0000; var color = $.colorpicker(defaultcolor);   mypanel.grp.mybutton.onclick = function()   {     app.project.item(1).layer("dark gray solid 1").property("effects").property("tint").property("map black to").setvalue($.colorpicker)     } 

$colorpicker has hex input, , hex output.
you need convert result rgb:

 

var x = $.colorpicker(defaultcolor); var r = (x >> 16) & 255; var g = (x >> 8) & 255; var b = x & 255; var rgba = [r/255, g/255, b/255, 1]; thecolorproperty.setvalue(rgba); 

 

xavier



More discussions in After Effects Scripting


adobe

Comments

Popular posts from this blog

Reader DC

Adobe InDesign CC 2017 has stopped working

PDFMaker Office COM Addin will not stay enabled