MacOS – the default (blue) value for AppleHighlightColor

defaultsmacosui

Lots of popular dotfiles repos (stemming from this one) include this:

# Set highlight color to green
defaults write NSGlobalDomain AppleHighlightColor -string "0.764700 0.976500 0.568600"

It looks bad. How do I change it back? What was the original value?

Best Answer

The original value of blue is used when AppleHighlightColor doesn't exist, therefore you can reset it deleting AppleHighlightColor:

defaults delete -g AppleHighlightColor

You can change the AppleHighlightColor with a GUI through System Preferences → General → Highlight Color.


Setting the highlight colour to Green through System Preferences:

~ ❯ defaults read -g AppleHighlightColor
0.752941 0.964706 0.678431

Setting the highlight colour to Blue through System Preferences:

~ ❯ defaults read -g AppleHighlightColor
2015-05-21 18:47:25.072 defaults[37881:344707] 
The domain/default pair of (kCFPreferencesAnyApplication, AppleHighlightColor) does not exist

-g is shorthand for NSGlobalDomain