Skip to content

Commit

Permalink
add zenburn theme
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasf committed Nov 6, 2019
1 parent 83ec120 commit eace864
Show file tree
Hide file tree
Showing 3 changed files with 186 additions and 0 deletions.
82 changes: 82 additions & 0 deletions colorlab/main.go
Expand Up @@ -49,11 +49,16 @@ var palettes = []Palette{
Solarized: gruvboxLight,
Inverse: true,
},
{
Name: "zenburn",
Solarized: zenburn,
},
}

func main() {

for _, pal := range palettes {
fmt.Println(pal.Name)
pal.Generate()
}
fmt.Println("\n-----\n")
Expand Down Expand Up @@ -292,6 +297,12 @@ func (h HexColor) Color() colorful.Color {
return col
}

func (h HexColor) Blend(hc HexColor, t float64) HexColor {
c1 := h.Color()
c2 := hc.Color()
return HexColor(c1.BlendLab(c2, t).Hex())
}

type Base struct {
Base03 HexColor
Base02 HexColor
Expand Down Expand Up @@ -724,6 +735,28 @@ var ( // The original solarized color palette
Yellow: GruvboxDarkYellow,
},
}
zenburn = Solarized{
Base: Base{
Base03: ZenburnBg,
Base02: ZenburnBgP1,
Base01: ZenburnFgM1.Blend(ZenburnFg, 0.3),
Base00: ZenburnBgP3,
Base0: ZenburnFg,
Base1: ZenburnFgP1,
Base2: ZenburnFgP1.Blend(ZenburnFgP2, 0.5),
Base3: ZenburnFgP2,
},
Accents: Accents{
Blue: ZenburnBlue,
Cyan: ZenburnCyan,
Green: ZenburnGreen,
Magenta: ZenburnMagenta,
Orange: ZenburnOrange,
Red: ZenburnRed,
Violet: ZenburnBlue.Blend(ZenburnMagenta, 0.5),
Yellow: ZenburnYellow,
},
}
)

const (
Expand Down Expand Up @@ -780,6 +813,55 @@ const (
GruvboxDarkPurple = HexColor("#8f3f71")
GruvboxDarkAqua = HexColor("#427b58")
GruvboxDarkOrange = HexColor("#af3a03")

ZenburnFgM1 = HexColor("#656555")
ZenburnFgM05 = HexColor("#989890")
ZenburnFg = HexColor("#DCDCCC")
ZenburnFgP1 = HexColor("#FFFFEF")
ZenburnFgP2 = HexColor("#FFFFFD")
ZenburnBgM2 = HexColor("#000000")
ZenburnBgM1 = HexColor("#2B2B2B")
ZenburnBgM08 = HexColor("#303030")
ZenburnBgM05 = HexColor("#383838")
ZenburnBg = HexColor("#3F3F3F")
ZenburnBgP05 = HexColor("#494949")
ZenburnBgP1 = HexColor("#4F4F4F")
ZenburnBgP2 = HexColor("#5F5F5F")
ZenburnBgP3 = HexColor("#6F6F6F")
ZenburnRedM6 = HexColor("#6C3333")
ZenburnRedM5 = HexColor("#7C4343")
ZenburnRedM4 = HexColor("#8C5353")
ZenburnRedM3 = HexColor("#9C6363")
ZenburnRedM2 = HexColor("#AC7373")
ZenburnRedM1 = HexColor("#BC8383")
ZenburnRed = HexColor("#CC9393")
ZenburnRedP1 = HexColor("#DCA3A3")
ZenburnRedP2 = HexColor("#ECB3B3")
ZenburnOrange = HexColor("#DFAF8F")
ZenburnYellowM2 = HexColor("#D0BF8F")
ZenburnYellowM1 = HexColor("#E0CF9F")
ZenburnYellow = HexColor("#F0DFAF")
ZenburnGreenM5 = HexColor("#2F4F2F")
ZenburnGreenM4 = HexColor("#3F5F3F")
ZenburnGreenM3 = HexColor("#4F6F4F")
ZenburnGreenM2 = HexColor("#5F7F5F")
ZenburnGreenM1 = HexColor("#6F8F6F")
ZenburnGreen = HexColor("#7F9F7F")
ZenburnGreenP1 = HexColor("#8FB28F")
ZenburnGreenP2 = HexColor("#9FC59F")
ZenburnGreenP3 = HexColor("#AFD8AF")
ZenburnGreenP4 = HexColor("#BFEBBF")
ZenburnCyan = HexColor("#93E0E3")
ZenburnBlueP3 = HexColor("#BDE0F3")
ZenburnBlueP2 = HexColor("#ACE0E3")
ZenburnBlueP1 = HexColor("#94BFF3")
ZenburnBlue = HexColor("#8CD0D3")
ZenburnBlueM1 = HexColor("#7CB8BB")
ZenburnBlueM2 = HexColor("#6CA0A3")
ZenburnBlueM3 = HexColor("#5C888B")
ZenburnBlueM4 = HexColor("#4C7073")
ZenburnBlueM5 = HexColor("#366060")
ZenburnMagenta = HexColor("#DC8CC3")
)

// Palette .
Expand Down
69 changes: 69 additions & 0 deletions solarized-palettes.el
Expand Up @@ -490,6 +490,75 @@
)
"The solarized gruvbox light color palette alist.")

