Cycle through colors in an indexed Color Table

Anyone, especially newbies, asking for help with Photoshop Scripting and Photoshop Automation - as opposed to those contributing to discussion about an aspect of Photoshop Scripting

Moderators: Tom, Kukurykus

manktank

Cycle through colors in an indexed Color Table

Post by manktank »

Hey all,

I'm trying to write a script that will cycle the colors in the Color Table (Image > Mode > Color Table ) of an indexed image by one. So if I've got 3 colors in the table, Red, Yellow, Purple, and I were to run the script it would make the color table Purple, Red, Yellow, affecting the image.

I'm fairly new to PS scripting, but I've found that access to the color table is seemingly severly limited (why is this? Is there a way around?). I was able to use this post ( http://forums.adobe.com/message/2251361#2251361 ) to save a temp.gif, and load those colors into an array to even find out what the colors were. How I'd put them back in to the table in a different order is beyond me, and would appreciate any help you guys can offer.

Thanks!