is now part of CreativePro.com!

Applying Any CMYK Color During a Data Merge

6

In my last article, I demonstrated a technique that could be used to apply colors to fills, type, variable QR Codes and vector graphics during a Data Merge. A limitation with this technique is that it relies on having the appropriate swatches already in the Swatches panel. This means any new color added to the database requires a not only a new swatch to be created, but also a new character style and a new GREP style applied to the paragraph style.

With the technique in this article, it’s possible to apply any whole-number color formulas with the process colors Cyan, Magenta, Yellow, and Black (CMYK).

What’s required for this technique

  1. Character styles for each color shade in 1% increments*
  2. A paragraph style for each color channel that contains the GREP instructions identical to the heat map GREP styles demonstrated here*
  3. A text frame that is set to Darken at the Object level in the Effects panel. Four of these frames will be required for each color channel that will combine to make the final color*
  4. A frame that will become a frame that changes color*
  5. A database that has four columns that will contain values between 0-100 for each of the color channels Cyan, Magenta, Yellow and Black

*Because this is a tedious chore, I’ve done this in advance and you can download the files by clicking here. The text frames containing the color channels have been pre-filled with the number 50.

How this technique works

It works in an identical fashion to the GREP heat map technique: when presented with a number between 0-100, a GREP style determines what tint strength of the underlying fill color is required. The point of difference with this technique is that it happens to four different colors that are then overlapped with the Darken blend mode in the Effects panel. The result is a full color square that can then be applied in a fashion similar to the Knockout Group transparency technique.

Preparing this technique

First, open the linked file to obtain parts 1-4 of what is needed for the technique.

Next, from the Data Merge panel, select the text database that will be used to represent the color values. In this example, the database has four fields, one for each color channel.

With the text tool, highlight the text that is currently in the light cyan square and then add the Data Merge field that contains the Cyan field into the text frame and turn the Data Merge preview on.

Repeat this process with the remaining three colors, toggling through records to confirm that the colors in the squares are changing accurately.

If the colors are behaving as expected, highlight the four color squares and align them to their horizontal and vertical centers, and group the selection. Notice that the colors are combining to form the end-value color.

Toggle through the records to confirm that the colors are behaving as expected, and the effect is behaving as expected, cut the newly grouped item and in the clear rectangle, select paste into.

The technique is now complete and can be implemented in a similar fashion to the techniques demonstrated in the changing colors article. To demonstrate this, I’ll open the example from the changing colors article, and implement the technique here.

Because the color channel values weren’t in the original database used to prepare the original technique, this meant adding the four columns to that database so that the colors would change.

Taking it even further: spot colors and gradients

The technique will also work if the CMYK swatches are replaced with spot colors, mixed inks, or gradients. The only tweaking to this technique will be changing the variable color frames at the start from the Darken blend mode to Multiply.

A prepress operator and graphic designer for a South Australian commercial printer, with close to 20 years of experience in the trade. He is also a regular contributor to this site and InDesign Magazine, and hosts his own prepress blog "Colecandoo".
  • VASILY HALL says:

    Great article Colin!

  • ????? ????? says:

    Great Article Thank you so much

  • Nico Lino says:

    Hi, nice one.
    But there is a way that you could adapt it for changing bloc text and graphics color with hex code value ? (#000000, #673c17 …) so in this case my client can fill by adding for elements and background document his own value ?
    Thx by advance

  • Nico Lino says:

    Just try the technic. It seems to work cause when linking simple 4 text files with data i can read each data and see values changing when testing, but my 4 grouped colors are always showing a brown dark color
    (i grouped / aligned 4 color blocks with darken effect)
    Someone can please help me ?

  • >