Create Hexadecimal Color Swatches in InDesign for Interactive Documents

There are lots of ways to spec a new color swatch in InDesign, but they’re all based on RGB, CMYK, Lab, or a color library such as Pantone or Trumatch. Many folks brought up with HTML find it helpful to spec colors in hex code (such as #41bbac) or using standard HTML color names (such as red, purple, or darksalmon). If you’re into those kinds of colors, you’re going to love this new, free add-on from in-tools.com called ?CreateHexSwatch.

CreateHexSwatch is technically a “start-up script,” which means it shows up as an actual menu command, not in the Scripts panel. It works with InDesign CS3, CS4, or CS5. It comes with an mxp installer which works in CS5, or — if you’re using CS4 or CS3 — you can simply drag the “?CreateHexSwatch” folder into your Scripts folder (inside your InDesign application folder).  When you relaunch InDesign, the item New Hex Swatch shows up in your Swatches panel menu:

hex1.png

When you choose that, up pops a dialog box that lets you spec your color in a number of ways:

hex2.png

You can drag the sliders, type (or paste) a hexadecimal value, or type in a html color name. If you have Photoshop running, the dialog box even lets you grag the current foreground color… is that totally awesome, or what?!

Hidden bonus tip: If you click on the color swatch (the colored square), you can use your system color picker to choose the color. (At least that works on the Mac OS… someone try it on Windows for me, please.)

As with the regular new color swatch dialog box, you can click Add to add the button and leave the dialog box open, or click OK to add-and-close. Curiously, this dialog box floats kind of like a panel/palette, so you can actually leave it open on your screen. That’s wacky.

Of course, if you are creating documents for print, this add-on may not be so helpful. Even though there is an option to define these colors as CMYK, you should always refer to a printed swatch book for best results (not just picking a color that looks good on screen).

To download CreateHexSwatch, click here.

Quick history of this plug-in: Someone asked me if such a thing was possible last week, I bounced the idea of a script off Harbs, and this week we have a new feature that is going to help a lot of people! I applaud Harbs and in-tools.com (a source for great plug-ins and scripts, both commercial and custom-made).

Enjoy!

Tags
Related Articles
Comments

35 Comments on “Create Hexadecimal Color Swatches in InDesign for Interactive Documents

  1. @Franck: It works the proper way (eab converts to a very pretty EEAABB).

    @Marijan: Thanks for the info!

    Also, note that the color lookup works both ways. If you type 8b0000, it names it DeepRed (because that’s the html name).

  2. Nice. Good to know. A few people have asked me about this.

    I’ve been using the Kuler panel to insert Hex values add the swatches.

  3. David, this is great! Such a simple thing to bypass an irritation in the UI.

    It’s particularly relevant because I find myself doing more and more work in InDesign that I used to do in Photoshop. Digital (LED) advertising billboards, marquees, web banners and even web page headers are so much faster and easier to lay out in ID than in Photoshop.

    The supermassive, singularity-creating SWFs that ID produces aren’t a lot of use for web, but they are functional for interactive touch-displays and animated digital signage (which I don’t much care for, but the client does!). They’re all RGB and again, being able to specify hex values is handy.

  4. Harbs, I think you are correct. Interesting!
    That’s a great blog post, too. Very helpful to anyone interested in scripting.
    Thanks again for a great script and service to the InDesign community.

  5. Lost in confusion, I would like to publish a book on line epub through my website
    it is combo, poetry, full spread photos, interactive pages and sound and transitions

    what is the way to to go
    swift html

    pdf interactive and add sound in adobe acrobat

    I have adobe master suite

    please assist
    thank you

  6. I guess I am the only one trying this who uses a Windows computer. Yes, David, double-clicking the color swatch in the dialog box does invoke the Windows system color picker. I am new to Web design and inter-active docs so the hex numbers still look like so much gibberish to me. Always another code to learn! Thanks a lot good people.

  7. A million thanks! I have spent several hours struggling with Photoshop to recolor a logo with specific hex colors (Photoshop CS5, it keeps “changing” the codes). I ran across this today, and in 5 minutes the task was done. I am a long-time follower, there is so much of value here! Thanks again!

  8. Thanks a lot. I never spec colors in Hex but what I use Hex values a lot for is copying and pasting colors.

    If I am creating styles (Drop Shadow, Outer Glow, etc) in Photoshop or InDesign, the Hex value is the only way that I know of to copy and paste colors between panels.

    I use it in the same way in Illustrator to copy and paste colors.

    Thanks again.

  9. Erm, can’t seem to get this to work. Installs fine and comes up in the swatches menu fine but then I type in the Hex no. and it all goes wrong. As soon as I click on the ‘name’ field the colour switches automatically to RGB black. Same thing if I simply click ‘Add’ or ‘Done’. What am I doing wrong?

    • Ditto to Hailey, James and Aaron… would love to be able to install this in InDesign CC – but how?

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>