Pullmanite
New Member
- Messages
- 1
- Likes
- 0
I have a client with 4000 images who wants to change up to three colors on each image. I programmed an action to select a certain pink or yellow and convert them to light green. Then it selects a certain orange and converts it to brown. I'm using Color Range to select the color and then a fill command with the new color.
The only problem comes if there isn't any pink or yellow or light green... since there are no pixels selected, it fills the whole image with the new color (i.e. an image might have pink, which gets filled with light green, but it doesn't have any yellow, so no pixels are selected and the image gets filled with light green.)
I don't know how to do scripting, and I bet it can be done that way. Is there any way to put conditions in an action (i.e. if no pixels selected, skip the next step?)
A pseudo-code of the action is:
Color Range select "pink"
Foreground color = "light green"
(If some pixels selected then)
Fill with foreground color
Deselect
Color Range select "yellow"
Foreground color = "light green"
(If some pixels selected then)
Fill with foreground color
Deselect
Color Range select "orange"
Foreground color = "brown"
(If some pixels selected then)
Fill with foreground color
Deselect
The parts within parentheses are what I need help with. Thanks!
The only problem comes if there isn't any pink or yellow or light green... since there are no pixels selected, it fills the whole image with the new color (i.e. an image might have pink, which gets filled with light green, but it doesn't have any yellow, so no pixels are selected and the image gets filled with light green.)
I don't know how to do scripting, and I bet it can be done that way. Is there any way to put conditions in an action (i.e. if no pixels selected, skip the next step?)
A pseudo-code of the action is:
Color Range select "pink"
Foreground color = "light green"
(If some pixels selected then)
Fill with foreground color
Deselect
Color Range select "yellow"
Foreground color = "light green"
(If some pixels selected then)
Fill with foreground color
Deselect
Color Range select "orange"
Foreground color = "brown"
(If some pixels selected then)
Fill with foreground color
Deselect
The parts within parentheses are what I need help with. Thanks!