13

Before upgrading to Yosemite, I'd like to backup app icons from Mavericks, as the new icons are so ugly.

What's the best way to keep a full copy of old system icons from Mavericks?

UPDATE:

enter image description here

Finally, I do it one by one using Yuki Yamashina's method.

1
  • The Finder icon is a disaster. The rest are okay, imo.
    – user13716
    Oct 22, 2014 at 3:38

3 Answers 3

8

Following @ohho's answer, I wrote a quick script that will save you the effort of adjusting the colour of each icon. This script handles Dropbox folder icons too. You will need imagemagick and xcode command line utilities installed. The best way to get both is to install homebrew and then run

brew install imagemagick

Here is the script. I chose to reduce saturation by -20% and adjust the hue to make the colour less green and more blue.

#!/bin/bash

# List of system icons which need to be changed
sys_icons="ApplicationsFolderIcon.icns BurnableFolderIcon.icns \
DesktopFolderIcon.icns DeveloperFolderIcon.icns DocumentsFolderIcon.icns \
DownloadsFolder.icns GenericFolderIcon.icns GenericSharepoint.icns \
GroupFolder.icns LibraryFolderIcon.icns MovieFolderIcon.icns \
MusicFolderIcon.icns OpenFolderIcon.icns PicturesFolderIcon.icns \
PublicFolderIcon.icns ServerApplicationsFolderIcon.icns \
SitesFolderIcon.icns SystemFolderIcon.icns UsersFolderIcon.icns \
UtilitiesFolder.icns"

# Back up CoreTypes.bundle just in case and copy the icons to ~/folder_icons
cp -r /System/Library/CoreServices/CoreTypes.bundle ~/CoreTypes_BACKUP.bundle
mkdir ~/folder_icons
cd /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources
cp $sys_icons ~/folder_icons

# List of dropbox icons which need to be changed
dropbox_icons="DropboxFolderIconYosemite.icns DropboxAppFolderIconYosemite.icns \
DropboxPublicFolderIconYosemite.icns DropboxReadOnlySharedFolderIconYosemite.icns"

# Check if yosemite-ready dropbox is installed and copy the dropbox icons to ~/folder_icons
if [ -f "/Applications/Dropbox.app/Contents/Resources/DropboxFolderIconYosemite.icns" ]; then
    cd /Applications/Dropbox.app/Contents/Resources
    cp $dropbox_icons ~/folder_icons
fi

cd ~/folder_icons

# Change ownership of icns files to user
sudo chown `whoami` $sys_icons $dropbox_icons &> /dev/null

# Convert icns files to "iconset" folders containing png files
for icon in *.icns; do iconutil -c iconset "$icon"; done

# Use imagemagick to adjust saturation (-20%) and hue (+2%)
for icon in ./**/*.png; do mogrify -modulate 100,80,102 "$icon"; done

# Convert "iconset" folders back to icns files
for icon in *.iconset; do iconutil -c icns "$icon"; done

# Copy the modified system and dropbox icons back to their original bundles
sudo cp $sys_icons /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources
if [ -f "DropboxFolderIconYosemite.icns" ]; then
    cp $dropbox_icons /Applications/Dropbox.app/Contents/Resources
fi

# Set owner/group to root/wheel and delete extended attributes
cd /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources
sudo chown root $sys_icons
sudo chgrp wheel $sys_icons
sudo xattr -d com.apple.quarantine $sys_icons &> /dev/null

# Delete icon cache (restart necessary)
sudo find /private/var/folders/ -name com.apple.dock.iconcache -exec rm {} \; &> /dev/null
sudo find /private/var/folders/ -name com.apple.iconservices -exec rm -rf {} \; &> /dev/null

# Remove working directory
rm -rf ~/folder_icons

Save this as say '~/folder_colour_adjuster.sh' and then run

sudo sh ~/folder_colour_adjuster.sh

Restart your mac and enjoy:

end results

1
  • 3
    I wish I can up-vote more than once ;-)
    – ohho
    Nov 19, 2014 at 1:18
5

How to change the colour of Yosemite system icons:

// Go to /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources folder
// where system icons are located.
$ cd /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/

// Backup the icns file for generic folder icon.
$ sudo cp GenericFolderIcon.icns GenericFolderIcon.org.icns

// Move the icns file to your home folder and go there.
$ sudo mv GenericFolderIcon.icns ~/
$ cd ~/

// Change file owner (from root to user).
$ sudo chown [user name] GenericFolderIcon.icns

// Open GenericFolderIcon.icns in Finder, then Preview is launched.
// Choose "Tools" => "Adjust Colors..." (shift+⌘+C), and adjust image's color as you want.
// In the following image, Saturation is decreased.
// Note that GenericFolderIcon.icns contains 10 images, and you should edit all of them.
// Save the file (⌘+S).

enter image description here

// Locate the icns file to /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources folder.
$ cd /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/
$ sudo mv ~/GenericFolderIcon.icns ./

// Change file owner and group, and remove Extended Attributes.
$ sudo chown root GenericFolderIcon.icns
$ sudo chgrp wheel GenericFolderIcon.icns
$ sudo xattr -d com.apple.quarantine GenericFolderIcon.icns

// Clear the icon cache.
sudo find /private/var/folders/ -name com.apple.dock.iconcache -exec rm {} \;
sudo find /private/var/folders/ -name com.apple.iconservices -exec rm -rf {} \;

// Restart Mac.

There is a nice free app for changing icons, LiteIcon.

enter image description here

4

I can tell you, this is pretty hard to do by oneself.

If you are looking to replace system icons, such as folders, they are here:

/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/

If you want to replace icons for apps under /Applications, it has to be done individually. Typically:

/Applications/AppName.app/Contents/Resources/AppName.icns

After replacing it, the new icon will not show until the icon cache is reset. In Mavericks, resetting LaunchServices would update the icon, but in Yosemite, from the time I spent with it, "iconcache" has to be deleted.

https://gist.github.com/fabiofl/5873100

All in all, it takes patience.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .