Copy link to clipboard
Copied
I accidentally asked this question in the wrong forum.
So is it possible to call the colorpicker from CS2 using JavaScript or let the user pick a colour mid script, as it were?
However most answers require CS5 and above.
Copy link to clipboard
Copied
Not sure if this will work, but worth a try.
Should change the background colour to the selected one.
var colour = new SolidColor();
colour.rgb.hexValue = getHexColor();
app.backgroundColor = colour;
function getHexColor(){
var result = $.colorPicker( -1 ).toString(16);
if (result != -1){
result = '00000'.substring( 0, 6 - result.length ) + result;
}
return result;
};
Copy link to clipboard
Copied
Here is a hand coded color selector that should work with CS2:
http://ps-scripts.cvs.sourceforge.net/viewvc/ps-scripts/xtools/xlib/ColorChooser.jsx
It's based on a script by Larry Ligon. There are some other color-related scripts in that folder that you might find useful (or baffling).
-X