Get the color of the outline of the shape

Hello

I need get the shape outline color in photoshop, but I only find how to get the fill color, any suggestions?

function getFillColor() {
   var ref = new ActionReference();
   ref.putEnumerated( stringIDToTypeID( "contentLayer" ), charIDToTypeID( "Ordn" ), charIDToTypeID( "Trgt" ));
   var ref1= executeActionGet( ref );
   var list =  ref1.getList( charIDToTypeID( "Adjs" ) ) ;
   var solidColorLayer = list.getObjectValue(0);       
   var color = solidColorLayer.getObjectValue(charIDToTypeID('Clr '));
   var fillcolor = new SolidColor();
   fillcolor.rgb.red = color.getDouble(charIDToTypeID('Rd  '));
   fillcolor.rgb.green = color.getDouble(charIDToTypeID('Grn '));
   fillcolor.rgb.blue = color.getDouble(charIDToTypeID('Bl  '));
   return fillcolor;
}

Thank you

This work in Photoshop CC? (edited)

// 2014, use it at your own risk;
#target photoshop
if (app.documents.length > 0) {
var ref = new ActionReference();
ref.putEnumerated( stringIDToTypeID("contentLayer"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
var layerDesc = executeActionGet(ref);
var strokeSt = layerDesc.getObjectValue(stringIDToTypeID("AGMStrokeStyleInfo"));
var strokeStyleColor = strokeSt.getObjectValue(stringIDToTypeID("strokeStyleContent")).getObjectValue(stringIDToTypeID("color"));
alert (strokeStyleColor.getDouble(stringIDToTypeID("red"))+"\n"+strokeStyleColor.getDouble(stringIDToTypeID("grain"))+"\n"+strokeStyleColor.getDouble(stringIDToTypeID("blue")));
};

Tags: Photoshop

Similar Questions

  • How to get the shape of the area

    Hello!
    As the topic says, I wonder if there is a way to get the bounding box of the shape? Or in a query or method in JGeometry. I guess I could just get the coordinates and the loop on them to get the min/max values, but is more effective way?
    Thank you!

    Hi,-you can use should JGeometry, who works for 2D or 3D.
    You can use sdo_geom.sdo_mbr in sql.
    Hope this helps
    Baris

  • Make the shape "Unsecure" for Advanced PDF editing tools?

    I have a form map of comments or Satiscation survey I created by Adobe LiveCycle Designer and I need help... I want to use the 'Send e-mail' button BUT I don't want that it sent back to me in the form of data... There is a button they click for 1 to 5 satisfaction and a comment at the bottom of the form box, but I want the shape, not the xml data...

    So my plan was to use the advanced changes the tab tools on Adobe Acrobat Professional... Then use the link tool, I think he put a mask on top of the 'Send email' button and send me the completed return form... I have not tested this theory yet because the form is "safe" in PDF and I don't know how I can get my idea to work...

    Can anyone help?

    Hello

    I suspect that the form is "secure" seen in Acrobat, because you have set a password to open for when the formed is open in the designer of the LC. This applies security to the form (which also prevents a user to print to PDF).

    Even if the form doesn't have any security, you will not be able to use a form of LC Designer AcroForm tools. They are different animals!

    There is a solution, which is in a lot of posts on the forum. If you use a standard "button" instead of a button 'send e-mail', you can have JavaScript in the click event that might look like this:

    vEmail = "[email protected]"; var
    var vSubject = 'customer comments ';
    var vBody = 'Put the friendly customer-oriented text here and it will appear in the body of the email to the customer.';

    event.target.submitForm ({cURL: "mailto:" + vEmail + "?"}) subject = "+ vSubject +"& body ="+ vBody, cSubmitAs: 'PDF', cCharset:" utf - 8 "});"

    Submit custom PDF will ensure, you get the shape and not only the XML.

    When you develop in LC, it is best to make all the scripts in LC, rather than trying to adapt certain parts in format Acrobat (IMHO) ;-)

    Good luck

    Niall

  • How to get the outline color and size of the rectangle?

    Hi all

    I'm developing an extension for CS5 and higher (including the CC version). I want to get the outline color and size of a rectangle. I was able to do in CS5. But I noticed that in the version of the CC, there are two ways in which the user can apply to a stroke. One is by applying the effect in the layer Style, and the other through the properties panel. I am able to get the values of time in my script, if it is applied through layer Style, but I can't do it in the other scenario.

    How are these two different traits and how do I get the outline color and size if it is applied via the properties panel using script?

    Thank you!

    Here's what I have so far. It takes more work, but I don't think that's never very accurate.

    function toggleOtherLayersVisibility() {
        var desc = new ActionDescriptor();
            var list = new ActionList();
                var ref = new ActionReference();
                ref.putEnumerated( charIDToTypeID('Lyr '), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
            list.putReference( ref );
        desc.putList( charIDToTypeID('null'), list );
        desc.putBoolean( charIDToTypeID('TglO'), true );
        executeAction( charIDToTypeID('Shw '), desc, DialogModes.NO );
    };
    function liveShapeFillEnabled( enable ) {// boolean
        var desc = new ActionDescriptor();
            var ref = new ActionReference();
            ref.putEnumerated( stringIDToTypeID('contentLayer'), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
        desc.putReference( charIDToTypeID('null'), ref );
            var shapeDesc = new ActionDescriptor();
                var styleDesc = new ActionDescriptor();
                styleDesc.putInteger( stringIDToTypeID('strokeStyleVersion'), 2 );
                styleDesc.putBoolean( stringIDToTypeID('fillEnabled'), enable );
            shapeDesc.putObject( stringIDToTypeID('strokeStyle'), stringIDToTypeID('strokeStyle'), styleDesc );
        desc.putObject( charIDToTypeID('T   '), stringIDToTypeID('shapeStyle'), shapeDesc );
        executeAction( charIDToTypeID('setd'), desc, DialogModes.NO );
    };
    function dupeVisibleMerged() {
        var desc = new ActionDescriptor();
        desc.putBoolean( charIDToTypeID('Dplc'), true );
        executeAction( charIDToTypeID('MrgV'), desc, DialogModes.NO );
    };
    function loadTransparency(){
        var desc = new ActionDescriptor();
            var ref = new ActionReference();
            ref.putProperty( charIDToTypeID( "Chnl" ), charIDToTypeID( "fsel" ) );
        desc.putReference( charIDToTypeID( "null" ), ref );
            var ref1 = new ActionReference();
            ref1.putEnumerated( charIDToTypeID( "Chnl" ), charIDToTypeID( "Chnl" ), charIDToTypeID( "Trsp" ) );
        desc.putReference( charIDToTypeID( "T   " ), ref1 );
        executeAction( charIDToTypeID( "setd" ), desc, DialogModes.NO );
    };
    function getLiveShapeStrokeInfo(){
        var doc = app.activeDocument;
        var lyr = doc.activeLayer;
        liveShapeFillEnabled( false );
        toggleOtherLayersVisibility();
        doc.artLayers.add();
        dupeVisibleMerged();
        var bounds = doc.activeLayer.bounds;
        var horzCenter = (bounds[2]-bounds[0])/2;
        var vertCenter = (bounds[3]-bounds[1])/2;
        lyr.visible = false;
        var sampler = doc.colorSamplers.add([bounds[0]+UnitValue(.5,'px'),bounds[1]+vertCenter]);
        sizeObject.color = sampler.color;
        loadTransparency();
        doc.selection.select([
                                [bounds[0],bounds[1]+vertCenter],
                                [bounds[0]+horzCenter,bounds[1]+vertCenter],
                                 [bounds[0]+horzCenter,bounds[1]+vertCenter+UnitValue(1,'px')],
                                 [bounds[0]+UnitValue(1,'px'),bounds[1]+vertCenter+UnitValue(1,'px')]],SelectionType.INTERSECT);
    
        sizeObject.size = doc.selection.bounds[2]-doc.selection.bounds[0];
    };
    var sizeObject = {};
    app.activeDocument.suspendHistory('Get Live stroke info','getLiveShapeStrokeInfo()');
    executeAction( charIDToTypeID('undo'), undefined, DialogModes.NO );
    sizeObject.size;
    
  • How can I get the tabs colorful to use different distinct colors for 2 gmail accounts?

    Under Firefox 29.0.1 iMac OSX 10.9.3. I have multiple Google accounts: 2 1 Google Calendar and gmail accounts. Colorful tabs add-on will allow me to choose a color for a gmail account, but it also uses this same color for the other gmail account. How can I get the different colors on 2 gmail accounts?

    In addition, colorful tabs is also the same for my homepage (google.com) and my google calendar. How can I get different colors on these 2?

    Personally, I use 'Fabtabs' for my mozilla FireFox.

    https://addons.Mozilla.org/en-us/Firefox/addon/FabTabs/

    This add-on has problems like that when I use it.

  • How to get the background color setting after accidentally change?

    Original title: background and other color changes
    I changed the background color by accident and cannot get the original settings that I had back

    Hello

    1. who is the operating system installed on the computer?
    2. what was the background color and what color you have changed from?
    3. What are other color changes you're talking about?
    4. What are the steps you did to change the background color?
     
     
    If you work on a windows 7 OS then try the steps in the following article and check the status of the issue.
     
     
    I hope this helps!
  • printer Lexmark Pro 200. Does not print the correct colors. I restarted my computer and the printer is off but get the same result.

    Printer Lexmark Pro 200.  Does not print the correct colors. I restarted my computer and the printer is off but get the same result.

    Hello

    • What were the changes made before the problem occurred?

    You try to run this fix and check.

    http://Windows.Microsoft.com/en-us/Windows7/open-the-printer-Troubleshooter

    If above does not work, try contacting Lexmark support for assistance.

    http://www1.Lexmark.com/en_US/global-services/customer-support-services/index.shtml

  • How can I get the color codes for the notebook

    How can I get the color codes for the notebook?

    Hello

    What is the color codes for the notebook?

    Perhaps you need a 3rd party utility like GetDiz - Free and others to be
    found using BING or Google.

    GetDiz Notepad - free - replacement
    http://www.Outertech.com/en/Notepad-replacement

    I hope this helps.

  • How to get the color of a single pixel?

    Hi all.

    Part of my application is transparent. The other party is not.

    But I would like to have 'match' colors (is not very pretty orange to pink, but it's a matter of personal taste, I guess).

    That's why I need now to a background color.

    That's what I had in mind:

    Because we cannot get information about the currently active theme, I can do a screen capture and extract a single pixel of interest and get its color information. If it is green (for example) - I'll tryto use more Brown colors in my application.

    So basically, is it possible to get the color of a pixel in a bitmap (or something?)

    My last resort would be to save the Bitmap image to a file and then read that file.

    Bitmap.getARGB (int [] argbData, int offset, int scanLength, int x, int y, int width, int height)
    Gets the raw data ARGB region of this Bitmap and stores it in the table provided.

  • Problem to get the background color

    Mr President, in my code, I wasn't able to use fully all the width of the screen,

    This is my code

    public class HorizontalField extends VerticalFieldManager
    {
       HorizontalFieldManager sd=new HorizontalFieldManager(HorizontalFieldManager.USE_ALL_WIDTH);
       HorizontalFieldManager r1=new HorizontalFieldManager(HorizontalFieldManager.USE_ALL_WIDTH);
       MySeparatorField ds=new MySeparatorField();
       Font fnt,fntv;
        HorizontalField()
        {
           fnt = this.getFont().derive(FontFamily.SCALABLE_FONT, 14);
           fntv = this.getFont().derive(FontFamily.SCALABLE_FONT, 11);
           r1.setFont(fntv);
           /*---------------------Heading-----------------------------------*/
           DateField dd=new DateField("Date");
    
           dd.setFont(fnt);
           sd.add(dd);
          /*------------------*/
           MyLine s=new MyLine();
           sd.add(s);
           Desp d1=new Desp("Description");
           d1.setFont(fnt);
           sd.add(d1);      
    
           /*_________________*/
           MyLine s1=new MyLine();
           sd.add(s1);
    
           Amt d2=new Amt("Amount");
           d2.setFont(fnt);
           sd.add(d2);
           add(new SeparatorField());
           add(sd);
           add(new SeparatorField());
    
               DateField dfr=new DateField("13.08.09")
               {
                   public void paint(Graphics g)
                   {
                        g.setBackgroundColor(Color.RED);
                        g.clear();
                        super.paint(g);
                   }
               };
               r1.add(dfr);
               MyLine sr=new MyLine();
               r1.add(sr);
               Desp dr=new Desp("Reent")
               {
                   public void paint(Graphics g)
                   {
                        g.setBackgroundColor(Color.RED);
                        g.clear();
                        super.paint(g);
                   }
               };
               r1.add(dr);
               MyLine sra=new MyLine();
               r1.add(sra);
               Amt amtr=new Amt("5000")
                 {
                   public void paint(Graphics g)
                   {
                        g.setBackgroundColor(Color.RED);
                        g.clear();
                        super.paint(g);
                   }
               };
               r1.add(amtr);
               add(r1);
               add(new SeparatorField());
    
           }
    
        }
    
     class DateField extends LabelField
    {
         DateField(String s)
        {
            super(s,LabelField.LEFT);
         }
        public  int getPreferredWidth()
        {
            return Display.getWidth()*2/10;
        }
    
    }
    
      class Desp extends LabelField
    {
         Desp(String s)
        {
            super(s,LabelField.RIGHT);
         }
        public  int getPreferredWidth()
        {
            return Display.getWidth()*5/10;
        }
    
    }
    
      class Amt extends LabelField
    {
        Amt(String s)
        {
            super(s,LabelField.RIGHT);
         }
        public  int getPreferredWidth()
        {
            return Display.getWidth()*4/10;
        }
    
    }
    

    MyLine code is

    public class MyLine extends LabelField
    {
        int width,height;
    
        ButtonField dd;
        MyLine()
        {
            width=1;
            //height=200;
        }
         MyLine(int w)
        {
            width=w;
            //height=200;
        }
    
         public int getPreferredWidth()
            {
                return width;
             }
    
         public void paint(Graphics g)
                {
                       // g.setBackgroundColor(Color.BLUE);
    
                     g.drawLine(0,0,0,70);
                }
    }
    

    When I call this HorizontalField I get the result, but in the amount column (i.e. red) background color I get half of this label, I don't know what problem I did

    Thank you

    The problem is in your calculation of width.

    Your should calculate your width in such a way that (approximate):

    Display.getWidth () = DateField width, width PED, Amt width + 2 * MyLine width;

    Furthermore, a solution may be simply change your constructor Amt class as below:

            Amt(String s)        {                   super(s,LabelField.RIGHT | Field.USE_ALL_WIDTH);        }
    

    Concerning

    Bika

  • Get the color system of the focus/theme

    Hello

    I want to emphasize text in a CheckboxField with the highest development/point system color / theme. I know that I could get forefront and background easily colors in the graphics but y at - it a way to get the update/point system color climax / theme?

    Today I have this code but the rendering is ugly quiet (black & white):

    CheckboxField cbField = new CheckboxField("test", true) {    protected void paint(Graphics g) {        if(this.isFocus()) {          int fcolor = g.getColor();            int bcolor = g.getBackgroundColor();          g.setColor(fcolor);           g.fillRoundRect(0, 0, this.getWidth(), this.getHeight(), 8, 8);           g.setColor(bcolor);       }     super.paint(g);   }
    
    };add(cbField);
    

    Kind regards

    Sylvain.

    These colors are not currently exposed in the API set BlackBerry.

  • How to get a color of the label and the UID of that color in Indesign CC 2015?

    Hello

    I found the API to set the color of the tag XML in InDesign CC 2015 as below:

    IXMLTagCommands::SetTagColor(IDataBase* db, UID tag, UID color);
    

    But I cannot yet understand where I can get the UID of different colors. Can someone help me with the file name for the same thing?

    Also, is it possible to get the XML tag color?

    Hi kapoor_aman27,

    different colors, take a look at IUIColorUtils in the SDK.

    Markus

  • Cannot make the fx color correction without getting the image of strobe

    Cannot make the fx color correction or blur fx with masks without getting the image to strobe. Do not return in the sequence, or export without the video strobe effect. It is clearly a problem since at least 2011 because I saw some forum posts dating back that far. Don't know how or why it is always a question 5 years later. I have the correction color fx on an adjustment layer that makes very well. Leave color and blur fx on a couple of individual clips is whats creating the problem. Does anyone have a solution? It does not appear that I can wait for Adobe.

    At this point, I would create a sequence for each clip (in the garbage, make a right click, create sequence and apply the FX it) then replace the clips in the mixture with the sequences.  -Test this point by one before they go crazy.

    OR, using the idea of sequence preceding above, return on a new clip with holiday color applied to replace as new originals in the mixture.

    Third idea: replace the clips with linked AE comp and try the color of leave which are.

    In short, do what you can to take the color of leave out of the final equation.

  • I use the first items 14 and tried "with instructions" make a black and white video with a special color. At first, I have to use the Darkred effect, but it has no effect. Other effects do not work. Can I get the desired effect?

    I use the first items 14 and tried "with instructions" make a black and white video with a special color. At first, I have to use the Darkred effect, but it has no effect. Other effects do not work. Can I get the desired effect?

    You mean the Edit guided for a video of Black & White with color Pop, right?

    If so, the program will be directed to the Hollywood Look effects Panel and black red effect.

    If this isn't what you are doing, please let us know where you find "instructions" there is no effect of dark red I know in the program.

  • How can I get the color picker to select the hexadecimal value by default?

    Hello world!

    I've upgraded to Photoshop CC 2015, and now when the color picker appears, it selects only the value of C (cynan) by default, which is useless. How can I move it back so the Hex value is selected by default?

    Thanks in advance for any help!

    Ah! I have it. If I open a new file and select the CMYK mode, C is highlighted.

    If I open a new file and select RGB, I get the Hex field highlighted.

    Gene

Maybe you are looking for

  • remove logo Messenger contact

    Contacts is a picture or initials of cards for each person.  Can they be deleted when sending an email?

  • How can I disable the popup to address link at the bottom of the page?

    I don't want links to appear in the small window at the bottom of the page. I used the solution here https://support.mozilla.org/en-US/questions/822487#answer-184316 but since Firefox 25.0 this annoying popup appears again.

  • Help the Server 2008 Backup

    I use backup assist and I rebooted rebooted the server and tape backup services does not work. Always all the errors point to the last disk error is a 1117 / BA102 error unhandeled exception in zip drive. What can more I also tried of band update of

  • Windows Update crashed my pc

    Hello After installing a recent downloaded file in Windows update and restarted the computer, and when Windows Vista is ready to load the files and all of a sudden a blue screen of death appears and automatically restarted again and again even in saf

  • How can we change the DPI?

    HOW CAN I CHANGE THE DPI? THE SCREEN IS TOO BIG. IT HAS CHANGED WITHOUT CHANGING.