Scottish tartans can be used to make wonderful displays, either on their own, or as a background on which to build. Photographs of home or family look much better on this kind of background.
Still, there is a problem with most representations of tartan. The standard graphics files formats don't allow easy scaling or rotation, nor do they take into account that tartan is in essence a woven pattern - you should really see how it is made out of individual threads, and how those threads produce different colours as they weave across.
For this reason, I have developed the Tartan Definition File format. It's a pretty simple format which just allows you to define the colours used in a particular tartan, and then to specify the orders of the threads. You can find all the tartans I know about in this folder in tdf format. Of course you then have to convert these files into something you can use, and I have made the mktartan program to do this - it makes tartan images in .xpm format for Unix machines, or .bmp format for Windows. (Actually, the .bmp format is still buggy - I'm not really sure of the .bmp definition.) The program is in C source code, you will have to compile the code for your machine. Personally, I use Linux all the time, but I believe there are other operating systems on the market.
What is the advantage of doing it this way? Well, you can make your chosen tartan appear either on the straight or on the cross, with the pattern diagonal to the display. Secondly, you can scale the tartan to the size you need - just as real woven tartans have different setts. Thirdly, you can make a tartan appear rough or smooth, by adjusting the apparent thread size.
And of course, there's nothing to stop you inventing your own tartan - I did that just to make the background for this web page. Here's the instructions for mktartan.
Mktartan converts a .tdf (tartan definition file) into the equivalent pixmap (.xpm) file or bitmap file (.bmp) for Unix or Windows systems respectively. The command line options are:
The tartan is simply defined by the colours and numbers of threads that will appear in the weave. Normally, you will only need to define half of the warp (the horizontal part of the weave). This may be doubled by reflection, and the same pattern used for the weft or woof, which is the vertical part of the weave. The following two kinds of commands may be used in the .tdf file.
#<6 digit hexadecimal number> <letter>
Defines the colour known by to have a certain colour value, using the normal RRGGBB colour convention. The colour number must be exactly 6 digits long. Colours must be defined before they are used. Example: #ff0000 y represents a red colour.
r6(g10b10)k1
states that the weave will contain 6 red threads followed by 10 green, 10 blue and 1 black thread, provided that the appropriate colours have been defined. After these colours, the section in brackets will be reversed and appended to the weave. There may only be one pair of brackets in a pattern line.
If a file contains one pattern line, the pattern will be used for both the warp and the weft. Two pattern lines will generate separate warp and weft patterns. More than two lines cause an error. All tartans only require a single pattern line since they are the same in both directions. However many tweeds do require two lines, because they are not symmetrical in this way.
| Example Tartan: Mar District | |
|---|---|
|
|
| Example Tweed: Kincardine Estate Tweed | |
|
|
Tip: When you view the resulting graphic file using your favourite viewer, you may consider that the tartan can be improved. You can do this either by modifying the .tdf file and running mktartan again, or by modifying the final graphic image. For example, I often use xpaint to add 5% noise to the pixmap file, which makes the tartan have a rougher woven appearance. Compare this last image which has added noise with the previous tartan.