Sometimes you need a high quality icon from Mac system settings for the project, but you can not find a good one online. Fortunately, with a little digging, it’s easy to extract a perfect quality system settings icon with a transparent background with just the Preview app. Here̵7;s how.
First we need to find the actual files that represent the boxes in System Preferences using Finder. With Finder active, choose Go> Go To Folder from the menu bar at the top of the screen.
Type (or paste) in the “Go to folder” window or slider
A Finder window appears that contains files that correspond to the default settings boxes that you see in System Preferences.
(Note: If you are looking for a third-party preference file, check
Locate the file that represents the settings window from which you want to extract an icon. It should have a recognizable name. For example, “PrintAndScan.prefPane” is the file for “Printers & Scanners” and “SoftwareUpdate.prefPane” is the file for “Software Update.”
Each “.prefPane” file is actually a special type of folder called a “package”. We will open the package and see the resources inside.
When you find the settings file, right-click on it and select “View Package Contents.”
The app package opens and the “Contents” folder is displayed. Open it and within “Content” you will come across several folders and files. Locate the “Resources” folder and open it.
Browse the resource folder and look for an “.icns” file with the same name as the settings window you are examining. For example, “SoftwareUpdate.prefPane” contains a file called “SoftwareUpdate.icns.” This is an icon package file that contains icons of different sizes for the window. Double-click on it and it will open in preview.
In the preview you will see that the “.icns” file contains icons in several sizes. The largest will be at the top of the list in the box on the left. Click to select it.
After selecting the largest icon, click File> Export in the menu bar.
When the Export dialog box appears, enter a file name and select a save location. Then you need to determine an image format. If you want a high quality image with a transparent background, select “PNG” from the list. (Make sure the “Alpha” option is checked, as this will ensure that PNG will have a transparent background.)
Then click “Save”.
Preview saves the icon you selected as a transparent PNG file. Then close Preview and you will find the new PNG file waiting where you saved it. Very handy!