I'd like my
*scratch* buffer to have it's own color theme, different to the one I use elsewhere, so that I know when I'm working there. How can I do this?
If you just want to put
*scratch* in its own frame and use special frame parameters for it (e.g. give it its own background color, font, or whatever) then you can do this just by doing these two things:
special-display-alistto have the frame parameters you want.
In a comment you asked for code. No, the right way is to use Customize:
M-x customize-option special-display-alist, choosing what you want, then saving persistently. Likewise,
M-x customize-option special-display-buffer-names.
If the Customize UI is too complex for someone then they shouldn't be asking for code instead. ;-) That's my motto.
But since I'm an easy touch, here's a hint:
(add-to-list 'special-display-buffer-names "*scratch*") (setq special-display-frame-alist (append '((foreground-color . "Brown") (background-color . "LightBlue")) special-display-frame-alist))
You could use an external package like https://github.com/vic/color-theme-buffer-local to accomplish this.
(use-package load-theme-buffer-local :defer 2 ; You may not need this line, but was needed in my setup :config (load-theme-buffer-local 'misterioso (get-buffer "*scratch*")))
If you kill the scratch buffer and created a new one, the theme will be lost.