;;; color-theme-cloudless-night.el -- Joshua Hawxwell
;;
;; URL: http://hawx.me/emacs/color-theme-cloudless-night.el
;;
;; Colour scheme loosely based on Clouds Midnight by Fred LeBlanc.
;; Theme file modified from IR Black for Emacs by Burke Libbey.
;;
;; [a]: http://fredhq.com/projects/clouds
;; [b]: https://github.com/burke/color-theme-ir-black
;;

(require 'color-theme)
(defun color-theme-cloudless-night ()
  (interactive)

  (let ((*black*     "#080808")
        (*white*     "#FFFFFF")

        (*sdgrey*    "#141414")
        (*vdgrey*    "#3c403b")
        (*dgrey*     "#4A4A4A")
        (*grey*      "#595959")
        (*lgrey*     "#858585")
        (*vlgrey*    "#919191")

        (*lblue*     "#87CEFF")
        (*blue*      "#4F94CD")
        (*green*     "#46a609")
        (*dgreen*    "#458B00")
        (*greenblue* "#3CB371")
        (*brown*     "#946c42")
        (*skin*      "#CB9B9B")
        (*red*       "#EE6363")
        (*violet*    "#a165ac")
        (*turquoise* "#293749")

        (*mouse*     "sienna1"))

    (flet ((color (fgcolor &optional (bgcolor nil) (bold nil) (italic nil) (underline nil))
                  `((t (,@(if fgcolor   `(:foreground ,fgcolor))
                        ,@(if bgcolor   `(:background ,bgcolor))
                        ,@(if bold      '(:bold       t))
                        ,@(if italic    '(:italic     t))
                        ,@(if underline '(:underline  t))))))
           (face (face &rest args)
                 `(,(intern (concat "font-lock-" face "-face"))
                   ,(apply #'color args))))

      (color-theme-install
       `(color-theme-cloudless-night
         ((background-color . ,*black*)
          (background-mode  . dark)
          (border-color     . ,*black*)
          (cursor-color     . ,*lblue*)
          (foreground-color . ,*vlgrey*)
          (mouse-color      . ,*mouse*))

         (default ,(color *vlgrey* *black*))
         (blue ,(color *blue*))
         (bold ((t (:bold t))))
         (bold-italic ((t (:bold t))))
         (underline ((nil (:underline nil))))
         (border-glyph ((t (nil))))

         ,(face "builtin" *green*)
         ,(face "comment" *vdgrey* nil nil t)
         ,(face "constant" *violet*)
         ,(face "doc-string" *vdgrey* nil nil t)
         ,(face "function-name" *vlgrey*)
         ,(face "keyword" *brown*)
         ,(face "preprocessor" *red*)
         ,(face "reference" *dgreen*)
         ,(face "regexp-grouping-backslash" *red*)
         ,(face "regexp-grouping-construct" *red*)
         ,(face "string" *blue*)
         ,(face "type" *brown*)
         ,(face "variable-name" *greenblue*)
         ,(face "warning" *white* *red*)

         (region             ,(color nil     *turquoise*))

         (mode-line          ,(color *lgrey* "#191919"))
         (mode-line-inactive ,(color *lgrey* "#101010"))
         (minibuffer-prompt  ,(color *dgrey*))
         (ido-first-match    ,(color *blue* nil t))

         (highlight          ,(color nil     *sdgrey*))
         (isearch            ,(color *white* *dgreen*))
         (isearch-fail       ,(color nil     *red*))
         (lazy-highlight     ,(color *white* *vdgrey*))
         (highline-face      ,(color nil     *sdgrey*))

         (text-cursor        ,(color *lblue* *lblue*))
         (left-margin         ((t (nil))))
         (toolbar             ((t (nil)))))))))

(provide 'color-theme-cloudless-night)