(defvar solarized-zenburn-color-palette-alist
'(;; zenburn palette
(base03 . "#3F3F3F")
(base02 . "#4F4F4F")
(base01 . "#878777")
(base00 . "#6F6F6F")
(base0 . "#DCDCCC")
(base1 . "#FFFFEF")
(base2 . "#fffff6")
(base3 . "#FFFFFD")
(yellow . "#F0DFAF")
(orange . "#DFAF8F")
(red . "#CC9393")
(magenta . "#DC8CC3")
(violet . "#bbb0cb")
(blue . "#8CD0D3")
(cyan . "#93E0E3")
(green . "#7F9F7F")
(yellow-1bg . "#55524c")
(yellow-1fg . "#f2e6c3")
(yellow-2bg . "#777160")
(yellow-2fg . "#ece2c7")
(yellow-d . "#7B6000")
(yellow-l . "#DEB542")
(orange-1bg . "#534c48")
(orange-1fg . "#e7c4ac")
(orange-2bg . "#726054")
(orange-2fg . "#e4c7b4")
(orange-d . "#8B2C02")
(orange-l . "#F2804F")
(red-1bg . "#504948")
(red-1fg . "#dab0af")
(red-2bg . "#6b5656")
(red-2fg . "#d9b8b6")
(red-d . "#990A1B")
(red-l . "#FF6E64")
(magenta-1bg . "#52484f")
(magenta-1fg . "#e5acd1")
(magenta-2bg . "#705467")
(magenta-2fg . "#e2b5d2")
(magenta-d . "#93115C")
(magenta-l . "#F771AC")
(violet-1bg . "#4e4c50")
(violet-1fg . "#ccc4d7")
(violet-2bg . "#64606a")
(violet-2fg . "#cec8d6")
(violet-d . "#3F4D91")
(violet-l . "#9EA0E5")
(blue-1bg . "#495051")
(blue-1fg . "#addbdd")
(blue-2bg . "#556c6c")
(blue-2fg . "#b7dada")
(blue-d . "#00629D")
(blue-l . "#69B7F0")
(cyan-1bg . "#4a5253")
(cyan-1fg . "#b3e7e8")
(cyan-2bg . "#577172")
(cyan-2fg . "#bbe3e3")
(cyan-d . "#00736F")
(cyan-l . "#69CABF")
(green-1bg . "#464a46")
(green-1fg . "#a2b8a1")
(green-2bg . "#4f5a4e")
(green-2fg . "#acbeab")
(green-d . "#546E00")
(green-l . "#B4C342")
;; palette end
)
"The solarized color palette alist.")
(provide 'solarized-palettes)
;; End:

Expand Down
35 changes: 35 additions & 0 deletions solarized-zenburn-theme.el
@@ -0,0 +1,35 @@
;;; solarized-zenburn-theme.el --- Solarized Theme

;; Copyright (C) 2019 Thomas Frössman

;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.

;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.

;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.

;;; Commentary:
;;
;; The dark variant of the solarized theme with a zenburn palette.
;;
;;; Code:

(require 'solarized)

(deftheme solarized-zenburn
"The dark variant of the Solarized colour theme with gruvbox color palette")

(solarized-definition 'dark 'solarized-zenburn
solarized-zenburn-color-palette-alist)

(provide-theme 'solarized-zenburn)

(provide 'solarized-zenburn-theme)
;;; solarized-zenburn-theme.el ends here

0 comments on commit eace864

Please sign in to comment.