Altering Hue/Saturation using scripting

Hi,
I can't work out how to change the hue/saturation/brigtness in photoshop using scripting (currently using applescript) - the 'adjust' command doesn't seem to work.
As I'm using multi-coloured images I don't want to simply fill them with a colour.
Any hints or tips really appreciated!
Thanks

I'm not quite sure how to execute the javascript function from applescript?
and make it operate on the current layer of current document...
I've tried this in applescript:
    tell application "Adobe Photoshop CS4"
        set myDoc to current document
        set myLayer to current layer in myDoc
        do javascript (file "/ Users / emmashipley / huesatlight.jsx") ¬
            with arguments {10, 10, 10}
    end tell
and am getting this error message:
Applescript error:
Adobe Photoshop CS4 got an error: General Photoshop error occurred. This functionality may not be available in this version of Photoshop.
- <no additional information available>
The javascript file huesatlight.jsx is saved in the path referred to so not sure why this isn't working?
Thanks for the help!

Similar Messages

  • Using ActionScript to specify settings in the Hue/Saturation Effect

    Hi there,
    I have been trying to write a little action script that sets up a bunch of defaults in the Hue Saturation plug-in but can only get so far.
    The syntax either falls over or I am missing something here because the same code will work when in After Affects but if I try to run a script from the script UI directory. I get a "property undefined" returned. Uusally you just call the property by name and all is well. In this particularl case though. The only way to access say the "Red channel Saturation" is to have the plug-in in the Red channel pop-up. Ok so it works but not when running an external script.
    The following does work from within AE but not from the UI scripts directory via the Window menu.
    currProj = app.project(index).layer(index):
    currEffect = currProj.Effects.addProperty("Hue/Saturation");
    currEffectProp = currProj.effect("Hue/Saturation");
    currEffectProp.masterSaturation.setValue(20);//this call works
    currEffectProp.channelControl.setValue(2);//this call works changing the plug-in pane to the Red Channel
    currEffectProp.redSaturation.setValue(-5); //this returns: "TypeError: undefined is not an object" – yet when run within AE as an expression it works fine???
    Any help would be great – thank you

    "Max thank you for solving this for me."
    I still don't know what went wrong in your original code, so it's not really "solved" I guess!
    Anyway, about layer("ADBE Effect Parade") it's the same thing as layer.Effects or layer("Effects") but I'm never sure of what will work in a non-english version of AE.
    That's why I'm adding the Hue/Saturation effect using "ADBE HUE SATURATION" instead of "Hue/Saturation"
    So a useful thing to do is to create a script in the base "Script" folder, and write something like:
    var comp = app.panel.activeItem;
    if (     comp
         && comp instanceof CompItem
         && comp.selectedLayers.length
         && comp.selectedLayers[0].selectedProperties.length)
         var prop = comp.selectedLayers[0].selectedProperties[0];
         var str = "";
         while (prop)
              str += prop.matchName + " (" + prop.numProperties + "): " + prop.name;
              prop = prop.parentProperty;
         alert(str);
    Again, typing in the browser, check the code first ;-)
    Something like that will give you:
    - the matchName of the property selected (which can be anything: effect, shape, mask ... or any property of these)
    - the number of sub-properties of the current poperty (so for the Hue/Saturation effect, that will give you the number of controls of the plugin UI, although there may be some hidden ones too)
    - the name of the property
    ... for the selected property and its parents, up to the layer it belongs to.
    I find that quite handy when you want to know the matchname of an effect for example.

  • Using Hue Saturation to change color of shirt not working

    In CS5, I tried to make a selection of a white shirt and used Image > Adjustment >Hue Saturation, though when I drag the Hue slider, nothing happens, only a little bit of pixels of color change. Why is this.
    Thanks.

    1. So this is simply the wrong tool to change the color?
    Are you familiar with the geometric representation for the HSB- or LCH-model?
    The straight line connecting white and black is the axis that’s totally neutral, so changing the Hue or the Saturation/Chroma has no effect on points located thereon.
    You can still use Hue/Saturation to colorize neutrals by checking the Colorize-box.
    Or create a Solid Color Layer of the intended color and set it to Blend Mode Color and use a Curves Adjustment Layer to adjust the Luminance below that.
    Edit:
    http://en.wikipedia.org/wiki/HSL_and_HSV
    Figure 2a might be helpful in illustrating the gray axis.

  • How to use color picker or RGB values in the hue-saturation colorize adjustment

    I have a monochromatic adornment that I want to match to the color of a logo.  I am attempting to use the colorize option of a hue saturation adjustment layer to match color.  But I cannot quite get the colors to match.  I know the RGB values of the color, but how do these translate into the Hue/Sat/Lightness numbers of the adjustment dialog?  I tried using the correlating H/S/B values fro9m the color picker but that did not work.
    Any suggestions?

    Thanks Zeno.  Creating a layer with the color and using the blend mode worked fine.  But as I stated in the original post, using the H/S/B (there is no HSL) values from the color picker does not work when you place them into the H/S/L values in the hue-adjustment layer with (or without) the colorize box checked.  But your first suggestion worked like a charm.  Thank you.

  • Using hue/saturation adjustment layer to match color from another image?

    How can I use a hue/saturation adjustment layer on image 'A' so that it matches the color of image 'B' please?

    Depends, John.
    If you're able to create a reasonable selection via Color Range, feathered masking, etc, then by matching one specific color, you'll also be correcting for that entire range of hue. It might have been needed anyway...or you use a color filter to correct the whole image, if it's needed.
    As we all know, each image presents its own specific challenges and solutions.

  • Scripting Hue/Saturation

    I can't figure out how to adjust the saturation from AppleScript!?!? (Or Javascript)
    I am about to create an Action that adjusts the saturation and simply invoke that, but it feels wrong.
    Help!

    If it will help someone else coding AppleScript, here is my AppleScript abstraction of the Hue/Saturation/Lightness javascript...
    on PS_AdjustHueSaturationLightness(h, s, l)
    tell application "Adobe Photoshop CS3"
    tell document 1
    do javascript "
        var desc6 = new ActionDescriptor();
        desc6.putBoolean( charIDToTypeID( 'Clrz' ), false );
            var list1 = new ActionList();
                var desc7 = new ActionDescriptor();
                desc7.putInteger( charIDToTypeID( 'H   ' ), " & h & " );
                desc7.putInteger( charIDToTypeID( 'Strt' ), " & s & " );
                desc7.putInteger( charIDToTypeID( 'Lght' ), " & l & " );
            list1.putObject( charIDToTypeID( 'Hst2' ), desc7 );
        desc6.putList( charIDToTypeID( 'Adjs' ), list1 );
    executeAction( charIDToTypeID( 'HStr' ), desc6, DialogModes.NO );
    end tell
    end tell
    end PS_AdjustHueSaturationLightness

  • Hue/Saturation

    Hi,
    another Problem: I need to add the "Hue/Saturation" Effect. In my german Version it is "Farbton/Sättigung".
    Both Names do not work. I also tried some Variations like "Farbton/Saettigung" or "Hue_Sat" an so on, but nothing works.
    How can I get the correct Name of this Effect? I also loaded the Hue_Sat.AEX in a Text Editor, but there it names it self only "Hue_Sat".

    As Dan said, it's best to stick to using matchNames for properties and effects as these will work in all languages of AE. I recommend getting Jeff's Gimme Prop Path script which lets you find the matchNames and property paths for any selected property:
    http://www.redefinery.com/ae/view.php?item=rd_GimmePropPath
    In general Jeff's scripts are really useful as reference for learning how to write scripts.

  • Should a Layer Mask appear simultaneously with the creation of a Hue/Saturation mask?

    Using PC+CS4.  When creating a hue/saturation mask, why doesn't a Layer Mask appear simultaneously, as it does on training instruction when instructing with CS4 on mac? I've looked through Prefs and panel options without success.  Anyone got any ideas?

    CS4 Adobe added the Adjustment Panel and in the Adjustment Panel Adobe included two new bad options that can change Photoshop Default behavior.  One of the bad option Changes Photoshop so no automatic layer mask are added to adjustment layers.  The other bad option will add adjustment clipped by default.   These option are bad for Photoshop does not always operate the way they are set and changing Photoshop default behavior brakes some thing developed for Photoshop..   These settings are not preferences and are not settable in actions and scripts and plug-ins.  If a user set these from there default setting some actions and script will fail to operate correctly.  Photoshop is not only not backwards compatible with older versions of Photoshop it not compatible with current Photoshop.  These two menu items should simply be removed.

  • In Photoshop CC (2014), Hue/Saturation adjustment layer properties disappear

    I am running Photoshop CC (2014) under Windows 7 Professional.  The program is up to date.
    Today, while editing an 8-bit image, I added a Hue/Saturation adjustment layer.  Then, in the properties panel for this layer, with the on-image adjustment tool selected, I clicked a color in the image to get a range of colors whose saturation I wanted to adjust.  Next, using the saturation slider in the properties panel, I increased the saturation of this range of colors. Finally, I closed the properties panel by clicking on the double arrow in the upper right corner.
    Later, I wanted to modify this adjustment layer.  I double-clicked on the layer thumbnail to reopen the properties panel, and found that, although the previous increase in saturation was still operating, the saturation slider was back at its default position, and the range of colors that I had previously established was gone.  Thus, I could not make further adjustments to this range of colors.
    I then did some further experimentation:  I deleted the first Hue/Saturation adjustment layer, and created a new Hue/Saturation adjustment layer. I then again established a range of colors as above, again increased the saturation of these colors, and then again closed the properties panel by clicking on the double arrow in the upper right corner.  This time, however, when I wanted to try to modify this adjustment layer, instead of double-clicking on the layer thumbnail to reopen the properties panel, I right-clicked on the layer and then clicked on "Edit adjustment..."  This opened the properties panel, which, this time, correctly showed my original adjustments -- the saturation slider showed the positive adjustment that I had previously made, and the range of colors established earlier was still shown. But then, on a hunch, I added a Curves adjustment layer above the Hue/Saturation adjustment layer.  Now, when I again opened the properties panel of the Hue/Saturation adjustment layer (by right-clicking on the layer and then clicking on "Edit adjustment..."), my previous settings were gone -- the saturation slider was at its default position and the range of colors was gone!  (But the increase in saturation was still operating.)
    Thus, it appears that there is a bug in the functioning of the properties panel of the Hue/Saturation layer: In short, once you have added a further adjustment layer, you can't then go back and make changes to the properties of the Hue/Saturation layer.  I would be interested to hear if others have noticed this.  Also, is Adobe planning to address this?

    OK, I am not entirely sure I have understood your post completely, but when you edit a colour range with a Hue/Sat layer, and click off and back on again, it will default to showing the RGB values, which you may not have made any adjustment to.  If you pick the previous colour from the image, or a similar colour, it _will_ show you the adjustments.  So long as your picked colour is contained within the range of the previous adjustment.
    Ypu could also use the RGB drop down (actually they call it Master nowadays), and chose the colour that is closest to your previously picked colour.  I expect you are away that you can edit the colour range being operated on by dragging the four sliders on the two colour bars at the bottom of the Properties panel.
    Does that make sense, or am I going in the wrong direction?

  • Photoshop Elements 6: Hue/Saturation as a basic layer?

    When creating a hue/saturation layer in Photoshop Elements 6, is it possible to have it act as a basic layer, adding and removing from the selection, rather than a mask layer?

      The simple method is to place your selection on a separate layer and clip the hue/saturation mask to it.
    In this example I selected the sky and pushed up the saturation to really exaggerate the blue color.
      Click to view
    1. Make your selection
    2. Press Ctrl+J to place it on its own layer
    3. Add new adjustment layer (hue/saturation) and click OK to close the dialog
    4. Hover your mouse over the dividing line between the adjustment layer and selection layer whilst holding down the alt key. Click when you see two small connecting circle appear. A downward pointing arrow will appear to show the adjustment layer is clipped to the selection layer.
    5. Double click the thumbnail icon on the adjustment layer (not the white mask thumbnail) and that will bring back the dialog box.
    6. Now use the sliders to make your selective adjustments.

  • What video effect for color desaturation? (e.g. Hue/Saturation in Photoshop)

    Hi all,
    What is the Premiere equivalent of the HUE/SATURATION adjustment layer found i Photoshop ? I am trying to slightly desaturate (about -53%) my movie to give it a more gritty look. I could easily get the look I wanted in Photoshpo by going to NEW ADJUSTMENT LAYER-->HUE/SATURATION.
    Is there a similar approach for Premiere? In the Video effects folder somewhere? Thanks!

    Use the "Fast Color Corrector and "Saturation".

  • The eyedropper tool does not work with a hue saturation adjustment layer

    I am using PS CC 2014, and the problem I am having is that when I want to use the eyedropper tool to adjust the colour range affected by a Hue/Saturation adjustment layer, rather than selecting the colour in the Properties window for the adjustment layer, use of the eyedropper closes the properties window and changes the foreground colour in my palette.
    Here's the real hitch... the same thing happened to me at school last night where a) the Mac's are older and b) CS6 is still used.
    It's something with my user settings, to be sure, because the prof logged into his account on the Mac I was using in class to test it out, and it worked for him; we logged back into my account and it still did not work for mine.
    Any ideas?
    Thanks for any insights.
    RP

    Indeed Trevor, that did solve the problem. Clearly it was something I changed... wish I knew what. But, I have a list of all the settings changes I made before, so I can figure it out by making one at a time then checking...
    RP

  • Replace color and hue/saturation?

    Is there any real difference with using hue/saturation and replace color to change the color of an item OR is it just two ways to do the same thing?

    If you did a hue/saturation change then both the blue and yellow would change according to the sliders that you use.
    That would apply if you edit the Hue/Saturation’s Master (alt-2), but if the Colors are sufficiently different one could influence only the Reds (alt-3), Yellows {alt-4) etc.
    And that’s naturally best done with an Adjustment Layer.

  • Gaussian blur and Colour Adjust Hue/Saturation cause freeze-up

    After using PS Elements 9 for a year, it has started to give me problems, and I can't find a fix for it online.  Choosing Gaussian Blur, or Color - Adjust Hue/Saturation causes PSE 9 to freeze up and stop responding.  This just started today, and I'm baffled.  Some of the other filters have stopped working, but they don't cause a freeze-up.  I've done a disk clean and defrag, but I haven't done anything different to my computer in a long time.  I can try to uninstall/reinstall, but I'd rather not if there's a simpler solution.  I'm on a Toshiba Satelite Notebook, i5 processor,  64-Bit OS Windows Home Premium.  I'd appreciate any insight into this issue.

      The editor saved prefs often get corrupted. You may need to rebuild the editor preferences to resolve any conflicts.
    Hold down the Ctrl+Shift+Alt keys and simultaneously click on the Edit button on the welcome screen. Release the three keys and look behind the welcome screen by closing it. Or hold down the keys whilst double clicking on PhotoshopElementsEditor.exe (in Program Files x86\Adobe)
    You should see a pop up box with the words: Delete Adobe Photoshop Elements Settings File?
    Click on Yes
    Then wait whilst Elements rebuilds the preferences.
     

  • Hue Saturation Luminance sliders in CR4.1

    Hallo,
    Having just posted problems I was having with printing that I thought were due to some aspect of my colour management policies and/or my LCD monitor when tilted, I traced back my editing to the original DNG image and discovered something. As a result i have a simple question:
    1. I know that all adjustments in RAW are global - no problem. But what I want to know is this; When adjusting the luminance values of say in my case the Yellow slider, is this affecting even the yellow values in all the colours of the image? It appears so but I had assumed maybe wrongly that this particular slider and option would have only affected literally the yellow colour, and not the Yellow VALUES in the blues and greys and greens.
    Have I now learned something or is this assumption also wrong.
    the original problem had to do with a slightly darker print but also a slightly yellow colour cast which COULD NOT BE SEEN on my monitor even when proofing. The RGB values revealed otherwise by a lack of blue values in the RGB info palette, and its opposite, much higher Yellow values in the CMYK info palette.

    Hi, as far as matching colours of images, I would never use Hue saturation, In fact The hue saturation sliders are really a very crude means of adjustment, even as a layer. I would use the APPLY IMAGE command under Image.
    Ok, Jeff, I can not find post 8, i am probably stupid but I do not see how to get to post 8. As far as your question is concerned about ACR and PS differences; I have never really compared them. Apart from the fact in acr every adjustment you make is global, whereas in PS you can mask out and use layers and target areas to be adjusted. I would imagine that there would not be any fundemental difference in the two. One is manipulating th esame information in both packages. Now if you were to ask me to compare say the HSL sliders of photoserif 11 and ACR then I would choose ACR. the reason being is that PS is a professional package and Serif is not. I began with Serif.
    But please let me see your first question (8) maybe I ma missing something.
    Bets Regards
    Chris.

Maybe you are looking for