Jump to content
You must now use your email address to sign in [click for more info] ×

Change font color via Data Merge


Recommended Posts

Hello! I'm trying to use Publisher to create some cards for a board game I am working on. It works very well so far, but I am struggling to figure out an easy way to change colors of things via Data Merge. I made a slight work around with images by using a direct path to the image that's a different color, but I cannot do that with text. Is there anyway to change colors of things with Data Merge? 

Link to comment
Share on other sites

@TheZBillDyl 

How many colors do you need for the fonts?

It is easy to change the color palette in COLRv0 fonts (takes minutes). Affinity apps support COLRv0 fonts. And it is relatively easy to convert a monochrome font into a single-color COLRv0 font.

So if you needed four colors you could have four fonts.

Could you run your merge in four batches?

@lacerto 

Any easy way to swap the font during the merge?

---

Edit: Or any way to tag the incoming text so a style could be applied later?

Link to comment
Share on other sites

@anto couple words from me,

Your trick of using colored images whose path comes from "Data Merge" and clipping them to the text to get the multiple coloured text after doing the merge operation — Well, my jaw dropped.
I haven't seen such a clever method on this forum in a long time, if ever.

Congratulations and a deep 🙇🏻 @anto

Link to comment
Share on other sites

16 hours ago, TheZBillDyl said:

I cannot do that with text. Is there anyway to change colors of things with Data Merge? 

Welcome to the forums @TheZBillDyl

Would not applying a Paragraph or Character Style to the various Data Merge Fields not work for you? Just set the Style to use the colour you want.

Mac Pro (Late 2013) Mac OS 12.7.6 
Affinity Designer 2.5.5 | Affinity Photo 2.5.5 | Affinity Publisher 2.5.5 | Beta versions as they appear.

I have never mastered color management, period, so I cannot help with that.

Link to comment
Share on other sites

9 hours ago, anto said:

Another way to do this is without using a font.
Create colored rectangles. Set the path to them in Excel. In Publisher, use the following layers structure as in the video

 

 

This is genius thank you. Is there a good way to ask for an official feature? I feel like changing colors via a spreadsheet is an important/useful feature with many applications. 

Link to comment
Share on other sites

19 minutes ago, Old Bruce said:

Welcome to the forums @TheZBillDyl

Would not applying a Paragraph or Character Style to the various Data Merge Fields not work for you? Just set the Style to use the colour you want.

I dont believe this would work. Since im making a card game, I want the title text to be a specific color on certain cards. For example, if it's a special card, the title should be blue. If it's a normal card, then the title should be black. 

Link to comment
Share on other sites

24 minutes ago, Old Bruce said:

Welcome to the forums @TheZBillDyl

Would not applying a Paragraph or Character Style to the various Data Merge Fields not work for you? Just set the Style to use the colour you want.

Only if/when Serif adds scripting and/or logic the APub's merge capabilities.

I do something akin to what the OP is looking to do via merge logic, character styles and different master pages in a different application. The working sample code is:

«fields bizcolor,biz,name,title,addy,csz,blurb
«if bizcolor = "blue"»«set master of this page to "B-blue"»
	«word 1 to 3 of blurb» «word 4 to 40 of blurb»
«biz»
«name», «title»
«addy», «csz»«endif»
«if bizcolor = "yellow"»«set master of this page to "D-yellow"»
	«word 1 to 3 of blurb» «word 4 to 40 of blurb»
«biz»
«name», «title»
«addy», «csz»«endif»
«if bizcolor = "green"»«set master of this page to "C-green"»
	«word 1 to 3 of blurb» «word 4 to 40 of blurb»
«biz»
«name», «title»
«addy», «csz»«endif»

The screen shot below is a compilation of the tab-delimited merge file (which has a field for color), the result after the merge (separate pages), the imposed result and the above merge code.

temp.png.8b3d0a63b632978993aaa03cda319c89.png

Link to comment
Share on other sites

25 хвилин тому TheZBillDyl сказав:

I dont believe this would work. Since im making a card game, I want the title text to be a specific color on certain cards. For example, if it's a special card, the title should be blue. If it's a normal card, then the title should be black. 

If you place the card titles in different columns in Excel table, and in Publisher, the fields are below each other, and assign a different text style to each field, it will work. If you need an example, I can record a video.

 

Edited by anto
video added
Link to comment
Share on other sites

17 minutes ago, anto said:

If you place the card titles in different columns in Excel table, and in Publisher, the fields are below each other, and assign a different text style to each field, it will work. If you need an example, I can record a video.

 

 

Honestly this is also a good work around. Thank you again. I love you all. I really hope Serif decides to implement color changing via Data Merge. I think it's a very useful feature that has many applications. If there's a good place to submit this as a request, please let me know. Otherwise, thank you all!!!! 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.