[XeTeX] placing and colouring a graphic

Peter Dyballa Peter_Dyballa at Web.DE
Fri Aug 22 21:42:30 CEST 2008

Am 22.08.2008 um 13:35 schrieb William Adams:

> Okay, I've spent a day of my life, banging my head against a wall,
> trying to script changing the fill colour of a graphic in InDesign and
> I'm giving up on that, and hoping that I can just pre-process the
> graphics in TeX.

How about converting the TIF files to XPM format? These files have a  
header like in this multi-colour example:

	"  c #01c601c601c6",
	". c Gray40",
	"X c #a527a527a527",
	"o c #da22da22da22",
	"O c None",

To make the XPM file with this header monochrome, you'll just need to  
change every colour that is not "None," or "white," or  
"Grey100" (possible synonyms for "no colour here," transparency is  
unknown) to "Black." Then you could change the characters  
representing the original non-white colours (i.e. SPC, ., X, and o in  
my example) to one of these characters, best the SPACE character.  
Then you could delete the duplicate colour mappings. Finally convert  

XPM is completely US-ASCII. Each particular character stands for one  
particular colour as mapped in the file's header. If more than about  
60 colours are used, then all the colours are encoded by pairs of  



Almost anything is easier to get into than out of.
				– Allen's Law

More information about the XeTeX mailing list