Skip to main content
EasyTellers
Participant
December 7, 2015
Answered

Create a gradient from the script.

  • December 7, 2015
  • 1 reply
  • 2070 views

Create a gradient from the script, control stops and color.

Do not understand from the document for Photoshop cs6 javaScript reference how and where to access the gradient.

Please help me, I can not make day after day ..

The principle of the script consists of scanning black-and-white and color texture of the pixel, recording color in the array.

Then in order to decompose the array of color from 0 to 255 black-and-white texture.

So get the texture gradient.

0 where blacks where 255 white. each color will be assigned a user ID and on it will be moved to color in the gradient color texture.

Sorry for my English.

Thanks!

This topic has been closed for replies.
Correct answer Chuck Uebele

To great a gradient with script, you should use scriptlistener. Then change the variables in that code to match what you want. I use that method to create gradients on shapes that are sampled from a reference image.

1 reply

Chuck Uebele
Community Expert
Chuck UebeleCommunity ExpertCorrect answer
Community Expert
December 8, 2015

To great a gradient with script, you should use scriptlistener. Then change the variables in that code to match what you want. I use that method to create gradients on shapes that are sampled from a reference image.

EasyTellers
Participant
December 8, 2015

Thanks! I now understand how to use the scripting reference . Thank scriptListener.

Chuck Uebele написал(а):

To great a gradient with script, you should use scriptlistener. Then change the variables in that code to match what you want. I use that method to create gradients on shapes that are sampled from a reference image.

Chuck Uebele
Community Expert
Community Expert
December 8, 2015

I put together a quick video to show a friend what I was doing with some of my gradient scripts. It's not so much a tutorial, but just to show how I was creating some art with scripts. Again, I used the scriptlistener to create the base for the shapes then just put in different values:

oval script - YouTube