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
app.bringToFront();
var
LOWER_HUE_LIMIT = -180,
UPPER_HUE_LIMIT = 180;
var
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 );
executeAction(
charIDToTypeID( HUE_SATURATION_SYM ),
colorizeDescriptor,
DialogModes.NO
);
}