Skip to content

Instantly share code, notes, and snippets.

@Lokno
Last active December 30, 2015 23:45
Show Gist options
  • Save Lokno/c0769aabeca4cf81f671 to your computer and use it in GitHub Desktop.
Save Lokno/c0769aabeca4cf81f671 to your computer and use it in GitHub Desktop.
Toggle the hue and saturation adjustment layers in photoshop
#target photoshop
var currentDoc = app.activeDocument;
for ( var i = 0; i < currentDoc.layers.length; i++ ) {
var layer = currentDoc.layers[i];
if( layer.kind === LayerKind.HUESATURATION )
{
layer.visible = layer.visible ? false : true;
}
}
@Lokno
Copy link
Author

Lokno commented Oct 26, 2015

Install by saving to PHOTOSHOP_DIRECTORY/Presets/Scripts
Also works just by opening it with File->Open..
Once installed, you can add an action to run it with a keyboard shortcut

  1. Open Actions window (Window->Actions)
  2. Click the "Create a New Action" Button (dog-eared paper icon)
  3. Choose the name of the action and the shortcut keys you want
  4. Click Record
  5. Select Insert Menu Item...
  6. Select File->Scripts->toggleHueSatLayers
  7. Hit OK on dialog box
  8. Press stop button on actions window

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment