The pref pane package only contains the icon file for the relevant preference pane. I.e., the iCloud preference pane package contains the iCloud icon file. I'm referring to the generic preference pane icon for when an icon file is not included in the package.It's located inside the pref pane package file itself.
Thanks, but the elusive icon file isn't there. I used the app Find Any File to locate all icns files, but still couldn't find it. I think it might be in one of the .car files.Try here:
/Applications/System Preferences.app/Contents/Resources/
There should be multiple .icns files there. Look thru them with Quick Look.
Or look in the Info.plist file in the Contents dir, and look under CFBundleDocumentTypes for a CFBundleTypeExtensions list with "prefPane" in it. The CFBundleTypeIconFile key will then give the file name of the icon associated with that type.
For looking at car files:Thanks, but the elusive icon file isn't there. I used the app Find Any File to locate all icns files, but still couldn't find it. I think it might be in one of the .car files.
For looking at car files:
https://github.com/insidegui/AssetCatalogTinkerer
What's in a .car file, links to more tools:
http://macconfig.com/en/mac/2015/What_is_a_car_file_2015052101.html
Found by googling: .car file format macos
If you've tried any or all of those without success, then please describe everything you've tried.