Let's say I have 100 photos in a folder. On the first one, I would like to change the Hue to -180, and save it. On the second one, I would like to change the Hue to -170. On the third one, I would like to change the Hue to -160, and so on.

Is there a way to batch process with a different value each time?

  • 1
    By definition, it wouldn't really be "batch" processing if there's a variation each time.
    – Scott
    Dec 16 '13 at 20:14

I'd probably use ImageMagick.

There is a feature available to modify the hue, but it's percentage based instead of degrees.

Hue Modulation

Rotates the colors of the image, in a cyclic manner. To achieve this the Hue value given produces a 'modulus addition', rather than a multiplication. However be warned that the hue is rotated using a percentage, and not by an angle.

convert rose:   -modulate 100,100,0      mod_hue_0.gif
convert rose:   -modulate 100,100,33.3   mod_hue_33.gif
convert rose:   -modulate 100,100,66.6   mod_hue_66.gif
convert rose:   -modulate 100,100,100    mod_hue_100.gif
convert rose:   -modulate 100,100,133.3  mod_hue_133.gif
convert rose:   -modulate 100,100,166.6  mod_hue_166.gif
convert rose:   -modulate 100,100,200    mod_hue_200.gif


hue modulation: 0 hue modulation: 33.3 hue modulation: 66.6 hue modulation: 100 hue modulation: 133.3 hue modulation: 166.6 hue modulation: 200

Most of the heavy lifting is done for you in that example, you would just need to create a script that indexes all the files in a directory and applies a sequential value given to the modulate argument.

  • +1 for imageMagick. Fiddly to get going, but extraordinarily powerful.
    – benteh
    Dec 17 '13 at 0:07

This could be accomplished with PS scripting. As it is a pretty unique request, you might have trouble finding an existing script that does that. You'd probably either have to code it up yourself or hire someone who can do it for you.


I have a script that will do just that. Just save it as something like changeHuePerLayer.jsx and drag and drop it on top the Photoshop dock icon on the Mac. On Windows I think you need to open it from the menu (not sure where).

#target photoshop

    LOWER_HUE_LIMIT = -180,
    UPPER_HUE_LIMIT = 180;
    hueValue = LOWER_HUE_LIMIT,
    hueIncrementor = 10,
    currentDoc = app.activeDocument;

for ( var i = 0; i < currentDoc.layers.length; i++ ) {
    currentDoc.activeLayer = currentDoc.layers[i];
    hueValue = hueValue < UPPER_HUE_LIMIT ? hueValue + hueIncrementor : LOWER_HUE_LIMIT;
    applyHsl( hueValue, 0, 0 );

 * @param {number} hue
 * @param {number} saturation
 * @param {number} lightness
function applyHsl( hue, saturation, lightness ) {
    var HUE_SAT_ADJUSTMENT_V2_SYM  = 'Hst2';
    var COLORIZE_SYM               = 'Clrz';
    var ADJUSTMENT_SYM             = 'Adjs';
    var HUE_SYM                    = 'H   ';
    var SATURATION_SYM             = 'Strt';
    var LIGHTNESS_SYM              = 'Lght';
    var HUE_SATURATION_SYM         = 'HStr';

    var colorizeDescriptor = new ActionDescriptor();
    var hueSatDescriptor = new ActionDescriptor();
    var hueSatAdjustmentList = new ActionList();

    colorizeDescriptor.putBoolean( charIDToTypeID( COLORIZE_SYM ), false );

    hueSatDescriptor.putInteger( charIDToTypeID( HUE_SYM ), hue );
    hueSatDescriptor.putInteger( charIDToTypeID( SATURATION_SYM ), saturation );
    hueSatDescriptor.putInteger( charIDToTypeID( LIGHTNESS_SYM ), lightness );

    hueSatAdjustmentList.putObject( charIDToTypeID( HUE_SAT_ADJUSTMENT_V2_SYM ), hueSatDescriptor );
    colorizeDescriptor.putList( charIDToTypeID( ADJUSTMENT_SYM ), hueSatAdjustmentList );

        charIDToTypeID( HUE_SATURATION_SYM ),

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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