Tuesday, July 24, 2012

Changing Icon Colors


Recently I was looking for a way to change the color of an application's icon in OS X.  The idea I had was to run two separate instances of Eclipse - one for Android development, and one for other work (this is probably unnecessary, but I've already done the work).  In order not to confuse the two instances, I wanted to change the color of the Eclipse icon, so that the Android installation would be colored Android green, to tell them apart.  The only trouble is that I'm terrible with anything related to graphics or image processing, so a I had no idea where to start to make this idea a reality.

Fortunately, I stumbled upon the solution.  If you install the OS X developer tools, you get a program called Core Image Fun House.  You can use it to apply all sorts of effects to an Icon (.icns) file, including changing the color.  Here's what I did:


  • Find the folder where your Eclipse installation is.
  • Right click on the Eclipse.app file and choose "Show Package Contents".  Now you'll be navigating within the package, to get into the guts of the application.
  • Open the "Contents" folder, then the "Resources" folder.  You should see a file named "Eclipse.icns".  That's your icon.  Make a copy of it somewhere, and open the copy up in Core Image Fun House.
  • Core Image allows you to add filters to the icon in question. Click on the plus sign in the "Effects Stack" menu to bring up all the filter options.  Under the "Color Effect" section, you should find a filter called "Color Monochrome".  Apply this filter, and you'll see a color picker in the Effects Stack menu.  Use this to change the color of the entire icon.
  • When the icon looks right, go to File -> Export.  Choose a name and a save destination.  Lastly, change the file type from "JPEG Image" to "Apple Icon Image".
  • Take the newly saved .icns file and drop it into the resources folder of the Eclipse package (this will overwrite the original, so you may want to make a backup of it first).  If you do it right, OS X will recognize the new icon and replace it just about everywhere (you may have to add a new copy of the icon to the dock, if you have a permanent dock icon).

No comments: