1
\$\begingroup\$

I am making an action in Photoshop CC to create a narrow border around images. I chose a foreground color from the image using the eyedropper then recorded the action to

  1. Add new layer called "Border"
  2. Select all
  3. Edit|Stroke, selected 2px inside. The color was the forground one I selected.
  4. Deselect

After recording the action I changed the stroke step to show the dialog in case I want to change the size.

The action worked perfectly for the image I had open when I made it but doesn't for other images. Although I select the border color I want with the eyedropper before running the action, it always uses the color that was selected as foreground when I recorded the action.

Is it possible for the stroke tool in an action to select the current foreground color rather than teh one that was active when it was recorded?

\$\endgroup\$
1
  • 1
    \$\begingroup\$ You will need to use a script rather than just the record tool. \$\endgroup\$ Nov 8, 2015 at 21:19

2 Answers 2

1
\$\begingroup\$

Actions in Photoshop will not pick a color from an image by itself, and then use it for the task you want it to perform. I would suggest creating separate actions for each color of the border you need. For example:

  1. Action White Border: 2px border, color #FFF
  2. Action Black Border: 2px border, color #000
  3. Action Some random color border: 2px border, color #1b1b1b

Hope this helps.

\$\endgroup\$
3
  • \$\begingroup\$ I don't want to have actions that set fixed colours but one that works with the current foreground colour. I'm going to look into scripting for this. \$\endgroup\$ Nov 16, 2015 at 7:45
  • 1
    \$\begingroup\$ Try this link graphicdesign.stackexchange.com/questions/28772/… one person wrote a script similar to what you are looking, but that looks like he knows his way around scripting. You could ask him directly :) \$\endgroup\$ Nov 16, 2015 at 15:22
  • \$\begingroup\$ Thanks, that looks like a good starting point. I'll just need to extend it to allow interactive choosing of the sampling point. \$\endgroup\$ Nov 17, 2015 at 5:03
1
\$\begingroup\$

I think searching for a script online will help rather than trying with actions,because actions will just repeat all what is recorded. But in script we can define some thing to repeat or create.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.