Read color values for swatches in InDesign CS5, js

Hi,
I  need to read color values for  swatches. I got this in OMV and was hoping it would give me an array of the color values for all existing swatches, but I am only getting "Object color":
mySwatches = myDoc.swatches[1].getElements();
alert (mySwatches)
Thank you for your help.
Yulia

Hi Yulia,
Try this:
var
    mD = app.activeDocument, // document
    mS = mD.swatches, // document swatches
    gS = 4, // swatch index
    mC = [mS[gS].name, mS[gS].colorValue, mS[gS].space]; // swatch properties
alert(mC.join("\r"));
Hope that helps.
Marijan (tomaxxi)
http://tomaxxi.com

Similar Messages

  • Delete unused swatches in InDesign CS5, js

    Hi,
    I need to select and delete unused swatches in InDesign CS5. I looked through OMV in "Swatches" and "Swatch", but I could not find any function to select unused swatch and delete it.
    Am I looking for it in the wrong place?
    And I also need to read color values for used swatches. I got this in OMV and was hoping it would give me an array of the color values for all existing swatches, but I am only getting "Object color":
    mySwatches = myDoc.swatches[1].getElements();
    alert (mySwatches)
    Thank you for your help.
    Yulia

    Hi Yuliaart,
    Try this script it will help ful.
    # target "Deleting unused swatches change the gradient"
    var myIndesignDoc = app.activeDocument;
    var myUnusedSwatches = myIndesignDoc.unusedSwatches;
    for (var s = myUnusedSwatches.length-1; s >= 0; s--) {
         var mySwatch = myIndesignDoc.unusedSwatches[s];
         var name = mySwatch.name;
    // alert (name);
      if (name != ""){
    mySwatch.remove();

  • How do I input a specific color value for a shape?

    I've been trying to figure out why I cannot input a specific color that I want for a shape. I'm not just choosing a color that looks nice, I'm trying to match it to a solid color in the next clip. Ive tried to use the eye dropper to get the color from the next clip but I cannot copy anything outside of the color pallete provided. I know the value of the color (from 0-255 it's R:191, G:211, B:217) but all FCPX has is 0 - 1, which is some other kind of color value system I've never seen before. Does anyone know how I can put that specific color value into the shape generator?

    Click the color swatch to open the Apple color picker. This is common to all Mac apps.
    Click the second tab for color sliders. Change the popup to RGB.

  • Creating fly-out menus for website in InDesign CS5

    Hi all, I've just upgraded to CS5, and am looking into the new release of InDesign CS5.  In the past, I had created websites in MS Publisher, and then exported the publication as website as html.  I then uploaded the resulting HTML to my website using Cute FTP.
    I dabbled around with Adobe Contribute, and still found it rather restrictive, as I could not create coloured text boxes, text frames, roll-over buttons and etc.
    Hoping that I'll have better luck with InDesign CS5.  I'm intending to create my website from scratch, and when finished, hope I can export the publication in InDesign as HTML.
    Just wondering if there is a feature in InDesign CS5 that can create drop down or fly-out menus for a website?
    Thanks

    It might be easier to invest in something like Quite Imposing, an impostion plugin for Acrobat. It's far less expensive than a full-blown professional imposition program and if you need to impose a lot of PDFs, it will pay for itself quickly.

  • Creating a Template for PDFs in InDesign CS5.5

    Hello.
    I'm trying to make a template for imposing PDF documents in InDesign CS5.5. The template needs to have trim marks and needs to fit 4 A5 pages on it. The page size needs to be 450mm x 320mm (SRA3) and should have guidelines (which I can't move by an exact amount) to help with positioning.
    Any help would be greatly appreciated!

    It might be easier to invest in something like Quite Imposing, an impostion plugin for Acrobat. It's far less expensive than a full-blown professional imposition program and if you need to impose a lot of PDFs, it will pay for itself quickly.

  • What are the color values for imessage and send buttons?

    I am trying to paint my room. Does anyone know the specific colors of the 'imessage bubble' or the 'send' button on the iPhone, iPad, iTouch. The RGB or Hexidecimal values would work. Thanks!

    Use the DigitalColor Meter app located in your utilities folder. This will allow you to hover over areas of your screen and it will display whatever type of values you want it to.
    Translating this into a paint chip number at the hardware store might be a bit of an issue though. There is no method (at least that I'm aware of) to translate computer color codes to paint swatches.

  • Need help with Italics for ePub and InDesign CS5

    Could someone help a me out. I just can not find the answer to this and I know it should be simple, I am just missing it.
    I am creating an ePub from CS5 InDesign. All I want to do is have the italics that are shown in the text box in InDesign, show up in the epub file.
    I would prefer not to say what I have done (I think I have tried everything, but obviously I did them all wrong, so no point listing them) and I am hoping someone can do a simple, step by step guide to how to have italics show up in the ePub file.
    Sorry if this question is beneath everyone, this is really annoying that I can not figure this out on my own.

    Yup, done this.
    In InDesign, the text is Italic. It has the Character Style Italic associated with it.
    But when I export to ePub, it is not italic.
    Here is the HTML from the xhtml file for a single line of what is supposed to be italic text,
    <p class="normal normal-override-2" xml:lang='en-us'><span class="italic italic-override">Words that should be Italic.</span></p>
    The above line does not show up as italic in any of the 3 readers I am using to test with.
    Now, in the css sheet, the span.italic-override does not have anything associated to font-style. If I manually add the font-style italic, then re-pack everything, it works.
    It just seems to me a bit absurd to have to export the epub, unpack it, open it in dreamweaver, add the font-style, and repack it just to have something as simple as italic work.
    So, I am missing something, I get that... I just can't figure out what!

  • Looking To Change the Defaults for Placing Options Indesign CS5

    I have just started using CS5 and have a question. 
    Right now when I go to place a PDF into Indesign the program always defaults to crop or image.   I would like that to default to media.    We place dozens of PDFs and waste time selecting options and then changing it to media.  
    Is there something in preferences that I can do to make this happen? 
    or
    Is this because of the way the PDF was created?

    When you change the crop options when you import a PDF you set the default. Hold shift when you click OK to place and you’ll be prompted for the import options. Set them and they will become the new default.

  • Corner options for line in InDesign CS5 js

    Hi, with CS5 update I am getting an error message the 'object  doesn't support property of the method cornerOptions' when I use code from CS4:
    myRoundCornerLeftBottomVerticalWhite = myDoc.graphicLines.add (myDoc.layers.item ("Die"));
    var myPathPoint = myRoundCornerLeftBottomVerticalWhite.paths.item(0).pathPoints.add (myDoc.layers.item ("Die"));
    myRoundCornerLeftBottomVerticalWhite.cornerOption = CornerOptions.ROUNDED_CORNER;
    myRoundCornerLeftBottomVerticalWhite.cornerRadius = myRadius;
    I am not sure what I can use instead.
    Thank you for your help.
    Yulia

    Ok, here is how far I got with it, but it's not working:
    myRoundCornerLeftBottomVerticalWhite = myDoc.graphicLines.add (myDoc.layers.item ("Die"));
    myRoundCornerLeftBottomVerticalWhite.geometricBounds = [myPageHeight/2+.0625, 0, myPageHeight-.25,  0];
    myRoundCornerLeftBottomVerticalWhite.strokeColor = myDoc.colors.item("Black");
    myRoundCornerLeftBottomVerticalWhite.strokeWeight = "2pt";
    var myPathPoint = myRoundCornerLeftBottomVerticalWhite.paths.item(0).pathPoints.add (myDoc.layers.item ("Die"));
    myPathPoint.anchor = [".25 in", myPageHeight];
    var myPathPoint = myRoundCornerLeftBottomVerticalWhite.paths.item(0).pathPoints.add (myDoc.layers.item ("Die"));
    myPathPoint.anchor = [myPageWidth/2-.0625, myPageHeight];
    myRoundCornerLeftBottomVerticalWhite.paths[0].pathPoints[0].pointType.CORNER(CornerOptions.bottomLeftCornerOption = CornerOptions.ROUNDED_CORNER);
    myRoundCornerLeftBottomVerticalWhite.bottomLeftCornerRadius = myRadius;
    or maybe:
    myRoundCornerLeftBottomVerticalWhite.paths[0].pathPoints[0].pointType.CORNER.cornerOptions.bottomLeftCornerOption = CornerOptions.ROUNDED_CORNER;
    It works up to the point:
    myRoundCornerLeftBottomVerticalWhite.paths[0].pathPoints[0].pointType;
    The rest I am not sure how to connect.
    Thank you for your help.
    Yulia

  • How would you do a batch export of HTML ("for Dreamweaver") in inDesign CS5?

    We have a large library of indesign files that we need in a machine readable format for parsing text.  Right now HTML seems the best option for these particular files and our requirement. Anyone have a script or any other helpful tips?
    Thanks!

    We have a large library of indesign files that we need in a machine readable format for parsing text.  Right now HTML seems the best option for these particular files and our requirement. Anyone have a script or any other helpful tips?
    Thanks!

  • Determining in and out Gamut values for RGB profiles

    Hi all,
    I am looking into how to check if a swatch value falls within my .icc profile gamut.
    If I have a color value for example L=74 a=12 b=-37 and I want to see if it falls within my .icc profile I can select Edit>Convert to Profile and choose my profile
    I then can select the swatch and see if there's a gamut warning there.
    With the above swatch if my color profile is "Photoshop 5 Default CMYK" I will get the warning, if I change the profile to "US Newsprint (SNAP 2007)" I won't get it.
    This works great for CMYK profile.
    My question is how to check if the color falls inside an RGB profile?
    I have tried changing the document intent to Web and Digital Publishing and changing the RGB profile but only changing the CMYK profile affects the out of gamut warning.
    Does any one know of a solution to this? The same issue would appear to be in photoshop.
    Thanks in advance.
    Trevor

    Timo,
    actually he wants to set the attribute mapping dynamic, reading the field to map the return value to from a custom property.
    1D10T,
    If this could be done then in the Def object of a view object (which means its not per user session but use). Investigate into the View Object Def object for the view object that defines the list of value (not the one that you use as the LOV list source)
    Frank

  • Indesign CS5 won't Save or Save as..

    I have recently installed Mac OSX 10.6.3  (snow_leopard) onto my iMac and now for some reason Indesign CS5 will not save or save as.
    It allows me to selecteither of them in the menu but nothing happens at all. If i try to close the document after making changes it just closes without asking if i want to save and i lose all the changes.
    I have also gone to the extent of doing a clean installation  of the OS & CS5 with no difference whatsoever.
    Any ideas would be extremely helpful..
    Thanks

    go back to Replace Your Preferences to get the paths to the folders in your user library, then try moving the entire folders to the desktop and restart ID.
    If it's still not working, John Hawkinson has mentioned some other files that seem to be involved when it works in one user and not another, but you'd have to do a search here as I don't know the names and locations for all of them (I'm on Windows). I think he's suggested these at least twice in the last month or so, so they should come up.

  • Indesign CS5 Duplex printing Postscript file

    I am designing a book half english half spanish—It is an instruction manual so you read the english then flip it and read the spanish.
    In my Indesign CS5 document pages 1-30 are English then 30-1 again are spanish (upside down). I need to export them as a postscript file so that I can print it double sided correctly for a mock up.
    I am making multiples of these books and only some are exporting to a postscript correctly and I cannot figure out why.
    When exported to postscript correctly, it should look as if the left page is the cover in english and directly to the right of it is spanish but upside down, and then it alternates all the way to the end. So for example:
    Spread 1: English on left right side up, Spanish on right upside down.
    Spread 2: Spanish on left, English on right
    Spread 3: English on left, Spanish on right.. and so on
    But, some, are exporting so it shows a cover, then a blank page, and all the pages are jumbled up. (I do have "do not include blank pages ticked when exporting to postscript)
    The only guess I have is that it has to do with the page and section numbering? I don't know if this effects how the postscript converts or not. But, I have several books exporting very differently to post script. Please let me know if anyone can help me figure this out!

    I had a brief PM conversation with Stephen this morning, and it just hit me that I may have been thinking about this incorrectly. There are actually two approaches to this kind of document.
    The approach I've been envisioning presents the reader with all the text on only the right-hand pages -- the lefts are all the other language upside down. But thinking back to my youth and buying some two-title sci-fi paperbacks, I think those were built so that if you tore apart the binding in the center of the book you'd wind up with two "normal" books without back covers, and there would be no page overlap between the two titles.
    I'm guessing that the OP actually means to do the second, and I apologize for being dense yesterday. Seems like it was happening all week. If that's true (I mean the binding layout, not my being dense), then I understand what you were saying about Print Booklet, and there's actually a pretty easy way to make this work, I think without a plugin (though IDImposer might turn out to be even easier).
    Here's the approach I would use to make a single book that can be cut apart to make two independent volumes:
    First, download Scott Zanelli's Multipage Importer script from InDesignSecrets » Blog Archive » Zanelli Releases MultiPageImporter for Importing both PDF and INDD Files The script allows you to automate placing multiple pages from either a PDF or another .indd file into a new .indd doc, and it allows you to select the page range to import, the page on which to start placing, and allows scaling, rotation and alignment adjustments.
    Since you have two 30-page sections, make a new 60-page file. The first time you run the script, place the first 30 pages normally, starting on page 1. Now run the script again, choosing the range 31-60, but do the following: check the Reverse Page Order box, Start Placing on Doument Page 31, and Rotate 180:
    You can run this new file trough Print booklet.
    The original content in the new file cannot be edited directly other than moving pages around or cropping/sizing/repostioning the page images. If you need to make text changes or other edits, do them ithe original, then update the links.

  • Consistent RGB Color Values with Photoshop CS4: An Impossibility??

    What I want is very simple: I want the Photoshop files I am working on and the rendered PNGs in my browser to have the same color values. I don't care if my web images look the same color on other screens or anything like that. All I want is for the screenshots of PNGs my web browser to match the color values I have used in Photoshop. I've had it up to here with color shiftsthis did not used to be an issue in CS3.
    Moreover, if I save a file on my Mac, and a color value is, say, #cf4640, I want someone who opens the file on a Windows box to get the same color value for that pixel. Ditto for the images I have saved for the webI want the RGB values to be consistent. This does not seem like too much to ask, does it?
    Right now, I have turned all color management policies set to Off, working spaces are all set to Generics, and documents are set to "Don't Color Manage"my Windows colleagues also have these same settings. This used to work as expected in CS3we all got the same color values on the same files, and colors didn't shift when viewed in a browser.
    Once again, I don't care if the colors *look* the same from platform to platform or screen to screen. I just want consistent RGB values.
    Color management has never caused me anything but headachesleave my colors alone, Photoshop! I really really wish there was a "Work Like Photoshop 4" setting for color management.
    Does anyone have any ideas how I might solve my problems?
    Thanks very much.
    Oh, and, incidentally, I was originally thinking of calling Adobe about this; how foolish of me. I looked into it, and can I just say how fantastic it is that you have to pay extra money for actual first-party tech support on a $700 piece of software?

    The sounds/language analogy isn't really relevant to this problem, because it suggests transforming between two entirely different media. One medium: the medium of sound information, to another entirely different medium: the medium of thoughts and meanings. That's something that simply can't be done without an intermediate translation. That's not the case with color transforms in the RGB space, where it's just a matter of taking RGB values and pushing them through a matrix to produce other RGB values. That's the process that messes everyone up and creates all the confusing color output, and frankly it's an unnecessary process. Your assertion that the values in a source image have no meaning without an associated profile isn't entirely true. What if those source values were simply pushed directly though to the display? After all, a display simply renders 8 bits of R, 8 bits of G, and 8 bits of B for each pixel.
    I think the original poster has some very valid concerns. Sometimes we just want to set some color values, and know that everybody's display, on every platform, will render those color values the same way. As he said, they may not look identical to the eye, but the values going through that DVI cable will be setting that pixel to the same 24-bit value no matter what. That's how things would be if there were no such thing as color management. That's how things used to be long ago, and in many ways the world of color was far more predictable and less confusing back then.
    Here's my vision for a perfect world: color management doesn't exist in the RGB space. None. No such thing. Source RGB values in images get pushed right through to the display. The onus is on the display manufacturers to produce hardware that renders those values as consistently as possible. In the world of print, sure- color management is incredibly useful. But if only we could go back in time and keep color profiles out of our RGB, I believe we'd be much better off today.

  • InDesign CS5 and inCopy CS6 workflow problem

    I've looked at other discussions and haven't found any to answer the question to our problem.
    We are a small publishing company and we have license for roughly 7 inDesign CS5 copies that we purchased a year ago.  We contract with outside editors to edit content for us using inCopy.  For a year there hasn't been any problems.  But any new contracted editor we now sign, which in turn purchases inCopy, we are having trouble with our files talking to one another.  Any new contracted editors are only able to purchase CS6 inCopy.  This leaves us with the problem of having inDesign CS5 on about 7 or so of our employees machines and 6-8 CS 5.5 InCopy on outside contracted editors and an additional 3-4 contracted editors with CS6 inCopy.  When the editors with CS6 inCopy try to open files from our InDesign CS5, either they won’t open at all, or they will open, the editor works on the project for awhile, their program crashes and they are not able to recover (re-open) the files again.  Which results in hours of lost work.
    Has anyone else come across this problem?  Is there a work around or a quick fix.  We would hate to have to upgrade to CS6 for all of our in house copies of InDesign and then ask our outside editors what do have inCopy cs5.5 to upgrade to CS6. 
    If this is the case, when CS7 comes out, and we hire additional outside editors, will we continuously have to go through the process of upgrades again?  This is too costly for use and our existing contracted editors.
    Any thoughts are assistance would be appreciated.
    This is one of the error messages received from an outside contracted editor using inCopy CS6.  The file crashed after several hours of work, when the editor went to reopen the file, they received this error.  Which looks to be a generic error code that doesn't tell us anything.

    Hi Ruffus,
    Unfortunately different versions of InDesign and InCopy do not work well with each other. Newer versions of the program should be able to open older files, but they cannot save backwards. I am not sure what is causing the errors with the newer versions of InCopy however.
    Are you able to open the CS6 InCopy files on your computers?   

Maybe you are looking for

  • Update button doesn't work in Chrome. Again.

    I created a blog post in Chrome and saved it as a draft. worked fine. Now each time I update the post and try to save it (update) or save a draft, nothing happens in Google's Chrome. works well in Safari and Firefox on a Mac. Should I avoid using Chr

  • JSF pages to display content from external URLs

    Hi, Is it possible for a JSF page that uses ADF controls, and the PanelPage component to provide menuing, etc. to actually allow a HTML page (accessed via a URL to an external site/application) to be displayed in an area within the JSF page? For exam

  • My ipod is locked and wont inlock

    my ipod is locked and wont unlock. it says that I have to wait 23,646,570 minutes i have no clue what to do need help!!

  • How to open a .pvm file

    I need to open a .pvm file for a Dynojet power commander for motorbike programme...?

  • How do you restrict the number of table columns on the data tab?

    I have a table with 50+ columns. Is it possible to restrict the list of columns on the data tab to say 5 columns as I'm only interested in seeing/updateing the data for these 5 columns. You can restrict the number of rows using the filter but not the