Set osxs accent/highlight colors using the commandline
Project description
osx-colors
Sane command line color customisation for osx, no more fiddling about with defaults
, internal apple color constants and rgb color codes
Say you want to change your Accent
and Highlight
Color to Green
like this
If you wanted to change it via terminal, normally you'd need to do this
$ defaults write -g AppleAccentColor -string 3
$ defaults write -g AppleHighlightColor -string "0.752941 0.964706 0.678431 Green"
Instead.... do this 😄
$ osx-colors set green
Features
- Sane color handling using color names and a single command
- Provide it a color in hex and it'll find the "nearest" available apple color to it and set it to this, this is awesome if you use pywal and want matching accent/highlight colors to your wallpaper
- Restarts Finder,Docker,System Preferences etc upon setting so colors can be immediately seen
Why
I'm a huge fan of pywal and what I thought would really be the cherry on
top would be Accent
& Highlight
colors that were based on the color palette of the wallaper, however I wasn't able
to find anything that did it and color management from the commandline simply sucked, so I wrote this for my personal needs
Limitations
At present you can only set both the AccentColor
and HighlightColor
together, however the HighlightColor
can be customized to any color in the UI (from what I can see)
Getting Started
Dependencies
- MacOS Monterey (It probably works on others I just haven't tested it!)
- Python 3.8 or greater
Installing
pip install osx-colors
Usage
To set the Accent
and Highlight
color to Red
$ osx-colors set red
Setting the 'Accent Color' to 'red'
Setting the 'Highlight Color' to 'red'
Restarting Finder, Spotlight and System Preferences, others may need to be restarted manually
To set the Accent
and Highlight
color to the closest color to the HEX color provided
$ osx-colors set 0029ff
Searching for the closest Apple color to '0029ff' we found 'blue'
Setting the 'Accent Color' to 'blue'
Setting the 'Highlight Color' to 'blue'
Restarting Finder, Spotlight and System Preferences, others may need to be restarted manually
For more usage instructions see
$ osx-colors --help
TODO
[] Better example of the wallpaper functionality, it's why I built it [] Ability to get colors
License
This project is licensed under the MIT license
Acknowledgments
- Thanks to ofstack for the code to match the "nearest" color, i'm no color scientist
- Thanks to quantum_libet on reddit for a rundown on the insanity of color management via the terminal
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for osx_colors-1.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 27c9356c76ea4bb3e801e633d3d895b80d43393f8d0d8e2bf033840e1e855e1e |
|
MD5 | dece9558c30b3a3c53c766967c1bd27e |
|
BLAKE2b-256 | 6e623b53f58a32853633e597928bf6b14bf44df3e56733db80e30791c442e865 |