All applications use computer code to describe how they look. With a little work, you can get to the code that makes iTunes looks the way it looks and alter it to your heart's content. This method isn't as simple as "Skin iTunes with ShapeShifter" . However, your efforts will be rewarded, because you will be able to change elements of the iTunes UI that ShapeShifter cannot touch.
Figure 1. Activating your theme in the ShapeShifter System Preferences panel
For this hack, we'll open up the iTunes resource file and change the code of hex values to adjust the appearance of the iTunes GUI. In order to open and edit the resource file, you need HexEdit (http://hexedit.sourceforge.net; free).
A typical Mac OS X application is not a single executable file but rather a bundle of files that contain their own executable binaries to make things tick. Apple hides all this from us, so that all we see is one tidy iTunes icon. However, with a little hacking, we can get to an application's executable binaries.
To find the executable file we want to hack, first open iTunes' package contents. Make sure iTunes is closed and Control-click on the iTunes application icon in the Finder. A contextual menu will pop up. Select Show Package Contents, and you will see a list of files usually kept hidden from you, as shown in .
Figure 2. iTunes package contents
The file we are interested in is a Unix executable file, /Applications/iTunes/ Mac OS/iTunes. Because this file is the code behind iTunes, if we mess anything up, iTunes won't open, so go ahead and make a backup copy (Option-drag) to your desktop. That way, if anything goes awry, you can simply copy it back and, Bob's your uncle, it'll be good as new. When you launch HexEdit, you'll be taken directly to an open window. Navigate to the iTunes executable file and click the Open button. shows the open resource file. Within this file are the hexadecimal color codes that iTunes uses for its interface; find and change them, and you'll alter the colors of the elements in iTunes.
Figure 3. The code that makes iTunes tick
Before changing any colors, you'll need to figure out what you want them to be. Digital colors can be described in several ways: RGB (Red, Green, Blue), HSB (Hue, Saturation, Brightness), and, for the purpose of this hack, by hexadecimal values. The hexadecimal system is unique to describing color on the computer and is a base-16 number system. Don't worry; you don't need to know the ins and outs of hex colors to get this hack going (although it helps to have a little background so these strange numbers don't throw you off).
To determine which colors to use, open DigitalColor Meter, which is included with Mac OS X and is located at /Applications/Utilities/DigitalColor Meter. Using this tool, you can find out the color of any pixel on your screen. The iTunes executable file uses color in the 16-bit hexadecimal color format, which DigitalColor Meter can translate. Just select "RGB As Hex Value, 16-bit" from the pull-down menu.
Now, as you drag your mouse around your screen, you'll notice that DigitalColor Meter picks up and displays the color values of the individual pixels, as shown in .
Figure 4. DigitalColor Meter, picking up the hexadecimal values of any pixel on the screen
If you are just playing around with this hack, you can open a colorful web page and capture a color that interests you. You can lock in a particular color at any time by pressing &command;-L; DigitalColor Meter won't track new colors as you move your mouse about until you unlock it again with another &command;-L.
Once you've chosen your hexadecimal color code, it's time to paint iTunes with it by entering the code into the iTunes executable file you have open in HexEdit. Use the code references in to find the element you want to adjust.
Make sure to read through the rest of the hack before you get started. Making changes willynilly will render your iTunes unworkable.
Table 4. Code references for elements to adjust in iTunes
Background of songs
Vertical bars that separate columns
Etched text colors
Content frame colors
Select and inactive
Select and inactive
LCD level indicator colors
Actual levels Top
Window titles text colors
For this example, let's change the background of the LCD in iTunes. The code we need to find is 003B8E50.
This is not the hex value of our new color; it's the line of code we need to find in the iTunes executable file.
Switch to HexEdit, go to Find → Go To Address, and enter 003B8E50, as shown in . Make sure to select Hex before clicking Go!
Figure 5. The Go To Address window in HexEdit
HexEdit takes you to the exact spot at which the address begins. You will notice that the starting point might be at the first line of code, or it might be in the middle. This doesn't matter; you need to start hacking at the place HexEdit puts the insertion point.
Now, we are ready to enter the hexadecimal value from DigitalColor Meter. If you just type in the numbers, however, the iTunes file will become corrupt. It is important to select each value, enter the new hex code, and then select the next value. Lather, rinse, and repeat. Here are the hex values from that we are going to use:
R (the Red channel): AE3F
G (the Green channel): 5FF7
B (the Blue channel): 74BD
Starting with the Red values, select the first chunk of code after the insertion point and type AE, as shown in . Move over to the right, select the next chunk of code, and enter AE again. Make sure to select the code before you change it!
Figure 6. Editing the hex values in HexEdit
Do the same for the other two channels, always repeating the value twice. Once you have finished, save the file and quit out of HexEdit. Start up iTunes and, if you did everything correctly, your changes will show up. So if you don't like the colors iTunes uses, with this hack, now you know how to change them!
Hacking the Hack
If you have the pixel-pushing skills—and Adobe Photoshop or another pixel image editing tool—go ahead and design your ideal iTunes interface in Photoshop. First, take a screenshot of your current iTunes window. Then, open it in Photoshop. Using Photoshop, color iTunes the way you want it to appear. Don't worry about being overly precise in Photoshop, because you are really just creating a sketch. Select different elements and use Adjust → Hue and Saturation until you are satisfied with the result. You'll still need to use DigitalColor Meter to find out the RGB values as 16-bit hex values.