All I can say is its good to keep a working copy of Photoshop in reserve. CC 2015 has been a rocky road only after its fourth update, have I started using it.
Glad to see I'm not the only one running into this bug! CC 2015 is surprisingly buggy so far, and not ready for production use, in my opinion.
Does this fail when running from the ESTK and not when dropping the script on Photoshop or using File -> Scripts?
The problem is the default colors for the alpha channel. If you have changed those and are running from the ESTK then the fill is picking up the tool bar colors and not the colors from your script. And this is the alpha color swatches and not the RGB color swatches.
To state it again:
ESTK and File -> Scripts should be fine now.
If you change the alpha channel default swatches from white/black to something else then you will get those colors when running via the ESTK and not the black/white from your script.
Let me know if you are seeing something different and the details.
Hi Tom. Just wanted to revisit this for completeness as the bug appears to have been resolved in the most recent version of Photoshop-Adobe Photoshop CC (2015.5.1 Release | 20160722.r.156 x 64). Again the bug only appears in Adobe Photoshop CC (2015.1.2 Release | 20160113.r.355 x64).
Below are screenshots of the behavior in the last 3 versions of Photoshop when launching the script from ESTK with preferences reset. I added ruler preference code to accommodate the preference reset.
// Set the ruler units to pixels
var originalRulerUnits = app.preferences.rulerUnits
app.preferences.rulerUnits = Units.PIXELS
var newImage = app.documents.add(1000, 1000, 72, "bug.tif", NewDocumentMode.GRAYSCALE, DocumentFill.WHITE);
var docRef = app.activeDocument;
var rgbWhite = new SolidColor ();
rgbWhite.rgb.red = 255;
rgbWhite.rgb.green = 255;
rgbWhite.rgb.blue = 255;
var rgbBlack = new SolidColor ();
rgbBlack.rgb.red = 0;
rgbBlack.rgb.green = 0;
rgbBlack.rgb.blue = 0;
var box1Channel = docRef.channels.add();
box1Channel.kind = ChannelType.SPOTCOLOR;
box1Channel.name = "Box1";
var box1Region = Array(Array(0,0), Array(0, 750), Array(750, 750), Array(750, 0));
var box2Channel = docRef.channels.add();
box2Channel.kind = ChannelType.SPOTCOLOR;
box2Channel.name = "Box2";
var box2Region = Array(Array(250,250), Array(250, 1000), Array(1000, 1000), Array(1000, 250));
var alphaChannel = docRef.channels.add();
alphaChannel.name = "WhereBoxesIntersect";
var box1Selection = docRef.channels.getByName("Box1");
var box2Selection = docRef.channels.getByName("Box2");
// restore unit settings
app.preferences.rulerUnits = originalRulerUnits
Adobe Photoshop CC (Version 14.2.1 x64)
Adobe Photoshop CC (2015.1.2 Release | 20160113.r.355 x64)
Adobe Photoshop CC (2015.5.1 Release | 20160722.r.156 x 64)
Adobe does not fix old version of their Applications. Photoshop CC 2015 is no longer the current version of Photoshop Photoshop CC 2015.5 is current and Adobe is working on some of the reported issues in CC 2015.5.
Sure. I was just showing for completeness and anyone who stumbles upon this thread in that they should most definitely update to CC 2015.5.