Thanks for coming to, the world's #1 resource for all things InDesign!

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 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:


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


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 (a source for great plug-ins and scripts, both commercial and custom-made).


David Blatner

David Blatner

David Blatner is the co-founder of the Creative Publishing Network, InDesign Magazine, and the author or co-author of 15 books, including Real World InDesign. His InDesign videos at are among the most watched InDesign training in the world. You can find more about David at
David Blatner

Latest posts by David Blatner (see all)

  • - November 30, -0001
Related Articles

51 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?

  10. Thank you so much for this. I’m using it on an older version of Indesign CC (before the Adobe update) and it’s a life saver. I have to sync a website with a project in Indesign and it’s been a nightmare trying to match the colors. Thank you so much for this. :)

  11. I just tried this in CS6 and it did not work. What could I be doing wrong? Has anyone who was have problems with the in CS6 gotten this resolved?

  12. I’m trying to get my color palette imported into my Photoshop CS5 program using hexadecimal code such as 55C1FFFF. I have read the thread above and have downloaded CreateHexSwatch to my Mac.

    I have followed the directions to;”Double click on the file named CreateHexSwatch.mxp. This will open the Extension Manager and you will be prompted to install the extension.”. When I do this I get a message that says: “This extension cannot be installed, it requires InDesign version six or greater.”.

    Is InDesign a part of my Photoshop CS5 program that I install from a disk? Is there a way I’m going to be able to use hexadecimal color codes with my Photoshop CS5 program?

    • Mike: this add-on is for InDesign, not Photoshop. It lets you add hex swatches to InDesign. However, as I think the page says, the mxp extension manager installer doesn’t work with some versions of the product, so you have to read the instructions on how to install it manually.

  13. Oh my goodness this is fantastic! I’ve been struggling with trying to get the right RGB/CMYK but this makes life so much easier. Thanks for sharing!

Leave a Reply

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