Changing fonts and colors should be easy, also with terminals. Alas, neither iTerm2 nor OSX Terminal seem to have an easy way of doing this: you need to define a profile or change some of the options of the current profile. This is often an overkill.
.colors.csvfile available at osx terminal colors from cli (a Github gist) and save it in your home. The file contains all colors known to Emacs (with
M-x list-colors-display) with the corresponding representation used by Applescript.
set_colors.bashfunctions available at: osx terminal colors from cli and add them to your
.bash_profile(or source them, if you prefer)
You are done! You can now change colors from your terminal using the following commands:
set_theme foreground-color <color-name>
$ set_foreground_color wheat $ set_background_color gray10 $ set_font "Oxygen Mono" 12
Now that you can change colors using a bash function, some opportunities arise. For instance, you can change colors when connecting to a different host.
Get in touch