Color samplers - dark, light & grey point - how to adjust curves

Hi all
I've set dark, light & grey point in an image. Wondering how to adjust the curves based on the color samplers. Manually i invoke the curve dialog box and select the dark pen and choose sampler no1, select light pen and choose sampler no2, select grey pen and choose sampler no3. Any idea how this can be done in script?

I’m stymied by the gray point at current, it does not seem to use the measured values directly.
The white and black points seem to be straightforward and can be set easily with a Script when one knows the values.
#target photoshop
var theArray = [[17, 224], [0, 255], [27, 215], [0, 255], [28, 206], [0, 255]];
rgbCurvesLayer (theArray);
////// make rgb curves layer //////
function rgbCurvesLayer (theArray) {
// =======================================================
var idMk = charIDToTypeID( "Mk  " );
    var desc5 = new ActionDescriptor();
    var idnull = charIDToTypeID( "null" );
        var ref2 = new ActionReference();
        var idAdjL = charIDToTypeID( "AdjL" );
        ref2.putClass( idAdjL );
    desc5.putReference( idnull, ref2 );
    var idUsng = charIDToTypeID( "Usng" );
        var desc6 = new ActionDescriptor();
        var idType = charIDToTypeID( "Type" );
            var desc7 = new ActionDescriptor();
            var idpresetKind = stringIDToTypeID( "presetKind" );
            var idpresetKindType = stringIDToTypeID( "presetKindType" );
            var idpresetKindDefault = stringIDToTypeID( "presetKindDefault" );
            desc7.putEnumerated( idpresetKind, idpresetKindType, idpresetKindDefault );
        var idCrvs = charIDToTypeID( "Crvs" );
        desc6.putObject( idType, idCrvs, desc7 );
    var idAdjL = charIDToTypeID( "AdjL" );
    desc5.putObject( idUsng, idAdjL, desc6 );
executeAction( idMk, desc5, DialogModes.NO );
// =======================================================
var idsetd = charIDToTypeID( "setd" );
    var desc8 = new ActionDescriptor();
    var idnull = charIDToTypeID( "null" );
        var ref3 = new ActionReference();
        var idAdjL = charIDToTypeID( "AdjL" );
        var idOrdn = charIDToTypeID( "Ordn" );
        var idTrgt = charIDToTypeID( "Trgt" );
        ref3.putEnumerated( idAdjL, idOrdn, idTrgt );
    desc8.putReference( idnull, ref3 );
    var idT = charIDToTypeID( "T   " );
        var desc9 = new ActionDescriptor();
        var idpresetKind = stringIDToTypeID( "presetKind" );
        var idpresetKindType = stringIDToTypeID( "presetKindType" );
        var idpresetKindCustom = stringIDToTypeID( "presetKindCustom" );
        desc9.putEnumerated( idpresetKind, idpresetKindType, idpresetKindCustom );
        var idAdjs = charIDToTypeID( "Adjs" );
            var list1 = new ActionList();
                var desc10 = new ActionDescriptor();
                var idChnl = charIDToTypeID( "Chnl" );
                    var ref4 = new ActionReference();
                    var idChnl = charIDToTypeID( "Chnl" );
                    var idChnl = charIDToTypeID( "Chnl" );
                    var idRd = charIDToTypeID( "Rd  " );
                    ref4.putEnumerated( idChnl, idChnl, idRd );
                desc10.putReference( idChnl, ref4 );
                var idCrv = charIDToTypeID( "Crv " );
                    var list2 = new ActionList();
// add r points;
for (var m = 0; m < theArray[0].length; m++) {
          addCurvePoint (list2, theArray[0][m], theArray[1][m])
                desc10.putList( idCrv, list2 );
            var idCrvA = charIDToTypeID( "CrvA" );
            list1.putObject( idCrvA, desc10 );
                var desc15 = new ActionDescriptor();
                var idChnl = charIDToTypeID( "Chnl" );
                    var ref5 = new ActionReference();
                    var idChnl = charIDToTypeID( "Chnl" );
                    var idChnl = charIDToTypeID( "Chnl" );
                    var idGrn = charIDToTypeID( "Grn " );
                    ref5.putEnumerated( idChnl, idChnl, idGrn );
                desc15.putReference( idChnl, ref5 );
                var idCrv = charIDToTypeID( "Crv " );
                    var list3 = new ActionList();
// add g points;
for (var m = 0; m < theArray[2].length; m++) {
          addCurvePoint (list3, theArray[2][m], theArray[3][m])
                desc15.putList( idCrv, list3 );
            var idCrvA = charIDToTypeID( "CrvA" );
            list1.putObject( idCrvA, desc15 );
                var desc20 = new ActionDescriptor();
                var idChnl = charIDToTypeID( "Chnl" );
                    var ref6 = new ActionReference();
                    var idChnl = charIDToTypeID( "Chnl" );
                    var idChnl = charIDToTypeID( "Chnl" );
                    var idBl = charIDToTypeID( "Bl  " );
                    ref6.putEnumerated( idChnl, idChnl, idBl );
                desc20.putReference( idChnl, ref6 );
                var idCrv = charIDToTypeID( "Crv " );
                    var list4 = new ActionList();
// add b points;
for (var m = 0; m < theArray[4].length; m++) {
          addCurvePoint (list4, theArray[4][m], theArray[5][m])
                desc20.putList( idCrv, list4 );
            var idCrvA = charIDToTypeID( "CrvA" );
            list1.putObject( idCrvA, desc20 );
        desc9.putList( idAdjs, list1 );
    var idCrvs = charIDToTypeID( "Crvs" );
    desc8.putObject( idT, idCrvs, desc9 );
executeAction( idsetd, desc8, DialogModes.NO );
return app.activeDocument.activeLayer;
////// add curve point //////
function addCurvePoint (theList, valueHor, valueVer) {
var desc11 = new ActionDescriptor();
var idHrzn = charIDToTypeID( "Hrzn" );
desc11.putDouble( idHrzn, valueHor );
var idVrtc = charIDToTypeID( "Vrtc" );
desc11.putDouble( idVrtc, valueVer );
var idPnt = charIDToTypeID( "Pnt " );
theList.putObject( idPnt, desc11 );
Edit: I had assumed the gray point picker would set the input values of the point picked to output 127/127/127, but he operation seems to be quite different.

Similar Messages

  • When I upload AE video to YouTube, the color is off (White turns to light Grey). How do I fix this?

    The title explains my issue plain and simple.
    Just a quick background, i do not know much about color spaces.  But I do know that different
    forms of media require using different colors (RGB, CMYK, all that stuff).
    I'm assuming this is the issue in my case - wrong color space or exporting formats.
    My question is:
    What do I need to do to get the final video that I exported to look exactly the same (in terms of color) when
    it's uploaded on YouTube? Strictly just the color, because I understand quality goes down when uploaded to YouTube.
    Thanks for any help or suggestions.

    You haven't given us much information about what you rendered out of AE.
    I always recommend rendering an intermediate codec out of After Effects (Cineform, DNxHD, Quicktime with the PhotoJPEG codec, etc.) and then taking that intermediate file into the Adobe Media Encoder to create your final piece. The Adobe Media Encoder even has YouTube presets.

  • I would like to know how to change the color scheme of my tabs. They are dark grey with a lighter grey print and are hard to read. How do I make them different colors?

    When I open Firefox, the tabs for the homepages are dark grey and the print is a lighter grey but they are hard to read. How can I change the color of these tabs and fonts?

    This is a customer to customer forum, so this is not the place.
    What is going on with your account? maybe we can help you.

  • How get a light grey into the forground color?

    When I click on foreground, even if black is selected, I click around that box, and I inevitable get blues and greens. I'm lost. How can I get an easy variety of greys to choose from to click on to make the forgound color a light grey to taste?
    PS, I'm almost lost with eyedropper, I remember being able to click that on documents, even outside PS, but it's not working for me at all now in that respect. thanks.

    thanks Noel. Here is screenshot. Notice go to right edge, just blue.
    Eyedropper is ok now, but why did I think you could sample outside of an image? Does not move outside images.

  • I have illustrator cc. My job has cs5. How do I change the display of the software from light grey to dark grey?

    I have illustrator cc. My job has cs5. How do I change the display of the software from light grey to dark grey?

    CS5 can be somehow turned darker inside preferences. But you will be disappointed.

  • How do I point out errors on iBooks. Am attempting to download sample of "Dark Light" by Randy Wayne White and get "Dark Light" by Jayne Ann Krentz even though the RWW cover is what I am downloading. Who can I tell about the error that can correct it?

    How do I point ou errors on iBooks?  Am attempting to download sample of "Dark Light" by Randy Wayne White and am getting "Dark Light" by Jayne Ann Krentz despite the cover showing RWW. Who do I direct this to for correction?

    In iTunes, go into your account info (So, click your ID in the upper right corner of the store pane)
    Look at your orders. At the bottom of the recent orders page is "report a problem".

  • I can't see the writing properly since all the changes.    Can i make it darker as its just light grey

    I can't see the writing properly on my iMac iPad mini or iPhone.  I feel like throwing them all out.. or selling them as no point in using them if I can't see the writing is just a light grey.  please can i change this to a darker script

    Hi there Chrisey01,
    You may find the Increase Contrast, Bold and Large Text, and Reduce Transparency options in iOS helpful for making the text more legible. Take a look at the User Guide page below for more options. Note: Reduce Transparency is found with the Increase Contrast setting.
    Large, bold, and high-contrast text
    -Griff W. 

  • Light grey color going to light pink

    I got 15-inch, Mid 2012 MacBook Pro. It was new computer, so I guess everything should be fine, however it's not.
    Light grey colors on the screen are changing to light pink and grey. Its absolutely not good, especially Im a professional digital designer and its annoying.
    I decided to go with my issue to Apple Store in London. They took it, and after one day, they said that its not hardware issue and said that product is ready to pickup. They said they had possibility to compare the same screens and it was the same.
    Hello! Do I really expect a lot for 1,350 GBP? I dont think so. I just want a grey color.
    I have attached image of this post. Come on guys, compare it with your mid 2012 MBP. How does it looks?
    Anyone knows how to help me? Im afraid it can be only worse and worse.

    Sorry, I don't know how to make that ''Import'' function active. <br />
    Try getting your IE Favorites into Firefox with this procedure.
    In IE:
    File > Import/Export - Export to HTML file
    ''then in Firefox:'' <br />
    Bookmarks > Organize Bookmarks -> Import & Backup - Import HTML... = From HTML file

  • When creating a fillable form and saving it as a pdf, the default color of the data fields is a light blue. How do I change the color to something else that will copy better, e.g. a light yellow?

    When creating a fillable form and saving it as a pdf, the default color of the data fields is a light blue. How do I change the color to something else that will copy better, e.g. a light yellow?

    It's probably the fields highlight color of the application, which you can change via Edit - Preferences - Forms.

  • IPhone 4S iOS 7.1 reduce transparency ugly light grey instead of dark

    Does anyone know why reduce trancparency in dock & folders background has such an ugly light grey instead of the pretty dark one that appears on the screenshots about it (I guess they are from the iPhone 5)?
    That's ridiculous, it looks so ugly with the light grey...
    Maybe Apple doesn't want iPhone 4/4s users to use it to make the phone a bit faster, so they don't get frustrated enough and don't upgrade to iPhone 5? Unbelievable...
    Look at the difference between the two (it's actually even uglier when you open or just see a folder):

    ricardo.garrone wrote:
    Does anyone know why reduce trancparency in dock & folders background has such an ugly light grey instead of the pretty dark one that appears on the screenshots about it (I guess they are from the iPhone 5)?
    Because Apple changed it. Submit your feedback directly to Apple using the appropriate link on the Feedback page:
    http://www.apple.com/feedback
    I like the light grey better myself.

  • I using LR5.its gone part of base.like contrast,dark,light,shadow..things.how to get back it?

    i using LR5.its gone part of base.like contrast,dark,light,shadow..things.how to get back it?

    If I understand your problem correctly, then right-click on one of the develop section labels (or in the blank space below) and assure basic section is enabled, e.g.

  • Can you change the pasteboard color? (Dark Gray to a much lighter gray)

    Can you change the pasteboard color? (Dark Gray to a much lighter gray)

    In CS6 and later you can change the User Interface in the Preferences.
    A brighter interface changes the pasteboard color. Tou can also check the Canvas Color to white.

  • Light and dark solid grey vertical lines appear randomly on screen

    This has happened about 4 times in the last couple of months, when these light and dark solid grey lines appear on my screen, I have to turn my computer off by holding down the power button and rebooting it, it fixes the problem for the time being. These lines appear randomly, they have appeared when using Photoshop CS6, also when just using the internet, listening to Pandora. 1 out of the 4 times these lines appeared, there was a ticking/clicking noise... I took it to the local computer shop and they did tests on it twice and found nothing.
    Processor:
         2.66 GHz Intel Core 2 Duo
    Memory:
         4 GB 800 MHz DDR2 SDRAM
    Hard Drive:
      Capacity:    319.73 GB
      Available:    144.87 GB

    Run Apple Hardware Test in extended mode a minimum of 3x back to back. If errors appear this confirms a hardware issue that can only be fixed by taking the machine in for repair.

  • The "edit in" menu is completely inactive. All plug-ins are visible but in light grey; i.e. not accessible. Any idea how to solve the issue? Fyi: I am using LR 5.7.1 on MacBook with Mawericks.

    The "edit in" menu is completely inactive. All plug-ins are visible but in light grey; i.e. not accessible. Any idea how to solve the issue? Fyi: I am using LR 5.7.1 on MacBook with Mawericks.

    Jim, that sounds like a good hypothesis. Yes, I am using smart previews. I have my originals on an external drive which is connected. Still, LR can not find them. Do you know how to tell LR where to find the originals? I would like LR to identify the source automatically: if external drive is connected LR should show "original and smart preview" not only "smart preview". Thanks for your help.

  • Text tool is only letting me type in white, black, and grey. How can I have it type in color? [was: Text]

    The text on my photoshop is only letting me type in white, black, and grey. How can I have it type in color? I have tried to change the color but no matter what I do it leaves the text in grey/

    What is the image mode?  Image > Mode - should be set to RGB
    Do you have a B&W adjustment layer above the Type layer?
    If you are not sure, it would help if you upload a screen grab of your entire workspace with the Layers and History panels visible.  Keep it at full resolution please.

Maybe you are looking for

  • How to send multiple Recipients using the mail.jar and activation.jar

    hi! could somebody help me. how do i send multiple Recipient using mail.jar. when i would input 2email address in to Recipient (example: [email protected], [email protected]) i get a DEBUG: setDebug: JavaMail version 1.3.2 but if i send a single email

  • Q: changing Global Currency 1 in OBIA 11.1.1.7.1

    We started configuring BI Apps 11.1.1.7.1 and are not able to change the Global Currency 1 (and 2-5) from USD to EUR (or anything else). Same applies for Global Currency Exchange Rate Type 1-n. In the Edit Parameter Value dialog, no values are displa

  • Pdf for RCA 7" Tablet

    Hi I just purchased a RCA 7" Tablet and am trying to download pdf files and am not able to. Tried looking in different areas of Adobe.com and was not able to get the information needed. Where can I install the pdf for this tablet? Thanks

  • Latin 1 supplement for Pattern matching

    Hi All, I am trying to pattern match a string with the following pattern: "\\p{InLatin1Supplement}+"(want to allow only characters in Latin 1 Supplement charset) However I get java.util.regex.PatternSyntaxException: Unknown character family {Latin1Su

  • Can't get the Sidebar to appear after 10.6.8 update

    After updating to 10.6.8, and checking Finder preferences to include Sidebar items, they no longer appear in my Finder? In fact the Finder looks very different. What happened?