Created
February 21, 2016 04:15
-
-
Save smj10j/bc906b72c10882d01f0f to your computer and use it in GitHub Desktop.
Outputs hex-encoded RGB values for the colors inside an OSX Terminal profile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/usr/libexec/PlistBuddy -x -c 'Print "Window Settings":"hullabaloo"' ~/Library/Preferences/com.apple.Terminal.plist\ | |
|tr -d '\n\t'|grep -o '[^>]*</key><data>[^<]*'\ | |
|while read l;do \ | |
echo ${l%%<*} $(base64 -d<<<${l##*>}|plutil -convert xml1 - -o -\ | |
|awk '/<data>/{getline;print}'|tr -d '\t'|base64 -d\ | |
|xargs -d ' ' -n 1 echo | xargs -I VAL echo "obase=16; (255*VAL)/1" | bc)\ | |
; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment