;; -*- Mode: Emacs-Lisp -*-
;; -*- lisp -*-
;; $Id: .emacs-d-colors,v 1.1 2001/10/31 11:20:17 amos-cvs Exp $
;; Copyright (C) Jan Borsodi 1998-2001
;;
;; Default emacs colors

;  (blank-space-face ((t (:background "#4c6c4c"))))
;  (blank-tab-face ((t (:background "#4c6c4c"))))

(defvar color-styles nil)

(defun add-color-style( name style )
  (setq color-styles (nconc color-styles (list (list name style))))
  (easy-menu-change '("edit")
		    "Color styles"
		    (mapcar '(lambda (entry)
			       (vector (car entry) (list 'change-color-style (cadr entry)) t))
			    color-styles)
		    "text-properties"))

(defun color-set-foreground-color (color-name frame)
  "Set the foreground color of the selected frame to COLOR-NAME.
When called interactively, prompt for the name of the color to use.
To get the frame's current foreground color, use `frame-parameters'."
  (interactive (list (facemenu-read-color)))
  (modify-frame-parameters (or frame (selected-frame))
			   (list (cons 'foreground-color color-name))))

(defun color-set-background-color (color-name frame)
  "Set the background color of the selected frame to COLOR-NAME.
When called interactively, prompt for the name of the color to use.
To get the frame's current background color, use `frame-parameters'."
  (interactive (list (facemenu-read-color)))
  (modify-frame-parameters (or frame (selected-frame))
			   (list (cons 'background-color color-name))))

(defun change-color-style( style &optional frame )
  (let ((lst style)
	def-lst)
    (setq used-color-style style)
    (setq def-lst (car lst))
    (setq lst (cdr lst))
    (if option-package-load-line-highlight
	(highlight-current-line-set-bg-color (car lst)))
    (setq lst (cdr lst))
    (if option-package-load-blinking-cursor
	(setq blinking-cursor-colors (car lst)))
    (setq lst (cdr lst))
    (if (emacs-type-is-regular)
	(progn
	  (color-set-foreground-color (car def-lst) frame)
	  (color-set-background-color (cadr def-lst) frame)
	  (set-cursor-color (caddr def-lst))
	  (set-mouse-color (cadddr def-lst))
	  (set-border-color (cadddr (cdr def-lst))))
      (progn
	(custom-set-faces 
	 (list 'default (list (list 't (list :foreground (car def-lst)
					     :background (cadr def-lst))))))))
    (while lst
      (custom-set-faces (car lst))
      (setq lst (cdr lst)))))

;; Setup the colors
(defconst color-style-amos '(
 ("White" "DarkSlateBlue" "Pink" "Pink" "DarkSlateBlue")
 "#403080"
 ["Pink" "White"]
 (default ((t (:foreground "Wheat"))))
 (region ((t (:foreground "White" :background "MediumSlateBlue"))) t)
 (modeline ((t (:foreground "DarkSlateBlue" :background "White"))) t)
 (list-mode-item-selected ((t (:background "gray68"))) t)
 (font-lock-comment-face ((t (:foreground "Coral"))))
 (font-lock-builtin-face ((t (:foreground "Violet"))))
 (font-lock-reference-face ((t (:foreground "DodgerBlue"))))
 (font-lock-string-face ((t (:foreground "LimeGreen"))))
 (font-lock-keyword-face ((t (:foreground "aquamarine"))))
 (show-paren-mismatch-face ((((class color)) (:foreground "white" :background "red"))))
 (isearch ((t (:foreground "black" :background "paleturquoise"))) t)
 (paren-match ((t (:background "darkseagreen4"))) t)
;; (widget-field-face ((((class color) (background light)) (:foreground "Red" :background "Brown"))))
;; (widget-field-face ((((class color) (background dark)) (:foreground "Red" :background "Brown"))))
;; (widget-button-face ((t (:bold t :foreground "black" :background "gray60"))))
 (widget-field-face ((((class color) (background light)) (:foreground "yellow2" :background "#426c42"))))
 (widget-button-face ((t (:background "#7B7D9C" :foreground "#494B5D"))))
 (font-lock-preprocessor-face ((t (:italic nil :foreground "CornFlowerBlue"))) t)
 (font-lock-type-face ((t (:foreground "#9290ff"))))
 (highlight ((t (:foreground "black" :background "darkseagreen2"))))
 (show-paren-match-face ((((class color)) (:foreground "black" :background "yellow"))))
 (font-lock-variable-name-face ((t (:foreground "Khaki"))))
 (font-lock-doc-string-face ((t (:foreground "green2"))) t)
 (font-lock-function-name-face ((t (:foreground "SteelBlue"))))
 (font-lock-keys-face ((t (:foreground "LightSteelBlue"))))
 (font-lock-number-face ((t (:foreground "Yellow"))))
 (font-lock-hexnumber-face ((t (:foreground "Orange"))))
 (font-lock-floatnumber-face ((t (:foreground "DarkGrey"))))
 (font-lock-qt-face ((t (:foreground "SkyBlue"))))
 ))

;; Setup the colors
(defconst color-style-borland '(
 ("White" "DarkBlue" "Pink" "Pink" "DarkSlateBlue")
 "#403080"
 ["Pink" "White"]
 (default ((t (:foreground "Wheat"))))
 (region ((t (:foreground "White" :background "MediumSlateBlue"))) t)
 (modeline ((t (:foreground "DarkSlateBlue" :background "White"))) t)
 (list-mode-item-selected ((t (:background "gray68"))) t)
 (font-lock-comment-face ((t (:foreground "Coral"))))
 (font-lock-builtin-face ((t (:foreground "Violet"))))
 (font-lock-reference-face ((t (:foreground "DodgerBlue"))))
 (font-lock-string-face ((t (:foreground "LimeGreen"))))
 (font-lock-keyword-face ((t (:foreground "aquamarine"))))
 (show-paren-mismatch-face ((((class color)) (:foreground "white" :background "red"))))
 (isearch ((t (:foreground "black" :background "paleturquoise"))) t)
 (paren-match ((t (:background "darkseagreen4"))) t)
 (widget-field-face ((((class color) (background light)) (:foreground "yellow2" :background "#426c42"))))
 (widget-button-face ((t (:background "#7B7D9C" :foreground "#494B5D"))))
 (font-lock-preprocessor-face ((t (:italic nil :foreground "CornFlowerBlue"))) t)
 (font-lock-type-face ((t (:foreground "#9290ff"))))
 (highlight ((t (:foreground "black" :background "darkseagreen2"))))
 (show-paren-match-face ((((class color)) (:foreground "black" :background "yellow"))))
 (font-lock-variable-name-face ((t (:foreground "Khaki"))))
 (font-lock-doc-string-face ((t (:foreground "green2"))) t)
 (font-lock-function-name-face ((t (:foreground "SteelBlue"))))
 (font-lock-keys-face ((t (:foreground "LightSteelBlue"))))
 (font-lock-number-face ((t (:foreground "Yellow"))))
 (font-lock-hexnumber-face ((t (:foreground "Orange"))))
 (font-lock-floatnumber-face ((t (:foreground "DarkGrey"))))
 (font-lock-qt-face ((t (:foreground "SkyBlue"))))
 ))

;; Setup the colors
(defconst color-style-trebuchet '(
 ("White" "#456345" "Pink" "Pink" "DarkSlateBlue")
 "#395939"
 ["Pink" "White"]
;; Emacs 21 stuff
 (fringe ((t (:foreground "White"))))
;; Old stuff
 (default ((t (:foreground "White"))))
 (region ((t (:foreground "Wheat" :background "#233625"))) t)
 (modeline ((t (:foreground "White" :background "#324627"))) t)
 (list-mode-item-selected ((t (:background "gray68"))) t)
 (font-lock-comment-face ((t (:foreground "#f9cf27" :background "#355335"))))
 (font-lock-builtin-face ((t (:italic t :foreground "#a6fab0"))))
 (font-lock-reference-face ((t (:foreground "DodgerBlue"))))
 (font-lock-string-face ((t (:foreground "#e5b6a5"))))
 (font-lock-keyword-face ((t (:foreground "#a5b6c7"))))
 (show-paren-mismatch-face ((((class color)) (:foreground "white" :background "red"))))
 (isearch ((t (:foreground "black" :background "paleturquoise"))) t)
 (paren-match ((t (:background "darkseagreen4"))) t)
 (widget-field-face ((((class color) (background light)) (:foreground "yellow2" :background "#426c42"))))
 (widget-button-face ((t (:background "#7B7D9C" :foreground "#494B5D"))))
 (font-lock-preprocessor-face ((t (:italic nil :foreground "CornFlowerBlue"))) t)
 (font-lock-type-face ((t (:foreground "#82b5df"))))
 (highlight ((t (:foreground "black" :background "darkseagreen2"))))
 (show-paren-match-face ((((class color)) (:foreground "black" :background "yellow"))))
 (font-lock-variable-name-face ((t (:foreground "Cyan"))))
 (font-lock-doc-string-face ((t (:foreground "green2"))) t)
 (font-lock-function-name-face ((t (:foreground "#d99560"))))
 (font-lock-keys-face ((t (:foreground "#e2bd57" :background "#486749"))))
 (font-lock-number-face ((t (:foreground "Yellow"))))
 (font-lock-hexnumber-face ((t (:foreground "#c193a5"))))
 (font-lock-floatnumber-face ((t (:foreground "#82a2f2"))))
 (font-lock-qt-face ((t (:foreground "#25d476"))))
 (message-header-to-face ((t (:bold t :foreground "yellow3"))))
 (message-header-cc-face ((t (:foreground "yellow"))))
 (message-header-subject-face ((t (:foreground "#FFE2C5"))))
 (message-header-other-face ((t (:foreground "#FB8772"))))
 (message-header-name-face ((t (:foreground "white"))))
 (message-separator-face ((t (:background "#335333" :foreground "Gray"))))
 (message-cited-text-face ((t (:foreground "#ffa000"))))
 (gnus-header-name-face ((t (:foreground "#ffa000"))))
 (gnus-header-content-face ((t (:italic t :foreground "#f4a0f0"))))
 (gnus-signature-face ((t (:italic t :foreground "#EDA04E"))))
 (gnus-article-mouse-face (((t (:background "#608F60" :foreground "black")))))
 (tooltip ((t (:background "#FFFFDC" :foreground "black"))))
;;  (gnus-group-mail-1-empty-face (((t (:foreground "aquamarine1")))))
;;  (gnus-group-mail-1-face (((t (:foreground "aquamarine1" :bold t)))))
;;  (gnus-group-mail-2-empty-face (((t (:foreground "aquamarine2")))))
;;  (gnus-group-mail-2-face (((t (:foreground "aquamarine2" :bold t)))))
;;  (gnus-group-mail-3-empty-face (((t (:foreground "aquamarine3")))))
;;  (gnus-group-mail-3-face (((t (:foreground "aquamarine3" :bold t)))))
;;  (gnus-group-mail-low-empty-face (((t (:foreground "aquamarine4")))))
;;  (gnus-group-mail-low-face (((t (:foreground "aquamarine4" :bold t)))))
;;  (gnus-group-news-1-empty-face (((t (:foreground "PaleTurquoise")))))
;;  (gnus-group-news-1-face (((t (:foreground "PaleTurquoise" :bold t)))))
; (gnus-group-news-2-empty-face (((t ()))))
;;  (gnus-group-news-2-face (((t (:bold t)))))
; (gnus-group-news-3-empty-face (((t ()))))
;;  (gnus-group-news-3-face (((t (:bold t)))))
; (gnus-group-news-4-empty-face (((t ()))))
;;  (gnus-group-news-4-face (((t (:bold t)))))
;;  (gnus-group-news-low-empty-face (((t (:foreground "DarkTurquoise")))))
;;  (gnus-group-news-low-face (((t (:foreground "DarkTurquoise" :bold t)))))
 ))

;; Setup the colors
(defconst color-style-ghostdog '(
 ("Black" "White" "Black" "Black" "DarkSlateBlue")
 "#F0F0F0"
 ["Black" "White"]
;; Emacs 21 stuff
 (fringe ((t (:foreground "Black"))))
;; Old stuff
 (default ((t (:foreground "Black"))))
 (region ((t (:foreground "Wheat" :background "#233625"))) t)
 (modeline ((t (:foreground "White" :background "#324627"))) t)
 (list-mode-item-selected ((t (:background "gray68"))) t)
 (font-lock-comment-face ((t (:italic t :foreground "#808080" :background "#EFEFEF"))))
 (font-lock-builtin-face ((t (:italic t :foreground "#a6fab0"))))
 (font-lock-reference-face ((t (:foreground "DodgerBlue"))))
 (font-lock-string-face ((t (:foreground "#008000"))))
 (font-lock-keyword-face ((t (:bold t :foreground "#a5b6c7"))))
 (font-lock-constant-face ((t (:bold t :foreground "Black"))))
 (show-paren-mismatch-face ((((class color)) (:foreground "white" :background "red"))))
 (isearch ((t (:foreground "black" :background "paleturquoise"))) t)
 (paren-match ((t (:background "#FFFF99"))) t)
 (widget-field-face ((((class color) (background light)) (:foreground "yellow2" :background "#426c42"))))
 (widget-button-face ((t (:background "#7B7D9C" :foreground "#494B5D"))))
 (font-lock-preprocessor-face ((t (:italic nil :foreground "CornFlowerBlue"))) t)
 (font-lock-type-face ((t (:foreground "#82b5df"))))
 (highlight ((t (:foreground "black" :background "darkseagreen2"))))
 (show-paren-match-face ((((class color)) (:foreground "black" :background "#FFFF99"))))
 (font-lock-variable-name-face ((t (:foreground "#9A9AFF"))))
 (font-lock-doc-string-face ((t (:foreground "green2"))) t)
 (font-lock-function-name-face ((t (:foreground "#d99560"))))
 (font-lock-keys-face ((t (:foreground "#393939" ))))
 (font-lock-number-face ((t (:foreground "Yellow"))))
 (font-lock-hexnumber-face ((t (:foreground "#c193a5"))))
 (font-lock-floatnumber-face ((t (:foreground "#82a2f2"))))
 (font-lock-qt-face ((t (:foreground "#25d476"))))
 (message-header-to-face ((t (:bold t :foreground "yellow3"))))
 (message-header-cc-face ((t (:foreground "yellow"))))
 (message-header-subject-face ((t (:foreground "#FFE2C5"))))
 (message-header-other-face ((t (:foreground "#FB8772"))))
 (message-header-name-face ((t (:foreground "white"))))
 (message-separator-face ((t (:background "#335333" :foreground "Gray"))))
 (message-cited-text-face ((t (:foreground "#ffa000"))))
 (gnus-header-name-face ((t (:foreground "#ffa000"))))
 (gnus-header-content-face ((t (:italic t :foreground "#f4a0f0"))))
 (gnus-signature-face ((t (:italic t :foreground "#EDA04E"))))
 (gnus-article-mouse-face (((t (:background "#608F60" :foreground "black")))))
 (tooltip ((t (:background "#FFFFDC" :foreground "black"))))
;;  (gnus-group-mail-1-empty-face (((t (:foreground "aquamarine1")))))
;;  (gnus-group-mail-1-face (((t (:foreground "aquamarine1" :bold t)))))
;;  (gnus-group-mail-2-empty-face (((t (:foreground "aquamarine2")))))
;;  (gnus-group-mail-2-face (((t (:foreground "aquamarine2" :bold t)))))
;;  (gnus-group-mail-3-empty-face (((t (:foreground "aquamarine3")))))
;;  (gnus-group-mail-3-face (((t (:foreground "aquamarine3" :bold t)))))
;;  (gnus-group-mail-low-empty-face (((t (:foreground "aquamarine4")))))
;;  (gnus-group-mail-low-face (((t (:foreground "aquamarine4" :bold t)))))
;;  (gnus-group-news-1-empty-face (((t (:foreground "PaleTurquoise")))))
;;  (gnus-group-news-1-face (((t (:foreground "PaleTurquoise" :bold t)))))
; (gnus-group-news-2-empty-face (((t ()))))
;;  (gnus-group-news-2-face (((t (:bold t)))))
; (gnus-group-news-3-empty-face (((t ()))))
;;  (gnus-group-news-3-face (((t (:bold t)))))
; (gnus-group-news-4-empty-face (((t ()))))
;;  (gnus-group-news-4-face (((t (:bold t)))))
;;  (gnus-group-news-low-empty-face (((t (:foreground "DarkTurquoise")))))
;;  (gnus-group-news-low-face (((t (:foreground "DarkTurquoise" :bold t)))))
 ))


(setq default-color-style color-style-trebuchet)
;; (setq default-color-style color-style-ghostdog)

;; Add default color styles
(add-color-style "Amos" 'color-style-amos)
(add-color-style "Borland" 'color-style-borland)
(add-color-style "Trebuchet" 'color-style-trebuchet)
(add-color-style "GhostDog" 'color-style-ghostdog)


;; This is deprecated
; (custom-set-faces
;  '(default ((t (:foreground "Wheat"))))
;  '(region ((t (:foreground "White" :background "MediumSlateBlue"))) t)
;  '(modeline ((t (:foreground "DarkSlateBlue" :background "White"))) t)
;  '(list-mode-item-selected ((t (:background "gray68"))) t)
;  '(font-lock-comment-face ((t (:foreground "Coral"))))
;  '(font-lock-builtin-face ((t (:foreground "Violet"))))
;  '(font-lock-reference-face ((t (:foreground "DodgerBlue"))))
;  '(font-lock-string-face ((t (:foreground "LimeGreen"))))
;  '(font-lock-keyword-face ((t (:foreground "aquamarine"))))
;  '(show-paren-mismatch-face ((((class color)) (:foreground "white" :background "red"))))
;  '(isearch ((t (:foreground "black" :background "paleturquoise"))) t)
;  '(paren-match ((t (:background "darkseagreen4"))) t)
;  '(widget-field-face ((((class color) (background light)) (:foreground "Red" :background "Brown"))))
;  '(widget-field-face ((((class color) (background dark)) (:foreground "Red" :background "Brown"))))
;  '(widget-button-face ((t (:bold t :foreground "black" :background "gray60"))))
;  '(font-lock-preprocessor-face ((t (:italic nil :foreground "CornFlowerBlue"))) t)
;  '(font-lock-type-face ((t (:foreground "#9290ff"))))
;  '(highlight ((t (:foreground "black" :background "darkseagreen2"))))
;  '(show-paren-match-face ((((class color)) (:foreground "black" :background "yellow"))))
;  '(font-lock-variable-name-face ((t (:foreground "Khaki"))))
;  '(font-lock-doc-string-face ((t (:foreground "green2"))) t)
;  '(font-lock-function-name-face ((t (:foreground "SteelBlue"))))
;  '(font-lock-keys-face ((t (:foreground "LightSteelBlue"))))
;  '(font-lock-number-face ((t (:foreground "Yellow"))))
;  '(font-lock-hexnumber-face ((t (:foreground "Orange"))))
;  '(font-lock-floatnumber-face ((t (:foreground "DarkGrey"))))
;  '(font-lock-qt-face ((t (:foreground "SkyBlue"))))
;  )
; (set-foreground-color "White")
; (set-background-color "DarkSlateBlue")
; (set-cursor-color "Pink")
; (set-mouse-color "Pink")
; (set-border-color "DarkSlateBlue")

;; (setq initial-frame-alist
;;       (cons 
;;        '(foreground-color  . "White")
;;        initial-frame-alist))
;; (setq initial-frame-alist
;;       (cons 
;;        '(background-color  . "#456345")
;;        initial-frame-alist))
;; (setq initial-frame-alist
;;       (cons 
;;        '(cursor-color      . "Pink")
;;        initial-frame-alist))

;; Display settings
;; default size and color options for all frames
;; foreground, background, and cursor colors 
;; (setq default-frame-alist
;;       (cons 
;;        '(foreground-color  . "White")
;;        default-frame-alist))
;; (setq default-frame-alist
;;       (cons 
;;        '(background-color  . "#456345")
;;        default-frame-alist))
;; (setq default-frame-alist
;;       (cons 
;;        '(cursor-color      . "Pink")
;;        default-frame-alist))

(add-hook 'after-make-frame-functions
 	  '(lambda (frame)
;; 	     (color-set-background-color (cadr (car default-color-style) frame))))
  	     (change-color-style default-color-style frame)))

(add-hook 'window-setup-hook
 	  '(lambda ()
;; 	     (color-set-background-color (cadr (car default-color-style) frame))))
  	     (change-color-style default-color-style)))
