Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Modifying Window Button Colors in Mac OS X

How can I modify the red/yellow/green window buttons for close/minimize/zoom in Mac OS X? There must be an editable resource or plist somewhere.

Here are the buttons I'm talking about:

Mac stoplight buttons.

For red/green colorblind individuals, those colors can be maddening. I wish they chose the actual bluish shade of green used in a traffic light instead of the puke grass green. That grassy green is indeterminable from the red.

Changing the theme to graphite is a poor alternative, so any other method is much preferred.

like image 443
Tony Avatar asked Nov 17 '11 16:11

Tony


2 Answers

Okay, after a long and seemingly endless research cycle, I've located where the window buttons are stored. They're in a file called ArtFile.bin in /System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/Resources/.

Also, a guy named Alex Zielenski with the help of Indragie Karunaratne created a utility named artFileTool to get to its contents. The second link is the code repository for the utility.

  • http://macthemes.net/forum/viewtopic.php?t=16810624
  • https://github.com/alexzielenski/artFileTool

Here's the process to extract and then rebuild the resource as described on the MacThemes forum by a user named toutheme:

For ArtFile.bin - Lion

Preparation

  • Create new folder: TheFolder
  • Copy the Lion ArtFile.bin (/System/Library/PrivateFrameworks/CoreUI.framework/Resources) and artFileTool on TheFolder.

Terminal

  • Launch Terminal, type "cd" + "space" + (drag TheFolder on Terminal window). Type enter.

Decoding

To decode ArtFile.bin and compile a folder Resources Disconnected Classified:

  • ./artFileTool -d ArtFile.bin ResourcesDisconnectedClassified

    -- or --

To decode ArtFile.bin and compile a folder Named Connected Images:

  • ./artFileTool -d -c ArtFile.bin NamedConnectedImages

Edition

Edit your files with PhotoShop, for example…

Encoding

To re-encode the Resources Disconnected Classified:

  • ./artFileTool -e ResourcesDisconnectedClassified ArtFile.bin ArtFile.new.bin

    -- or --

To re-encode the Named Connected Images:

  • ./artFileTool -e -c NamedConnectedImages ArtFile.bin ArtFile.new.bin

For ArtFile.bin - Snow Leopard:

  • ./artFileTool -d -l ArtFile.bin ResourcesDisconnectedClassified
  • ./artFileTool -d -l -c ArtFile.bin NamedConnectedImages
  • ./artFileTool -e -l ResourcesDisconnectedClassified ArtFile.bin ArtFile.new.bin
  • ./artFileTool -e -l -c NamedConnectedImages ArtFile.bin ArtFile.new.bin

For ArtFile200.bin (Lion only):

  • Create new folder: TheFolder
  • Copy the Lion ArtFile200.bin (/System/Library/PrivateFrameworks/CoreUI.framework/Resources) and artFileTool on TheFolder.
  • Launch Terminal, type "cd" + "space" + (drag TheFolder on Terminal window). Type enter.

Decoding

  • ./artFileTool -d ArtFile200.bin ResourcesDisconnectedClassified
  • ./artFileTool -d -c ArtFile200.bin NamedConnectedImages

Encoding

  • ./artFileTool -e ResourcesDisconnectedClassified ArtFile200.bin ArtFile200.new.bin
  • ./artFileTool -e -c NamedConnectedImages ArtFile200.bin ArtFile200.new.bin

  • Make sure to check the size of the newly created file. (4.0-5.2 mb)

  • Rename ArtFile.new.bin to ArtFile.bin and replace the one location in the CoreUI.framework directory
  • Logout

I hope this helps anyone who got as frustrated as I did at how difficult it is discovering basic information about the inner workings of OS X.

like image 54
Tony Avatar answered Oct 18 '22 14:10

Tony


Modifying buttons in MacOSX 10.11 El Capitan can also be done by an Alex Zielenski's tool called "ThemeEngine", found HERE at github.com. You have to edit copies of the

“.car” files in: /System/Library/CoreServices/SystemAppearance.bundle/Contents/Resources

Each of these .car files contains "WindowFrame_WindowControlButtons" which itself consists of 240 items (!). I "grouped" those (= button in app window) with first "Size" then "Scale". Higher resolved "[email protected]" items are used for Retina Displays, "small" ones for in-app windows, like the colors palette in TextEdit.

In ThemeEngine graphic items (*.psd!) are selected and sent/received to/from a compatible Editor (eg: Photoshop), but can also be individually dragged to any folder, changed or replaced by other apps (even "Preview") and be re-dragged to any .car-file window in ThemeEngine.

Normally you'd first have to deactivate SIP in El Capitan, but I found it easier to select my "old" Maverick USB drive as startup disk and drag the SystemAppearance.car back into SystemAppearance.bundle manually, then to re-restart (see also "AccessibilityDarkAppearance.car").

I find the new disgustingly-2D icons really amateurish, kind of "deflated" -- so I exchanged them with a set of Maverick-like ones, copied from an older MacOSX. As a compromise I applied the "negative" white plus/minus signs used in El-Capitan.

(Btw: I didn't use the above mentioned artFileTool by Alex to get at the Aqua buttons, but simply made a series of screenshots and cut out the various states of round Aqua buttons.)

If anybody is interested I can post my "SystemAppearance.car" file here ...

like image 38
clemsam lang Avatar answered Oct 18 '22 13:10

clemsam lang