Tab-Delimited Text Files
I hail from back in the day when building a profiling target from scratch was a laborious task, involving entering RGB or CMYK numbers by hand into a spreadsheet . When ProfileMaker 5 came out with its own target generator, I thought, "There's a skill set I'll never be called on to use again." Little did I know. There has continued to be and still continues to be a need for manipulating these text-delimited "CGATS-style" text files and getting into the guts of them to see what's going on. The long-awaited flagship product from X-Rite, i1Profiler, allows for several different file types to be used to save and load color lists as needed. Fortunately they have provided support for the more common text files to allow the average person to create and edit their own lists of colors and use them in their software.
In this article, I want to present you with a starting primer for how to build and work with color lists in the form of tab-delimited text files. This is not as daunting as it sounds. Even if you have never done any computer programing, I'll try to make this fairly easy to pick up and understand.
I suppose if I'm going to ask you to wade through a more technical article that you're used to with the CHROMiX ColorNews, I had better start out with a compelling list of benefits for you to do so! Once you know your way around how these color files are put together, you can:
- Create a list of Lab spot colors that you want to compare and analyze to see how they work in your printing system. These could be Pantone colors or other spot colors that you or your client are particularly interested in. A color list brought into a program like ColorThink will tell you quickly whether the colors are in or out of gamut for your printer.
- Go beyond the limits of the target generator in your profiling software to make a profiling target with *fewer* patches. Why? Perhaps you don't need a profiling target, but a customized "quality verification" target which contains the key colors that your company is interested in keeping an eye on. This would never be used to create a profile, but is a great way to fit the patches you want into a small space that you can print out once in a while to verify that your colors are consistent. I have used this with great benefit in a company that mostly produced 4x6 RGB prints and needed a daily "control strip" of specific colors that fit onto this small space.
- Move patches around in a target. It might be very useful to have a row of your primary colors in a certain place on your profiling target. Having a few K-only patches down in a corner makes it easy to verify whether color management was left on when printing the target. Just knowing how to do simple edits like this is very useful.
- Become a better troubleshooter. Say you are trying to regenerate a profile with an older measurement file, and your profiling software gives you a message that says "invalid file." Once you get to a certain point in your knowledge of color management, you're going to want to do more than merely fire off a tech support email to the software manufacturer and wait for an answer. A better solution is to find a workaround quickly to allow you to get your job done. Many error messages are attributed to problems in measurement files which are tab-delimited text files.
- Create unusually shaped targets. If you wanted to profile the face of a CD or DVD for example, you would need a round target with a hole in the middle rather than the usual rectangular target. It is possible to do this if you know how to edit reference and measurement files.
So what's a "CGATS tab-delimited text file"?
This is a simple text file (with a .txt extension) which contains table-based information that uses tabs to separate the different columns of information. You can create and use these files with a simple text editor (like Notepad in Windows or TextEdit in Mac) - but it sometimes turns out to be easier to work these tables out in a spreadsheet program like Excel, and then output them as tab-delimited text.
CGATS is the organization that rolled this exchange format into a standard (CGATS.17-2009) which has been widely adopted in the color industry. Sometimes people refer to any tab-delineated text files as CGATS files, but doing so could be a bit confusing, for the CGATS.17 standard also covers .xml files.
All CGATS-style tab-delineated text files will start at the top with a few rows of "header" information: Explanatory information defining the terms that will be used, and other necessary information. The last line of the header information is: "BEGIN_DATA" (minus the quotes). The only "footer" required is a final line at the bottom which reads "END_DATA".
In between BEGIN_DATA and END_DATA is the table containing all of your patch color information. For a reference file, you would see RGB data if this were an RGB color list (used for monitor profiles or driver-based printing) with numbers between 0 and 255. A CMYK reference will contain CMYK columns running from 0 to 100.
A measurement file will contain columns of Lab, XYZ or other flavors of information. It might also contain 32 bands of spectral information - which represent the actual bands of color that was measured by the spectrophotometer. These days, measurement files generally contain the reference information columns too, so that the same file can act as both the reference and the measurement.
But let's start it out nice and simple. Here's a small color list of Lab values that you could type out in about a minute. Just remember to separate the different "words" by hitting the tab key, not the spacebar.
- Lab_L Lab_a Lab_b
- 91 -2 96
- 44 -29 2
This will give you a 2-patch color list containing a yellow and a green patch. This is easily imported into ColorThink 2 or ColorThink Pro, where you can, for example, transform these values through a profile or view them in the Grapher. Of course, you can take this as a template and substitute your own Lab values and make the list as long as you like.
Oftentimes, color lists contain a leftmost column which numbers the items in the list, and also a column next to it which represents the name of the patch.
Some software have different requirements in the header that they are looking for in order to accept a file. You can easily figure out what's needed by saving out a sample file and opening it in a text editor to see what's in the header.
For example, here's a file that would work as a basic RGB reference file for i1Profiler. Type - or copy and paste the following:
- KEYWORD "SampleID"
- KEYWORD "SAMPLE_NAME"
- NUMBER_OF_FIELDS 5
- SampleID SAMPLE_NAME RGB_R RGB_G RGB_B
- NUMBER_OF_SETS 3
- 1 red 250 50 50
- 2 white 251 252 253
- 3 blue 30 30 180
You will have the start of an RGB reference list which can easily import into ColorThink 2 or Pro, or into i1Profiler as an RGB patch set.
A text editor is easily managed, but does not allow you to add/delete entire columns or sort data. So a spreadsheet program like Excel is a much better way to sort columns of data, rearrange data from one part of the color list to another, or eliminate or add entire rows. Don't have Excel? Google docs offers a simple spreadsheet program as well, and it's free.
Sometimes, you can open a text file directly into Excel and it will automatically walk you through a few questions relating to how you want the data parsed out into columns and rows. If you find that Excel does not accept a color list file directly, open a blank worksheet and, from the menu bar, choose: Data > Get external data... Here you can browse to and select the text file you want to get - and Excel will open it into your worksheet.
Some of the useful functions of Excel would be: Using the sort function to identify the location of specific patches in a long color list. If you decide you don't need XYZ data in a measurement file, you can easily delete those columns and edit the header information accordingly. Bringing a file into Excel will strip away any quotation marks that surround the color name, and then you can save this cleaner version out of Excel again. (Some programs won't accept a tab-delimited file that contains quotation marks.)
To save the file out of Excel back into the tab-delimited file that will open properly in all these programs, choose:
- File > Save As...,
- Give the file a name, and choose the Format as "Text (Tab delimited)", and
- Choose Save.
If you wish to immediately open this color list into another program, you will need to close out of the file in Excel, in order to allow it to be available to other programs.
So far I have been talking about reference files, required for creating targets. If you're also involved in measuring colors, you'll find that measurement files take different forms depending on what application you are using.
Applications / Programs
ColorPort is a free program by X-Rite which allows you to create, measure and save targets. Since X-Rite's MeasureTool app is being phased out, ColorPort is the recommended free, universal app going forward. ColorPort creates targets using the .xml format (another variant of the CGATS.17 format.) which is not quite so simple to read and edit as the ASCII format. But that's okay, because what you're really needing to know is how to save your data out of ColorPort. When saving a measurement, you get a dialog box with several options. The default format is "CGATS". Using either the default or the "ProfileMaker 5" option will get you files that you can bring into ColorThink, i1Profiler, Curve2, and others. You can also choose the "Tab Delimited" option which allows you to customize what information is included in the saved file.
MeasureTool, from the ProfileMaker suite, still has a large following of users. MeasureTool outputs its measurements as tab-delimited text files (there are no other options.) These are generally acceptable by most profile-building apps.
basICColor is a very popular profiling software in Europe. It is designed to work with CGATS tab delimited files, and accepts them easily.
If you have an i1Pro or an iSis chart reader, i1Profiler is the software you will likely be using to make profiles going forward. It can be a bit fussy about the flavor of text-delimited format that you import into it. It will accept fully compliant CGATS.17- formatted files, and some of the latest updates make it easier to accept older files and save out to various flavors of output format. If you have any trouble getting files into i1Profiler, use the examples in this article as a place to start troubleshooting. When saving your files out of i1Profiler, take advantage of one of the "ProfileMaker5 CGATS" options in order to view your files in ColorThink or import them into Curve2.
Curve software was developed before i1Profiler was released, so it was designed to accept ProfileMaker flavor of text-delimited files. When you read your P2P using ColorPort for example, choose the ProfileMaker5 option for the output format, and it will be accepted easily into Curve2. Curve2 also has the ability to export the P2P measurements that have been dropped into it. When exported, Curve strips off the original header and puts a simplified text-delimited header in place. These files can be brought into programs like ColorThink for diagnosis.
ColorThink and ColorThink Pro like to receive data in the ProfileMaker flavor of files. So choose this option when saving measurement files if you'd like to bring them into ColorThink for analysis. ColorThink can also export color lists created in its Worksheet. These have a simplified text-delimited header and the files containing reference information (device values) can be imported into Curve2, ColorPort, i1Profiler and basICColor Print. The ColorThink Pro Worksheet can also be used to simulate a measurement file by pushing device values through a profile to get Lab values. These files when saved out of ColorThink need changes to the header to be imported into i1Profiler, but generally work in other programs like basICColor Print.
Well, I'm at the bottom of the page, so I'm going to have to wrap this up. I'm sure what you've read so far has created more questions than I've answered, and I'm sorry about that. (I did tell you this was just a primer, didn't I?) Let me suggest that any readers that would like to take a crack at some of this should send questions to the ColorNews section of our ColorForums. I wrote this article because there is a dearth of information online about how to do this. With this article as a starting point and several discussions that might follow, my hope is that this will provide useful information about this neglected aspect of target manipulation and editing.
Thanks for reading,