OK, I actually downloaded that tileset and a random save using it from dffd, and I see that that tile is not for unmined ore at all. It is for stones, and they have black background:
http://i.imgur.com/I7xSP.png
If you really want to use the script, you can download a recent development dfhack build from here. The above script should work with it if you put it in hack/scripts/ somewhere.
http://www.qmtpro.com/~quietust/df/dfhack-0.34.11-r2-Windows.7z
Well, I was
prepared to drop the subject... but... uh....
well, damn.
My hat's off to you, sir. I feel like a complete putz now
Everything I was doing was based on the assumption that 'black' came from the fact that the semi-transparent image was copied to a surface that had been initialized as black, thus it took on the black trait and then became 100% opaque. That assumption was false, and you've just shown me that. (I was using the colors from the raws for the material as shown by the wiki, evidently that was misleading.)
So... now I'll look into updating my photoshop routine for this. It should be a very simple fix.
A lot of the confusion, I think, in our discussion was my lack of proper terminology, and getting things slightly confused in my head. I was working sometimes from memory, as I can't have a computer at work, and coding on my phone in any large quantity is just... well, unreasonable.
So thanks for sticking with this and working it out with/for me. I was not trying to doubt you, just trying to argue different points of what I thought was the same side of the same argument. black. pfeh!
-- Rayanth