Download melancholy-theme.el to the directory ~/.emacs.d/themes/. Add this to your .emacs:
(add-to-list 'custom-theme-load-path "~/.emacs.d/themes/")
Now you can load the theme with the interactive function load-theme like this:
M-x load-theme RET melancholy
Melancholy is available in MELPA.
You can install melancholy with the following command:
M-x package-install melancholy-theme
or with use-package:
(use-package melancholy-theme
:ensure t))
To load it automatically on Emacs startup add this to your init file:
(load-theme 'melancholy t)