Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Broken apart main parsing method

Should make code easier to reuse.
Templates starting with "-" now drop the . delimter and adopt the -
  • Loading branch information...
commit 142ade7fcf64f53e035e4d57e5c69d8f1ebc8493 1 parent a566db8
@chriskempson authored
View
87 base16
@@ -36,7 +36,8 @@ class Theme
def build_single_scheme(scheme_file)
puts scheme_file
scheme_data = read_scheme_file(scheme_file)
- parse_template_files(scheme_data)
+ populate_template_variables(scheme_data)
+ create_output_files
end
def read_scheme_file(scheme_file)
@@ -80,53 +81,67 @@ class Theme
abort(read_error_message(template_file))
end
end
-
- def parse_template_files(scheme_data)
-
+
+ def populate_template_variables(scheme_data)
# Define ERB vars
- scheme = scheme_data["scheme"]
- author = scheme_data["author"]
- slug = slug(scheme_data["scheme"])
- uuid = SecureRandom.uuid
- base = {}
+ @scheme = scheme_data["scheme"]
+ @author = scheme_data["author"]
+ @slug = slug(scheme_data["scheme"])
+ # Define ERB color vars
+ @base = {}
[
"00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "0A", "0B",
"0C", "0D", "0E", "0F"
].each do |key|
hex = scheme_data["base" + key];
- base[key] = {
+ @base[key] = {
"hex" => hex,
"dhex" => to_dhex(hex),
"rgb" => to_rgb(hex),
"srgb" => to_srgb(hex)
}
end
-
+ end
+
+ def create_output_files
+ # Read each
read_template_dir.each do |template_file|
- puts " - " + template_file
+ puts " - " + template_file # Show which file we are parsing
- template_contents = read_template_file(template_file)
- parsed = ERB.new(template_contents)
-
- dir_name = File.dirname(template_file);
- file_name = File.basename(template_file, ".erb");
- scheme_name = slug(scheme)
+ # Grab the results of the parsed ERB file
+ contents = parse_template_file(template_file)
- make_dir("#{@output_dir}/#{dir_name}")
-
- #Emacs themes require -theme to appended to end of filename
- if dir_name=="emacs"
- scheme_name << "-theme"
- end
-
- output_file = File.open(
- "#{@output_dir}/#{dir_name}/base16-#{scheme_name}.#{file_name}",
- "w"
- )
- output_file.write parsed.result(binding)
+ write_output_file(template_file, contents)
end
+ end
+
+ def parse_template_file(template_file)
+ # Define ERB vars
+ @uuid = SecureRandom.uuid
+
+ template_contents = read_template_file(template_file)
+ parsed = ERB.new(template_contents)
+
+ return parsed.result(binding)
+ end
+
+ def write_output_file(template_file, contents)
+ dir_name = File.dirname(template_file);
+ file_name = File.basename(template_file, ".erb");
+ scheme_name = slug(@scheme)
+
+ make_dir("#{@output_dir}/#{dir_name}")
+
+ # If the filename starts with a dash, we use the dash to separate
+ delimiter = file_name.starts_with?("-") ? "" : "."
+ output_file = File.open(
+ "#{@output_dir}/#{dir_name}/base16-#{scheme_name}#{delimiter}#{file_name}",
+ "w"
+ )
+
+ output_file.write(contents)
end
def make_dir(name)
@@ -152,12 +167,24 @@ class Theme
hex.scan(/../).map {|color| color.to_i(16).to_f / 255 }
end
+ def split_by_slash(hex)
+ hex.scan(/.{1,2}/).join('/')
+ end
+
def read_error_message(file)
"Error reading #{file}"
end
end
+# Provide starts_with? method borrowed from Rails
+class String
+ def starts_with?(prefix)
+ prefix = prefix.to_s
+ self[0, prefix.length] == prefix
+ end
+end
+
help_message = <<-EOF
Base16 Builder v0.1
https://github.com/chriskempson/base16-builder
View
46 templates/emacs/el.erb → templates/emacs/-theme.el.erb
@@ -1,33 +1,31 @@
<%
# Emacs Template
# Neil Bhakta
-%>
+%>;; Base16 <%= @scheme %> (https://github.com/chriskempson/base16)
+;; Scheme: <%= @author %>
-;; Base16 <%= scheme %> (https://github.com/chriskempson/base16)
-;; Scheme: <%= author %>
-
-;;; base16-<%= slug %>-theme.el
+;;; base16-<%= @slug %>-theme.el
;;; Code:
-(deftheme base16-<%= slug %>)
-
-(let ((background "#<%= base["01"]["hex"] %>")
- (current-line "#<%= base["03"]["hex"] %>")
- (selection "#<%= base["04"]["hex"] %>")
- (foreground "#<%= base["06"]["hex"] %>")
- (comment "#<%= base["04"]["hex"] %>")
- (cursor "#<%= base["06"]["hex"] %>")
- (red "#<%= base["08"]["hex"] %>")
- (orange "#<%= base["09"]["hex"] %>")
- (yellow "#<%= base["0A"]["hex"] %>")
- (green "#<%= base["0B"]["hex"] %>")
- (aqua "#<%= base["0C"]["hex"] %>")
- (blue "#<%= base["0D"]["hex"] %>")
- (purple "#<%= base["0E"]["hex"] %>"))
+(deftheme base16-<%= @slug %>)
+
+(let ((background "#<%= @base["01"]["hex"] %>")
+ (current-line "#<%= @base["03"]["hex"] %>")
+ (selection "#<%= @base["04"]["hex"] %>")
+ (foreground "#<%= @base["06"]["hex"] %>")
+ (comment "#<%= @base["04"]["hex"] %>")
+ (cursor "#<%= @base["06"]["hex"] %>")
+ (red "#<%= @base["08"]["hex"] %>")
+ (orange "#<%= @base["09"]["hex"] %>")
+ (yellow "#<%= @base["0A"]["hex"] %>")
+ (green "#<%= @base["0B"]["hex"] %>")
+ (aqua "#<%= @base["0C"]["hex"] %>")
+ (blue "#<%= @base["0D"]["hex"] %>")
+ (purple "#<%= @base["0E"]["hex"] %>"))
(custom-theme-set-faces
- 'base16-<%= slug %>
+ 'base16-<%= @slug %>
;; Built-in stuff (Emacs 23)
`(default ((t (:background ,background :foreground ,foreground))))
@@ -76,7 +74,7 @@
`(rainbow-delimiters-depth-9-face ((t (:foreground ,foreground)))))
(custom-theme-set-variables
- 'base16-<%= slug %>
+ 'base16-<%= @slug %>
`(ansi-color-names-vector
;; black, red, green, yellow, blue, magenta, cyan, white
@@ -85,6 +83,6 @@
;; black, red, green, yellow, blue, magenta, cyan, white
[unspecified ,background ,red ,green ,yellow ,blue ,purple ,blue ,foreground])))
-(provide-theme 'base16-<%= slug %>)
+(provide-theme 'base16-<%= @slug %>)
-;;; base16-<%= slug %>-theme.el ends here
+;;; base16-<%= @slug %>-theme.el ends here
View
34 templates/gimp-palette/gpl.erb
@@ -3,22 +3,22 @@
# Chris Kempson (http://chriskempson.com)
%>GIMP Palette
-Name: Base16 <%= scheme %>
+Name: Base16 <%= @scheme %>
Columns: 16
#
- <%= base["00"]["rgb"][0] %> <%= base["00"]["rgb"][1] %> <%= base["00"]["rgb"][2] %> base00
- <%= base["01"]["rgb"][0] %> <%= base["01"]["rgb"][1] %> <%= base["01"]["rgb"][2] %> base01
- <%= base["02"]["rgb"][0] %> <%= base["02"]["rgb"][1] %> <%= base["02"]["rgb"][2] %> base02
- <%= base["03"]["rgb"][0] %> <%= base["03"]["rgb"][1] %> <%= base["03"]["rgb"][2] %> base03
- <%= base["04"]["rgb"][0] %> <%= base["04"]["rgb"][1] %> <%= base["04"]["rgb"][2] %> base04
- <%= base["05"]["rgb"][0] %> <%= base["05"]["rgb"][1] %> <%= base["05"]["rgb"][2] %> base05
- <%= base["06"]["rgb"][0] %> <%= base["06"]["rgb"][1] %> <%= base["06"]["rgb"][2] %> base06
- <%= base["07"]["rgb"][0] %> <%= base["07"]["rgb"][1] %> <%= base["07"]["rgb"][2] %> base07
- <%= base["08"]["rgb"][0] %> <%= base["08"]["rgb"][1] %> <%= base["08"]["rgb"][2] %> base08
- <%= base["09"]["rgb"][0] %> <%= base["09"]["rgb"][1] %> <%= base["09"]["rgb"][2] %> base09
- <%= base["0A"]["rgb"][0] %> <%= base["0A"]["rgb"][1] %> <%= base["0A"]["rgb"][2] %> base0A
- <%= base["0B"]["rgb"][0] %> <%= base["0B"]["rgb"][1] %> <%= base["0B"]["rgb"][2] %> base0B
- <%= base["0C"]["rgb"][0] %> <%= base["0C"]["rgb"][1] %> <%= base["0C"]["rgb"][2] %> base0C
- <%= base["0D"]["rgb"][0] %> <%= base["0D"]["rgb"][1] %> <%= base["0D"]["rgb"][2] %> base0D
- <%= base["0E"]["rgb"][0] %> <%= base["0E"]["rgb"][1] %> <%= base["0E"]["rgb"][2] %> base0E
- <%= base["0F"]["rgb"][0] %> <%= base["0F"]["rgb"][1] %> <%= base["0F"]["rgb"][2] %> base0F
+ <%= @base["00"]["rgb"][0] %> <%= @base["00"]["rgb"][1] %> <%= @base["00"]["rgb"][2] %> base00
+ <%= @base["01"]["rgb"][0] %> <%= @base["01"]["rgb"][1] %> <%= @base["01"]["rgb"][2] %> base01
+ <%= @base["02"]["rgb"][0] %> <%= @base["02"]["rgb"][1] %> <%= @base["02"]["rgb"][2] %> base02
+ <%= @base["03"]["rgb"][0] %> <%= @base["03"]["rgb"][1] %> <%= @base["03"]["rgb"][2] %> base03
+ <%= @base["04"]["rgb"][0] %> <%= @base["04"]["rgb"][1] %> <%= @base["04"]["rgb"][2] %> base04
+ <%= @base["05"]["rgb"][0] %> <%= @base["05"]["rgb"][1] %> <%= @base["05"]["rgb"][2] %> base05
+ <%= @base["06"]["rgb"][0] %> <%= @base["06"]["rgb"][1] %> <%= @base["06"]["rgb"][2] %> base06
+ <%= @base["07"]["rgb"][0] %> <%= @base["07"]["rgb"][1] %> <%= @base["07"]["rgb"][2] %> base07
+ <%= @base["08"]["rgb"][0] %> <%= @base["08"]["rgb"][1] %> <%= @base["08"]["rgb"][2] %> base08
+ <%= @base["09"]["rgb"][0] %> <%= @base["09"]["rgb"][1] %> <%= @base["09"]["rgb"][2] %> base09
+ <%= @base["0A"]["rgb"][0] %> <%= @base["0A"]["rgb"][1] %> <%= @base["0A"]["rgb"][2] %> base0A
+ <%= @base["0B"]["rgb"][0] %> <%= @base["0B"]["rgb"][1] %> <%= @base["0B"]["rgb"][2] %> base0B
+ <%= @base["0C"]["rgb"][0] %> <%= @base["0C"]["rgb"][1] %> <%= @base["0C"]["rgb"][2] %> base0C
+ <%= @base["0D"]["rgb"][0] %> <%= @base["0D"]["rgb"][1] %> <%= @base["0D"]["rgb"][2] %> base0D
+ <%= @base["0E"]["rgb"][0] %> <%= @base["0E"]["rgb"][1] %> <%= @base["0E"]["rgb"][2] %> base0E
+ <%= @base["0F"]["rgb"][0] %> <%= @base["0F"]["rgb"][1] %> <%= @base["0F"]["rgb"][2] %> base0F
View
16 templates/gnome-terminal/dark.sh.erb
@@ -3,11 +3,11 @@
# Chris Kempson (http://chriskempson.com)
%>#!/usr/bin/env bash
-# Base16 <%= scheme %> - Gnome Terminal color scheme install script
-# <%= author %>
+# Base16 <%= @scheme %> - Gnome Terminal color scheme install script
+# <%= @author %>
-[[ -z "$PROFILE_NAME" ]] && PROFILE_NAME="Base 16 <%= scheme %>"
-[[ -z "$PROFILE_SLUG" ]] && PROFILE_SLUG="base-16-<%= slug %>"
+[[ -z "$PROFILE_NAME" ]] && PROFILE_NAME="Base 16 <%= @scheme %>"
+[[ -z "$PROFILE_SLUG" ]] && PROFILE_SLUG="base-16-<%= @slug %>"
[[ -z "$GCONFTOOL" ]] && GCONFTOOL=gconftool
[[ -z "$BASE_KEY" ]] && BASE_KEY=/apps/gnome-terminal/profiles
@@ -41,10 +41,10 @@ glist_append() {
glist_append string /apps/gnome-terminal/global/profile_list "$PROFILE_SLUG"
gset string visible_name "$PROFILE_NAME"
-gset string palette "#<%= base["00"]["dhex"] %>:#<%= base["01"]["dhex"] %>:#<%= base["02"]["dhex"] %>:#<%= base["03"]["dhex"] %>:#<%= base["04"]["dhex"] %>:#<%= base["05"]["dhex"] %>:#<%= base["06"]["dhex"] %>:#<%= base["07"]["dhex"] %>:#<%= base["08"]["dhex"] %>:#<%= base["09"]["dhex"] %>:#<%= base["0A"]["dhex"] %>:#<%= base["0B"]["dhex"] %>:#<%= base["0C"]["dhex"] %>:#<%= base["0D"]["dhex"] %>:#<%= base["0E"]["dhex"] %>:#<%= base["0F"]["dhex"] %>"
-gset string background_color "#<%= base["00"]["dhex"] %>"
-gset string foreground_color "#<%= base["05"]["dhex"] %>"
-gset string bold_color "#<%= base["05"]["dhex"] %>"
+gset string palette "#<%= @base["00"]["dhex"] %>:#<%= @base["01"]["dhex"] %>:#<%= @base["02"]["dhex"] %>:#<%= @base["03"]["dhex"] %>:#<%= @base["04"]["dhex"] %>:#<%= @base["05"]["dhex"] %>:#<%= @base["06"]["dhex"] %>:#<%= @base["07"]["dhex"] %>:#<%= @base["08"]["dhex"] %>:#<%= @base["09"]["dhex"] %>:#<%= @base["0A"]["dhex"] %>:#<%= @base["0B"]["dhex"] %>:#<%= @base["0C"]["dhex"] %>:#<%= @base["0D"]["dhex"] %>:#<%= @base["0E"]["dhex"] %>:#<%= @base["0F"]["dhex"] %>"
+gset string background_color "#<%= @base["00"]["dhex"] %>"
+gset string foreground_color "#<%= @base["05"]["dhex"] %>"
+gset string bold_color "#<%= @base["05"]["dhex"] %>"
gset bool bold_color_same_as_fg "true"
gset bool use_theme_colors "false"
gset bool use_theme_background "false"
View
138 templates/iterm2/dark.256.itermcolors.erb
@@ -9,209 +9,209 @@
<key>Ansi 0 Color</key>
<dict>
<key>Blue Component</key>
- <real><%= base["00"]["srgb"][2] %></real>
+ <real><%= @base["00"]["srgb"][2] %></real>
<key>Green Component</key>
- <real><%= base["00"]["srgb"][1] %></real>
+ <real><%= @base["00"]["srgb"][1] %></real>
<key>Red Component</key>
- <real><%= base["00"]["srgb"][0] %></real>
+ <real><%= @base["00"]["srgb"][0] %></real>
</dict>
<key>Ansi 1 Color</key>
<dict>
<key>Blue Component</key>
- <real><%= base["08"]["srgb"][2] %></real>
+ <real><%= @base["08"]["srgb"][2] %></real>
<key>Green Component</key>
- <real><%= base["08"]["srgb"][1] %></real>
+ <real><%= @base["08"]["srgb"][1] %></real>
<key>Red Component</key>
- <real><%= base["08"]["srgb"][0] %></real>
+ <real><%= @base["08"]["srgb"][0] %></real>
</dict>
<key>Ansi 10 Color</key>
<dict>
<key>Blue Component</key>
- <real><%= base["0B"]["srgb"][2] %></real>
+ <real><%= @base["0B"]["srgb"][2] %></real>
<key>Green Component</key>
- <real><%= base["0B"]["srgb"][1] %></real>
+ <real><%= @base["0B"]["srgb"][1] %></real>
<key>Red Component</key>
- <real><%= base["0B"]["srgb"][0] %></real>
+ <real><%= @base["0B"]["srgb"][0] %></real>
</dict>
<key>Ansi 11 Color</key>
<dict>
<key>Blue Component</key>
- <real><%= base["0A"]["srgb"][2] %></real>
+ <real><%= @base["0A"]["srgb"][2] %></real>
<key>Green Component</key>
- <real><%= base["0A"]["srgb"][1] %></real>
+ <real><%= @base["0A"]["srgb"][1] %></real>
<key>Red Component</key>
- <real><%= base["0A"]["srgb"][0] %></real>
+ <real><%= @base["0A"]["srgb"][0] %></real>
</dict>
<key>Ansi 12 Color</key>
<dict>
<key>Blue Component</key>
- <real><%= base["0D"]["srgb"][2] %></real>
+ <real><%= @base["0D"]["srgb"][2] %></real>
<key>Green Component</key>
- <real><%= base["0D"]["srgb"][1] %></real>
+ <real><%= @base["0D"]["srgb"][1] %></real>
<key>Red Component</key>
- <real><%= base["0D"]["srgb"][0] %></real>
+ <real><%= @base["0D"]["srgb"][0] %></real>
</dict>
<key>Ansi 13 Color</key>
<dict>
<key>Blue Component</key>
- <real><%= base["0E"]["srgb"][2] %></real>
+ <real><%= @base["0E"]["srgb"][2] %></real>
<key>Green Component</key>
- <real><%= base["0E"]["srgb"][1] %></real>
+ <real><%= @base["0E"]["srgb"][1] %></real>
<key>Red Component</key>
- <real><%= base["0E"]["srgb"][0] %></real>
+ <real><%= @base["0E"]["srgb"][0] %></real>
</dict>
<key>Ansi 14 Color</key>
<dict>
<key>Blue Component</key>
- <real><%= base["0C"]["srgb"][2] %></real>
+ <real><%= @base["0C"]["srgb"][2] %></real>
<key>Green Component</key>
- <real><%= base["0C"]["srgb"][1] %></real>
+ <real><%= @base["0C"]["srgb"][1] %></real>
<key>Red Component</key>
- <real><%= base["0C"]["srgb"][0] %></real>
+ <real><%= @base["0C"]["srgb"][0] %></real>
</dict>
<key>Ansi 15 Color</key>
<dict>
<key>Blue Component</key>
- <real><%= base["07"]["srgb"][2] %></real>
+ <real><%= @base["07"]["srgb"][2] %></real>
<key>Green Component</key>
- <real><%= base["07"]["srgb"][1] %></real>
+ <real><%= @base["07"]["srgb"][1] %></real>
<key>Red Component</key>
- <real><%= base["07"]["srgb"][0] %></real>
+ <real><%= @base["07"]["srgb"][0] %></real>
</dict>
<key>Ansi 2 Color</key>
<dict>
<key>Blue Component</key>
- <real><%= base["0B"]["srgb"][2] %></real>
+ <real><%= @base["0B"]["srgb"][2] %></real>
<key>Green Component</key>
- <real><%= base["0B"]["srgb"][1] %></real>
+ <real><%= @base["0B"]["srgb"][1] %></real>
<key>Red Component</key>
- <real><%= base["0B"]["srgb"][0] %></real>
+ <real><%= @base["0B"]["srgb"][0] %></real>
</dict>
<key>Ansi 3 Color</key>
<dict>
<key>Blue Component</key>
- <real><%= base["0A"]["srgb"][2] %></real>
+ <real><%= @base["0A"]["srgb"][2] %></real>
<key>Green Component</key>
- <real><%= base["0A"]["srgb"][1] %></real>
+ <real><%= @base["0A"]["srgb"][1] %></real>
<key>Red Component</key>
- <real><%= base["0A"]["srgb"][0] %></real>
+ <real><%= @base["0A"]["srgb"][0] %></real>
</dict>
<key>Ansi 4 Color</key>
<dict>
<key>Blue Component</key>
- <real><%= base["0D"]["srgb"][2] %></real>
+ <real><%= @base["0D"]["srgb"][2] %></real>
<key>Green Component</key>
- <real><%= base["0D"]["srgb"][1] %></real>
+ <real><%= @base["0D"]["srgb"][1] %></real>
<key>Red Component</key>
- <real><%= base["0D"]["srgb"][0] %></real>
+ <real><%= @base["0D"]["srgb"][0] %></real>
</dict>
<key>Ansi 5 Color</key>
<dict>
<key>Blue Component</key>
- <real><%= base["0E"]["srgb"][2] %></real>
+ <real><%= @base["0E"]["srgb"][2] %></real>
<key>Green Component</key>
- <real><%= base["0E"]["srgb"][1] %></real>
+ <real><%= @base["0E"]["srgb"][1] %></real>
<key>Red Component</key>
- <real><%= base["0E"]["srgb"][0] %></real>
+ <real><%= @base["0E"]["srgb"][0] %></real>
</dict>
<key>Ansi 6 Color</key>
<dict>
<key>Blue Component</key>
- <real><%= base["0C"]["srgb"][2] %></real>
+ <real><%= @base["0C"]["srgb"][2] %></real>
<key>Green Component</key>
- <real><%= base["0C"]["srgb"][1] %></real>
+ <real><%= @base["0C"]["srgb"][1] %></real>
<key>Red Component</key>
- <real><%= base["0C"]["srgb"][0] %></real>
+ <real><%= @base["0C"]["srgb"][0] %></real>
</dict>
<key>Ansi 7 Color</key>
<dict>
<key>Blue Component</key>
- <real><%= base["05"]["srgb"][2] %></real>
+ <real><%= @base["05"]["srgb"][2] %></real>
<key>Green Component</key>
- <real><%= base["05"]["srgb"][1] %></real>
+ <real><%= @base["05"]["srgb"][1] %></real>
<key>Red Component</key>
- <real><%= base["05"]["srgb"][0] %></real>
+ <real><%= @base["05"]["srgb"][0] %></real>
</dict>
<key>Ansi 8 Color</key>
<dict>
<key>Blue Component</key>
- <real><%= base["03"]["srgb"][2] %></real>
+ <real><%= @base["03"]["srgb"][2] %></real>
<key>Green Component</key>
- <real><%= base["03"]["srgb"][1] %></real>
+ <real><%= @base["03"]["srgb"][1] %></real>
<key>Red Component</key>
- <real><%= base["03"]["srgb"][0] %></real>
+ <real><%= @base["03"]["srgb"][0] %></real>
</dict>
<key>Ansi 9 Color</key>
<dict>
<key>Blue Component</key>
- <real><%= base["08"]["srgb"][2] %></real>
+ <real><%= @base["08"]["srgb"][2] %></real>
<key>Green Component</key>
- <real><%= base["08"]["srgb"][1] %></real>
+ <real><%= @base["08"]["srgb"][1] %></real>
<key>Red Component</key>
- <real><%= base["08"]["srgb"][0] %></real>
+ <real><%= @base["08"]["srgb"][0] %></real>
</dict>
<key>Background Color</key>
<dict>
<key>Blue Component</key>
- <real><%= base["00"]["srgb"][2] %></real>
+ <real><%= @base["00"]["srgb"][2] %></real>
<key>Green Component</key>
- <real><%= base["00"]["srgb"][1] %></real>
+ <real><%= @base["00"]["srgb"][1] %></real>
<key>Red Component</key>
- <real><%= base["00"]["srgb"][0] %></real>
+ <real><%= @base["00"]["srgb"][0] %></real>
</dict>
<key>Bold Color</key>
<dict>
<key>Blue Component</key>
- <real><%= base["05"]["srgb"][2] %></real>
+ <real><%= @base["05"]["srgb"][2] %></real>
<key>Green Component</key>
- <real><%= base["05"]["srgb"][1] %></real>
+ <real><%= @base["05"]["srgb"][1] %></real>
<key>Red Component</key>
- <real><%= base["05"]["srgb"][0] %></real>
+ <real><%= @base["05"]["srgb"][0] %></real>
</dict>
<key>Cursor Color</key>
<dict>
<key>Blue Component</key>
- <real><%= base["05"]["srgb"][2] %></real>
+ <real><%= @base["05"]["srgb"][2] %></real>
<key>Green Component</key>
- <real><%= base["05"]["srgb"][1] %></real>
+ <real><%= @base["05"]["srgb"][1] %></real>
<key>Red Component</key>
- <real><%= base["05"]["srgb"][0] %></real>
+ <real><%= @base["05"]["srgb"][0] %></real>
</dict>
<key>Cursor Text Color</key>
<dict>
<key>Blue Component</key>
- <real><%= base["00"]["srgb"][2] %></real>
+ <real><%= @base["00"]["srgb"][2] %></real>
<key>Green Component</key>
- <real><%= base["00"]["srgb"][1] %></real>
+ <real><%= @base["00"]["srgb"][1] %></real>
<key>Red Component</key>
- <real><%= base["00"]["srgb"][0] %></real>
+ <real><%= @base["00"]["srgb"][0] %></real>
</dict>
<key>Foreground Color</key>
<dict>
<key>Blue Component</key>
- <real><%= base["05"]["srgb"][2] %></real>
+ <real><%= @base["05"]["srgb"][2] %></real>
<key>Green Component</key>
- <real><%= base["05"]["srgb"][1] %></real>
+ <real><%= @base["05"]["srgb"][1] %></real>
<key>Red Component</key>
- <real><%= base["05"]["srgb"][0] %></real>
+ <real><%= @base["05"]["srgb"][0] %></real>
</dict>
<key>Selected Text Color</key>
<dict>
<key>Blue Component</key>
- <real><%= base["05"]["srgb"][2] %></real>
+ <real><%= @base["05"]["srgb"][2] %></real>
<key>Green Component</key>
- <real><%= base["05"]["srgb"][1] %></real>
+ <real><%= @base["05"]["srgb"][1] %></real>
<key>Red Component</key>
- <real><%= base["05"]["srgb"][0] %></real>
+ <real><%= @base["05"]["srgb"][0] %></real>
</dict>
<key>Selection Color</key>
<dict>
<key>Blue Component</key>
- <real><%= base["02"]["srgb"][2] %></real>
+ <real><%= @base["02"]["srgb"][2] %></real>
<key>Green Component</key>
- <real><%= base["02"]["srgb"][1] %></real>
+ <real><%= @base["02"]["srgb"][1] %></real>
<key>Red Component</key>
- <real><%= base["02"]["srgb"][0] %></real>
+ <real><%= @base["02"]["srgb"][0] %></real>
</dict>
</dict>
</plist>
View
138 templates/iterm2/dark.itermcolors.erb
@@ -9,209 +9,209 @@
<key>Ansi 0 Color</key>
<dict>
<key>Blue Component</key>
- <real><%= base["00"]["srgb"][2] %></real>
+ <real><%= @base["00"]["srgb"][2] %></real>
<key>Green Component</key>
- <real><%= base["00"]["srgb"][1] %></real>
+ <real><%= @base["00"]["srgb"][1] %></real>
<key>Red Component</key>
- <real><%= base["00"]["srgb"][0] %></real>
+ <real><%= @base["00"]["srgb"][0] %></real>
</dict>
<key>Ansi 1 Color</key>
<dict>
<key>Blue Component</key>
- <real><%= base["08"]["srgb"][2] %></real>
+ <real><%= @base["08"]["srgb"][2] %></real>
<key>Green Component</key>
- <real><%= base["08"]["srgb"][1] %></real>
+ <real><%= @base["08"]["srgb"][1] %></real>
<key>Red Component</key>
- <real><%= base["08"]["srgb"][0] %></real>
+ <real><%= @base["08"]["srgb"][0] %></real>
</dict>
<key>Ansi 10 Color</key>
<dict>
<key>Blue Component</key>
- <real><%= base["01"]["srgb"][2] %></real>
+ <real><%= @base["01"]["srgb"][2] %></real>
<key>Green Component</key>
- <real><%= base["01"]["srgb"][1] %></real>
+ <real><%= @base["01"]["srgb"][1] %></real>
<key>Red Component</key>
- <real><%= base["01"]["srgb"][0] %></real>
+ <real><%= @base["01"]["srgb"][0] %></real>
</dict>
<key>Ansi 11 Color</key>
<dict>
<key>Blue Component</key>
- <real><%= base["02"]["srgb"][2] %></real>
+ <real><%= @base["02"]["srgb"][2] %></real>
<key>Green Component</key>
- <real><%= base["02"]["srgb"][1] %></real>
+ <real><%= @base["02"]["srgb"][1] %></real>
<key>Red Component</key>
- <real><%= base["02"]["srgb"][0] %></real>
+ <real><%= @base["02"]["srgb"][0] %></real>
</dict>
<key>Ansi 12 Color</key>
<dict>
<key>Blue Component</key>
- <real><%= base["04"]["srgb"][2] %></real>
+ <real><%= @base["04"]["srgb"][2] %></real>
<key>Green Component</key>
- <real><%= base["04"]["srgb"][1] %></real>
+ <real><%= @base["04"]["srgb"][1] %></real>
<key>Red Component</key>
- <real><%= base["04"]["srgb"][0] %></real>
+ <real><%= @base["04"]["srgb"][0] %></real>
</dict>
<key>Ansi 13 Color</key>
<dict>
<key>Blue Component</key>
- <real><%= base["06"]["srgb"][2] %></real>
+ <real><%= @base["06"]["srgb"][2] %></real>
<key>Green Component</key>
- <real><%= base["06"]["srgb"][1] %></real>
+ <real><%= @base["06"]["srgb"][1] %></real>
<key>Red Component</key>
- <real><%= base["06"]["srgb"][0] %></real>
+ <real><%= @base["06"]["srgb"][0] %></real>
</dict>
<key>Ansi 14 Color</key>
<dict>
<key>Blue Component</key>
- <real><%= base["0F"]["srgb"][2] %></real>
+ <real><%= @base["0F"]["srgb"][2] %></real>
<key>Green Component</key>
- <real><%= base["0F"]["srgb"][1] %></real>
+ <real><%= @base["0F"]["srgb"][1] %></real>
<key>Red Component</key>
- <real><%= base["0F"]["srgb"][0] %></real>
+ <real><%= @base["0F"]["srgb"][0] %></real>
</dict>
<key>Ansi 15 Color</key>
<dict>
<key>Blue Component</key>
- <real><%= base["07"]["srgb"][2] %></real>
+ <real><%= @base["07"]["srgb"][2] %></real>
<key>Green Component</key>
- <real><%= base["07"]["srgb"][1] %></real>
+ <real><%= @base["07"]["srgb"][1] %></real>
<key>Red Component</key>
- <real><%= base["07"]["srgb"][0] %></real>
+ <real><%= @base["07"]["srgb"][0] %></real>
</dict>
<key>Ansi 2 Color</key>
<dict>
<key>Blue Component</key>
- <real><%= base["0B"]["srgb"][2] %></real>
+ <real><%= @base["0B"]["srgb"][2] %></real>
<key>Green Component</key>
- <real><%= base["0B"]["srgb"][1] %></real>
+ <real><%= @base["0B"]["srgb"][1] %></real>
<key>Red Component</key>
- <real><%= base["0B"]["srgb"][0] %></real>
+ <real><%= @base["0B"]["srgb"][0] %></real>
</dict>
<key>Ansi 3 Color</key>
<dict>
<key>Blue Component</key>
- <real><%= base["0A"]["srgb"][2] %></real>
+ <real><%= @base["0A"]["srgb"][2] %></real>
<key>Green Component</key>
- <real><%= base["0A"]["srgb"][1] %></real>
+ <real><%= @base["0A"]["srgb"][1] %></real>
<key>Red Component</key>
- <real><%= base["0A"]["srgb"][0] %></real>
+ <real><%= @base["0A"]["srgb"][0] %></real>
</dict>
<key>Ansi 4 Color</key>
<dict>
<key>Blue Component</key>
- <real><%= base["0D"]["srgb"][2] %></real>
+ <real><%= @base["0D"]["srgb"][2] %></real>
<key>Green Component</key>
- <real><%= base["0D"]["srgb"][1] %></real>
+ <real><%= @base["0D"]["srgb"][1] %></real>
<key>Red Component</key>
- <real><%= base["0D"]["srgb"][0] %></real>
+ <real><%= @base["0D"]["srgb"][0] %></real>
</dict>
<key>Ansi 5 Color</key>
<dict>
<key>Blue Component</key>
- <real><%= base["0E"]["srgb"][2] %></real>
+ <real><%= @base["0E"]["srgb"][2] %></real>
<key>Green Component</key>
- <real><%= base["0E"]["srgb"][1] %></real>
+ <real><%= @base["0E"]["srgb"][1] %></real>
<key>Red Component</key>
- <real><%= base["0E"]["srgb"][0] %></real>
+ <real><%= @base["0E"]["srgb"][0] %></real>
</dict>
<key>Ansi 6 Color</key>
<dict>
<key>Blue Component</key>
- <real><%= base["0C"]["srgb"][2] %></real>
+ <real><%= @base["0C"]["srgb"][2] %></real>
<key>Green Component</key>
- <real><%= base["0C"]["srgb"][1] %></real>
+ <real><%= @base["0C"]["srgb"][1] %></real>
<key>Red Component</key>
- <real><%= base["0C"]["srgb"][0] %></real>
+ <real><%= @base["0C"]["srgb"][0] %></real>
</dict>
<key>Ansi 7 Color</key>
<dict>
<key>Blue Component</key>
- <real><%= base["05"]["srgb"][2] %></real>
+ <real><%= @base["05"]["srgb"][2] %></real>
<key>Green Component</key>
- <real><%= base["05"]["srgb"][1] %></real>
+ <real><%= @base["05"]["srgb"][1] %></real>
<key>Red Component</key>
- <real><%= base["05"]["srgb"][0] %></real>
+ <real><%= @base["05"]["srgb"][0] %></real>
</dict>
<key>Ansi 8 Color</key>
<dict>
<key>Blue Component</key>
- <real><%= base["03"]["srgb"][2] %></real>
+ <real><%= @base["03"]["srgb"][2] %></real>
<key>Green Component</key>
- <real><%= base["03"]["srgb"][1] %></real>
+ <real><%= @base["03"]["srgb"][1] %></real>
<key>Red Component</key>
- <real><%= base["03"]["srgb"][0] %></real>
+ <real><%= @base["03"]["srgb"][0] %></real>
</dict>
<key>Ansi 9 Color</key>
<dict>
<key>Blue Component</key>
- <real><%= base["09"]["srgb"][2] %></real>
+ <real><%= @base["09"]["srgb"][2] %></real>
<key>Green Component</key>
- <real><%= base["09"]["srgb"][1] %></real>
+ <real><%= @base["09"]["srgb"][1] %></real>
<key>Red Component</key>
- <real><%= base["09"]["srgb"][0] %></real>
+ <real><%= @base["09"]["srgb"][0] %></real>
</dict>
<key>Background Color</key>
<dict>
<key>Blue Component</key>
- <real><%= base["00"]["srgb"][2] %></real>
+ <real><%= @base["00"]["srgb"][2] %></real>
<key>Green Component</key>
- <real><%= base["00"]["srgb"][1] %></real>
+ <real><%= @base["00"]["srgb"][1] %></real>
<key>Red Component</key>
- <real><%= base["00"]["srgb"][0] %></real>
+ <real><%= @base["00"]["srgb"][0] %></real>
</dict>
<key>Bold Color</key>
<dict>
<key>Blue Component</key>
- <real><%= base["05"]["srgb"][2] %></real>
+ <real><%= @base["05"]["srgb"][2] %></real>
<key>Green Component</key>
- <real><%= base["05"]["srgb"][1] %></real>
+ <real><%= @base["05"]["srgb"][1] %></real>
<key>Red Component</key>
- <real><%= base["05"]["srgb"][0] %></real>
+ <real><%= @base["05"]["srgb"][0] %></real>
</dict>
<key>Cursor Color</key>
<dict>
<key>Blue Component</key>
- <real><%= base["05"]["srgb"][2] %></real>
+ <real><%= @base["05"]["srgb"][2] %></real>
<key>Green Component</key>
- <real><%= base["05"]["srgb"][1] %></real>
+ <real><%= @base["05"]["srgb"][1] %></real>
<key>Red Component</key>
- <real><%= base["05"]["srgb"][0] %></real>
+ <real><%= @base["05"]["srgb"][0] %></real>
</dict>
<key>Cursor Text Color</key>
<dict>
<key>Blue Component</key>
- <real><%= base["00"]["srgb"][2] %></real>
+ <real><%= @base["00"]["srgb"][2] %></real>
<key>Green Component</key>
- <real><%= base["00"]["srgb"][1] %></real>
+ <real><%= @base["00"]["srgb"][1] %></real>
<key>Red Component</key>
- <real><%= base["00"]["srgb"][0] %></real>
+ <real><%= @base["00"]["srgb"][0] %></real>
</dict>
<key>Foreground Color</key>
<dict>
<key>Blue Component</key>
- <real><%= base["05"]["srgb"][2] %></real>
+ <real><%= @base["05"]["srgb"][2] %></real>
<key>Green Component</key>
- <real><%= base["05"]["srgb"][1] %></real>
+ <real><%= @base["05"]["srgb"][1] %></real>
<key>Red Component</key>
- <real><%= base["05"]["srgb"][0] %></real>
+ <real><%= @base["05"]["srgb"][0] %></real>
</dict>
<key>Selected Text Color</key>
<dict>
<key>Blue Component</key>
- <real><%= base["05"]["srgb"][2] %></real>
+ <real><%= @base["05"]["srgb"][2] %></real>
<key>Green Component</key>
- <real><%= base["05"]["srgb"][1] %></real>
+ <real><%= @base["05"]["srgb"][1] %></real>
<key>Red Component</key>
- <real><%= base["05"]["srgb"][0] %></real>
+ <real><%= @base["05"]["srgb"][0] %></real>
</dict>
<key>Selection Color</key>
<dict>
<key>Blue Component</key>
- <real><%= base["02"]["srgb"][2] %></real>
+ <real><%= @base["02"]["srgb"][2] %></real>
<key>Green Component</key>
- <real><%= base["02"]["srgb"][1] %></real>
+ <real><%= @base["02"]["srgb"][1] %></real>
<key>Red Component</key>
- <real><%= base["02"]["srgb"][0] %></real>
+ <real><%= @base["02"]["srgb"][0] %></real>
</dict>
</dict>
</plist>
View
54 templates/mou/dark+.txt.erb
@@ -3,84 +3,84 @@
# Chris Kempson (http://chriskempson.com)
%>editor
-foreground: <%= base["05"]["hex"] %>
-background: <%= base["00"]["hex"] %>
-caret: <%= base["05"]["hex"] %>
+foreground: <%= @base["05"]["hex"] %>
+background: <%= @base["00"]["hex"] %>
+caret: <%= @base["05"]["hex"] %>
editor-selection
-foreground: <%= base["05"]["hex"] %>
-background: <%= base["02"]["hex"] %>
+foreground: <%= @base["05"]["hex"] %>
+background: <%= @base["02"]["hex"] %>
H1
-foreground: <%= base["0D"]["hex"] %>
+foreground: <%= @base["0D"]["hex"] %>
font-style: bold
font-size: 24px
H2
-foreground: <%= base["0D"]["hex"] %>
+foreground: <%= @base["0D"]["hex"] %>
font-style: bold
font-size: 20px
H3
-foreground: <%= base["0D"]["hex"] %>
+foreground: <%= @base["0D"]["hex"] %>
font-size: 17px
H4
-foreground: <%= base["0D"]["hex"] %>
+foreground: <%= @base["0D"]["hex"] %>
font-size: 15px
H5
-foreground: <%= base["0D"]["hex"] %>
+foreground: <%= @base["0D"]["hex"] %>
font-size: 13px
H6
-foreground: <%= base["0D"]["hex"] %>
+foreground: <%= @base["0D"]["hex"] %>
font-size: 11px
EMPH
-foreground: <%= base["0E"]["hex"] %>
+foreground: <%= @base["0E"]["hex"] %>
font-style: italic
STRONG
-foreground: <%= base["0A"]["hex"] %>
+foreground: <%= @base["0A"]["hex"] %>
font-style: bold
HRULE
-foreground: <%= base["05"]["hex"] %>
-background: <%= base["02"]["hex"] %>
+foreground: <%= @base["05"]["hex"] %>
+background: <%= @base["02"]["hex"] %>
LIST_BULLET
-foreground: <%= base["08"]["hex"] %>
+foreground: <%= @base["08"]["hex"] %>
LIST_ENUMERATOR
-foreground: <%= base["08"]["hex"] %>
+foreground: <%= @base["08"]["hex"] %>
LINK
-foreground: <%= base["09"]["hex"] %>
+foreground: <%= @base["09"]["hex"] %>
AUTO_LINK_URL
-foreground: <%= base["0C"]["hex"] %>
+foreground: <%= @base["0C"]["hex"] %>
AUTO_LINK_EMAIL
-foreground: <%= base["0C"]["hex"] %>
+foreground: <%= @base["0C"]["hex"] %>
REFERENCE
-foreground: <%= base["04"]["hex"] %>
+foreground: <%= @base["04"]["hex"] %>
IMAGE
-foreground: <%= base["0C"]["hex"] %>
+foreground: <%= @base["0C"]["hex"] %>
CODE
-foreground: <%= base["0B"]["hex"] %>
+foreground: <%= @base["0B"]["hex"] %>
VERBATIM
-foreground: <%= base["0B"]["hex"] %>
+foreground: <%= @base["0B"]["hex"] %>
HTML_ENTITY
-foreground: <%= base["0F"]["hex"] %>
+foreground: <%= @base["0F"]["hex"] %>
COMMENT
-foreground: <%= base["03"]["hex"] %>
+foreground: <%= @base["03"]["hex"] %>
BLOCKQUOTE
-foreground: <%= base["09"]["hex"] %>
+foreground: <%= @base["09"]["hex"] %>
View
54 templates/mou/dark.txt.erb
@@ -3,78 +3,78 @@
# Chris Kempson (http://chriskempson.com)
%>editor
-foreground: <%= base["05"]["hex"] %>
-background: <%= base["00"]["hex"] %>
-caret: <%= base["05"]["hex"] %>
+foreground: <%= @base["05"]["hex"] %>
+background: <%= @base["00"]["hex"] %>
+caret: <%= @base["05"]["hex"] %>
editor-selection
-foreground: <%= base["05"]["hex"] %>
-background: <%= base["02"]["hex"] %>
+foreground: <%= @base["05"]["hex"] %>
+background: <%= @base["02"]["hex"] %>
H1
-foreground: <%= base["0D"]["hex"] %>
+foreground: <%= @base["0D"]["hex"] %>
font-style: bold
H2
-foreground: <%= base["0D"]["hex"] %>
+foreground: <%= @base["0D"]["hex"] %>
font-style: bold
H3
-foreground: <%= base["0D"]["hex"] %>
+foreground: <%= @base["0D"]["hex"] %>
H4
-foreground: <%= base["0D"]["hex"] %>
+foreground: <%= @base["0D"]["hex"] %>
H5
-foreground: <%= base["0D"]["hex"] %>
+foreground: <%= @base["0D"]["hex"] %>
H6
-foreground: <%= base["0D"]["hex"] %>
+foreground: <%= @base["0D"]["hex"] %>
EMPH
-foreground: <%= base["0E"]["hex"] %>
+foreground: <%= @base["0E"]["hex"] %>
font-style: italic
STRONG
-foreground: <%= base["0A"]["hex"] %>
+foreground: <%= @base["0A"]["hex"] %>
font-style: bold
HRULE
-foreground: <%= base["05"]["hex"] %>
-background: <%= base["02"]["hex"] %>
+foreground: <%= @base["05"]["hex"] %>
+background: <%= @base["02"]["hex"] %>
LIST_BULLET
-foreground: <%= base["08"]["hex"] %>
+foreground: <%= @base["08"]["hex"] %>
LIST_ENUMERATOR
-foreground: <%= base["08"]["hex"] %>
+foreground: <%= @base["08"]["hex"] %>
LINK
-foreground: <%= base["09"]["hex"] %>
+foreground: <%= @base["09"]["hex"] %>
AUTO_LINK_URL
-foreground: <%= base["0C"]["hex"] %>
+foreground: <%= @base["0C"]["hex"] %>
AUTO_LINK_EMAIL
-foreground: <%= base["0C"]["hex"] %>
+foreground: <%= @base["0C"]["hex"] %>
REFERENCE
-foreground: <%= base["04"]["hex"] %>
+foreground: <%= @base["04"]["hex"] %>
IMAGE
-foreground: <%= base["0C"]["hex"] %>
+foreground: <%= @base["0C"]["hex"] %>
CODE
-foreground: <%= base["0B"]["hex"] %>
+foreground: <%= @base["0B"]["hex"] %>
VERBATIM
-foreground: <%= base["0B"]["hex"] %>
+foreground: <%= @base["0B"]["hex"] %>
HTML_ENTITY
-foreground: <%= base["0F"]["hex"] %>
+foreground: <%= @base["0F"]["hex"] %>
COMMENT
-foreground: <%= base["03"]["hex"] %>
+foreground: <%= @base["03"]["hex"] %>
BLOCKQUOTE
-foreground: <%= base["09"]["hex"] %>
+foreground: <%= @base["09"]["hex"] %>
View
70 templates/preview/html.erb
@@ -5,7 +5,7 @@
%><html>
<head>
<meta http-equiv="content-type" content="text/html">
- <title>Base16 <%= scheme %></title>
+ <title>Base16 <%= @scheme %></title>
<style type="text/css" media="screen">
body { margin: 5% 20%; }
.scheme, .author, pre, .block { font-family: "menlo", monospace; }
@@ -15,44 +15,44 @@
padding: 10px 20px;
}
- .base00-background { background-color: #<%= base["00"]["hex"] %>; }
- .base01-background { background-color: #<%= base["01"]["hex"] %>; }
- .base02-background { background-color: #<%= base["02"]["hex"] %>; }
- .base03-background { background-color: #<%= base["03"]["hex"] %>; }
- .base04-background { background-color: #<%= base["04"]["hex"] %>; }
- .base05-background { background-color: #<%= base["05"]["hex"] %>; }
- .base06-background { background-color: #<%= base["06"]["hex"] %>; }
- .base07-background { background-color: #<%= base["07"]["hex"] %>; }
- .base08-background { background-color: #<%= base["08"]["hex"] %>; }
- .base09-background { background-color: #<%= base["09"]["hex"] %>; }
- .base0A-background { background-color: #<%= base["0A"]["hex"] %>; }
- .base0B-background { background-color: #<%= base["0B"]["hex"] %>; }
- .base0C-background { background-color: #<%= base["0C"]["hex"] %>; }
- .base0D-background { background-color: #<%= base["0D"]["hex"] %>; }
- .base0E-background { background-color: #<%= base["0E"]["hex"] %>; }
- .base0F-background { background-color: #<%= base["0F"]["hex"] %>; }
+ .base00-background { background-color: #<%= @base["00"]["hex"] %>; }
+ .base01-background { background-color: #<%= @base["01"]["hex"] %>; }
+ .base02-background { background-color: #<%= @base["02"]["hex"] %>; }
+ .base03-background { background-color: #<%= @base["03"]["hex"] %>; }
+ .base04-background { background-color: #<%= @base["04"]["hex"] %>; }
+ .base05-background { background-color: #<%= @base["05"]["hex"] %>; }
+ .base06-background { background-color: #<%= @base["06"]["hex"] %>; }
+ .base07-background { background-color: #<%= @base["07"]["hex"] %>; }
+ .base08-background { background-color: #<%= @base["08"]["hex"] %>; }
+ .base09-background { background-color: #<%= @base["09"]["hex"] %>; }
+ .base0A-background { background-color: #<%= @base["0A"]["hex"] %>; }
+ .base0B-background { background-color: #<%= @base["0B"]["hex"] %>; }
+ .base0C-background { background-color: #<%= @base["0C"]["hex"] %>; }
+ .base0D-background { background-color: #<%= @base["0D"]["hex"] %>; }
+ .base0E-background { background-color: #<%= @base["0E"]["hex"] %>; }
+ .base0F-background { background-color: #<%= @base["0F"]["hex"] %>; }
- .base00 { color: #<%= base["00"]["hex"] %>; }
- .base01 { color: #<%= base["01"]["hex"] %>; }
- .base02 { color: #<%= base["02"]["hex"] %>; }
- .base03 { color: #<%= base["03"]["hex"] %>; }
- .base04 { color: #<%= base["04"]["hex"] %>; }
- .base05 { color: #<%= base["05"]["hex"] %>; }
- .base06 { color: #<%= base["06"]["hex"] %>; }
- .base07 { color: #<%= base["07"]["hex"] %>; }
- .base08 { color: #<%= base["08"]["hex"] %>; }
- .base09 { color: #<%= base["09"]["hex"] %>; }
- .base0A { color: #<%= base["0A"]["hex"] %>; }
- .base0B { color: #<%= base["0B"]["hex"] %>; }
- .base0C { color: #<%= base["0C"]["hex"] %>; }
- .base0D { color: #<%= base["0D"]["hex"] %>; }
- .base0E { color: #<%= base["0E"]["hex"] %>; }
- .base0F { color: #<%= base["0F"]["hex"] %>; }
+ .base00 { color: #<%= @base["00"]["hex"] %>; }
+ .base01 { color: #<%= @base["01"]["hex"] %>; }
+ .base02 { color: #<%= @base["02"]["hex"] %>; }
+ .base03 { color: #<%= @base["03"]["hex"] %>; }
+ .base04 { color: #<%= @base["04"]["hex"] %>; }
+ .base05 { color: #<%= @base["05"]["hex"] %>; }
+ .base06 { color: #<%= @base["06"]["hex"] %>; }
+ .base07 { color: #<%= @base["07"]["hex"] %>; }
+ .base08 { color: #<%= @base["08"]["hex"] %>; }
+ .base09 { color: #<%= @base["09"]["hex"] %>; }
+ .base0A { color: #<%= @base["0A"]["hex"] %>; }
+ .base0B { color: #<%= @base["0B"]["hex"] %>; }
+ .base0C { color: #<%= @base["0C"]["hex"] %>; }
+ .base0D { color: #<%= @base["0D"]["hex"] %>; }
+ .base0E { color: #<%= @base["0E"]["hex"] %>; }
+ .base0F { color: #<%= @base["0F"]["hex"] %>; }
</style>
</head>
<body>
- <h1 class="scheme">Base16 <%= scheme %></h1>
- <p class="author"><%= author %></p>
+ <h1 class="scheme">Base16 <%= @scheme %></h1>
+ <p class="author"><%= @author %></p>
<div>
<div class="block base00-background base07">00</div>
<div class="block base01-background base07">01</div>
View
34 templates/preview/svg.erb
@@ -1,21 +1,21 @@
<svg width="800" height="50" xmlns="http://www.w3.org/2000/svg">
<g>
- <title>Base16 <%= scheme %></title>
- <line id="base00" x1="025" y1="0" x2="025" y2="720" stroke-width="50" stroke="#<%= base["00"]["hex"] %>" />
- <line id="base01" x1="075" y1="0" x2="075" y2="720" stroke-width="50" stroke="#<%= base["01"]["hex"] %>" />
- <line id="base02" x1="125" y1="0" x2="125" y2="720" stroke-width="50" stroke="#<%= base["02"]["hex"] %>" />
- <line id="base03" x1="175" y1="0" x2="175" y2="720" stroke-width="50" stroke="#<%= base["03"]["hex"] %>" />
- <line id="base04" x1="225" y1="0" x2="225" y2="720" stroke-width="50" stroke="#<%= base["04"]["hex"] %>" />
- <line id="base05" x1="275" y1="0" x2="275" y2="720" stroke-width="50" stroke="#<%= base["05"]["hex"] %>" />
- <line id="base06" x1="325" y1="0" x2="325" y2="720" stroke-width="50" stroke="#<%= base["06"]["hex"] %>" />
- <line id="base07" x1="375" y1="0" x2="375" y2="720" stroke-width="50" stroke="#<%= base["07"]["hex"] %>" />
- <line id="base08" x1="425" y1="0" x2="425" y2="720" stroke-width="50" stroke="#<%= base["08"]["hex"] %>" />
- <line id="base09" x1="475" y1="0" x2="475" y2="720" stroke-width="50" stroke="#<%= base["09"]["hex"] %>" />
- <line id="base0A" x1="525" y1="0" x2="525" y2="720" stroke-width="50" stroke="#<%= base["0A"]["hex"] %>" />
- <line id="base0B" x1="575" y1="0" x2="575" y2="720" stroke-width="50" stroke="#<%= base["0B"]["hex"] %>" />
- <line id="base0C" x1="625" y1="0" x2="625" y2="720" stroke-width="50" stroke="#<%= base["0C"]["hex"] %>" />
- <line id="base0D" x1="675" y1="0" x2="675" y2="720" stroke-width="50" stroke="#<%= base["0D"]["hex"] %>" />
- <line id="base0E" x1="725" y1="0" x2="725" y2="720" stroke-width="50" stroke="#<%= base["0E"]["hex"] %>" />
- <line id="base0F" x1="775" y1="0" x2="775" y2="720" stroke-width="50" stroke="#<%= base["0F"]["hex"] %>" />
+ <title>Base16 <%= @scheme %></title>
+ <line id="base00" x1="025" y1="0" x2="025" y2="720" stroke-width="50" stroke="#<%= @base["00"]["hex"] %>" />
+ <line id="base01" x1="075" y1="0" x2="075" y2="720" stroke-width="50" stroke="#<%= @base["01"]["hex"] %>" />
+ <line id="base02" x1="125" y1="0" x2="125" y2="720" stroke-width="50" stroke="#<%= @base["02"]["hex"] %>" />
+ <line id="base03" x1="175" y1="0" x2="175" y2="720" stroke-width="50" stroke="#<%= @base["03"]["hex"] %>" />
+ <line id="base04" x1="225" y1="0" x2="225" y2="720" stroke-width="50" stroke="#<%= @base["04"]["hex"] %>" />
+ <line id="base05" x1="275" y1="0" x2="275" y2="720" stroke-width="50" stroke="#<%= @base["05"]["hex"] %>" />
+ <line id="base06" x1="325" y1="0" x2="325" y2="720" stroke-width="50" stroke="#<%= @base["06"]["hex"] %>" />
+ <line id="base07" x1="375" y1="0" x2="375" y2="720" stroke-width="50" stroke="#<%= @base["07"]["hex"] %>" />
+ <line id="base08" x1="425" y1="0" x2="425" y2="720" stroke-width="50" stroke="#<%= @base["08"]["hex"] %>" />
+ <line id="base09" x1="475" y1="0" x2="475" y2="720" stroke-width="50" stroke="#<%= @base["09"]["hex"] %>" />
+ <line id="base0A" x1="525" y1="0" x2="525" y2="720" stroke-width="50" stroke="#<%= @base["0A"]["hex"] %>" />
+ <line id="base0B" x1="575" y1="0" x2="575" y2="720" stroke-width="50" stroke="#<%= @base["0B"]["hex"] %>" />
+ <line id="base0C" x1="625" y1="0" x2="625" y2="720" stroke-width="50" stroke="#<%= @base["0C"]["hex"] %>" />
+ <line id="base0D" x1="675" y1="0" x2="675" y2="720" stroke-width="50" stroke="#<%= @base["0D"]["hex"] %>" />
+ <line id="base0E" x1="725" y1="0" x2="725" y2="720" stroke-width="50" stroke="#<%= @base["0E"]["hex"] %>" />
+ <line id="base0F" x1="775" y1="0" x2="775" y2="720" stroke-width="50" stroke="#<%= @base["0F"]["hex"] %>" />
</g>
</svg>
View
38 templates/rouge/rb.erb
@@ -3,27 +3,27 @@
# Jay Adkisson (http://jayferd.us/)
%>module Rouge
module Themes
- class <%= scheme %> < Base16
- name 'base16.<%= scheme %>'
- # author <%= author %>
+ class <%= @scheme %> < Base16
+ name 'base16.<%= @scheme %>'
+ # author <%= @author %>
light!
- palette base00: "#<%= base['00']['hex'] %>"
- palette base01: "#<%= base['01']['hex'] %>"
- palette base02: "#<%= base['02']['hex'] %>"
- palette base03: "#<%= base['03']['hex'] %>"
- palette base04: "#<%= base['04']['hex'] %>"
- palette base05: "#<%= base['05']['hex'] %>"
- palette base06: "#<%= base['06']['hex'] %>"
- palette base07: "#<%= base['07']['hex'] %>"
- palette base08: "#<%= base['08']['hex'] %>"
- palette base09: "#<%= base['09']['hex'] %>"
- palette base0A: "#<%= base['0A']['hex'] %>"
- palette base0B: "#<%= base['0B']['hex'] %>"
- palette base0C: "#<%= base['0C']['hex'] %>"
- palette base0D: "#<%= base['0D']['hex'] %>"
- palette base0E: "#<%= base['0E']['hex'] %>"
- palette base0F: "#<%= base['0F']['hex'] %>"
+ palette base00: "#<%= @base['00']['hex'] %>"
+ palette base01: "#<%= @base['01']['hex'] %>"
+ palette base02: "#<%= @base['02']['hex'] %>"
+ palette base03: "#<%= @base['03']['hex'] %>"
+ palette base04: "#<%= @base['04']['hex'] %>"
+ palette base05: "#<%= @base['05']['hex'] %>"
+ palette base06: "#<%= @base['06']['hex'] %>"
+ palette base07: "#<%= @base['07']['hex'] %>"
+ palette base08: "#<%= @base['08']['hex'] %>"
+ palette base09: "#<%= @base['09']['hex'] %>"
+ palette base0A: "#<%= @base['0A']['hex'] %>"
+ palette base0B: "#<%= @base['0B']['hex'] %>"
+ palette base0C: "#<%= @base['0C']['hex'] %>"
+ palette base0D: "#<%= @base['0D']['hex'] %>"
+ palette base0E: "#<%= @base['0E']['hex'] %>"
+ palette base0F: "#<%= @base['0F']['hex'] %>"
end
end
end
View
41 templates/shell/dark.sh.erb
@@ -1,37 +1,32 @@
<%
# Shell Color Setup Template
# Chris Kempson (http://chriskempson.com)
-
-def split_by_slash(hex)
- hex.scan(/.{1,2}/).join('/')
-end
-
%>#!/bin/sh
-# Base16 <%= scheme %> - Console color setup script
-# <%= author %>
+# Base16 <%= @scheme %> - Console color setup script
+# <%= @author %>
-color00="<%= base["00"]["hex"] %>" # Base 00 - Black
-color01="<%= base["08"]["hex"] %>" # Base 08 - Red
-color02="<%= base["0B"]["hex"] %>" # Base 0B - Green
-color03="<%= base["0A"]["hex"] %>" # Base 0A - Yellow
-color04="<%= base["0D"]["hex"] %>" # Base 0D - Blue
-color05="<%= base["0E"]["hex"] %>" # Base 0E - Magenta
-color06="<%= base["0C"]["hex"] %>" # Base 0C - Cyan
-color07="<%= base["05"]["hex"] %>" # Base 05 - White
-color08="<%= base["03"]["hex"] %>" # Base 03 - Bright Black
+color00="<%= @base["00"]["hex"] %>" # Base 00 - Black
+color01="<%= @base["08"]["hex"] %>" # Base 08 - Red
+color02="<%= @base["0B"]["hex"] %>" # Base 0B - Green
+color03="<%= @base["0A"]["hex"] %>" # Base 0A - Yellow
+color04="<%= @base["0D"]["hex"] %>" # Base 0D - Blue
+color05="<%= @base["0E"]["hex"] %>" # Base 0E - Magenta
+color06="<%= @base["0C"]["hex"] %>" # Base 0C - Cyan
+color07="<%= @base["05"]["hex"] %>" # Base 05 - White
+color08="<%= @base["03"]["hex"] %>" # Base 03 - Bright Black
color09=$color01 # Base 08 - Bright Red
color10=$color02 # Base 0B - Bright Green
color11=$color03 # Base 0A - Bright Yellow
color12=$color04 # Base 0D - Bright Blue
color13=$color05 # Base 0E - Bright Magenta
color14=$color06 # Base 0C - Bright Cyan
-color15="<%= base["07"]["hex"] %>" # Base 07 - Bright White
-color16="<%= split_by_slash(base["09"]["hex"]) %>" # Base 09
-color17="<%= split_by_slash(base["0F"]["hex"]) %>" # Base 0F
-color18="<%= split_by_slash(base["01"]["hex"]) %>" # Base 01
-color19="<%= split_by_slash(base["02"]["hex"]) %>" # Base 02
-color20="<%= split_by_slash(base["04"]["hex"]) %>" # Base 04
-color21="<%= split_by_slash(base["06"]["hex"]) %>" # Base 06
+color15="<%= @base["07"]["hex"] %>" # Base 07 - Bright White
+color16="<%= split_by_slash(@base["09"]["hex"]) %>" # Base 09
+color17="<%= split_by_slash(@base["0F"]["hex"]) %>" # Base 0F
+color18="<%= split_by_slash(@base["01"]["hex"]) %>" # Base 01
+color19="<%= split_by_slash(@base["02"]["hex"]) %>" # Base 02
+color20="<%= split_by_slash(@base["04"]["hex"]) %>" # Base 04
+color21="<%= split_by_slash(@base["06"]["hex"]) %>" # Base 06
# Bright colors that are actually bright!
# color09="ffa4ac" # Base XX - Bright Red
View
120 templates/textmate/dark.tmTheme.erb
@@ -7,23 +7,23 @@
<plist version="1.0">
<dict>
<key>comment</key>
- <string><%= author %></string>
+ <string><%= @author %></string>
<key>name</key>
- <string>Base16 <%= scheme %> Dark</string>
+ <string>Base16 <%= @scheme %> Dark</string>
<key>semanticClass</key>
- <string>base16.<%= slug %>.dark</string>
+ <string>base16.<%= @slug %>.dark</string>
<key>gutterSettings</key>
<dict>
<key>background</key>
- <string>#<%= base["01"]["hex"] %></string>
+ <string>#<%= @base["01"]["hex"] %></string>
<key>divider</key>
- <string>#<%= base["01"]["hex"] %></string>
+ <string>#<%= @base["01"]["hex"] %></string>
<key>foreground</key>
- <string>#<%= base["03"]["hex"] %></string>
+ <string>#<%= @base["03"]["hex"] %></string>
<key>selectionBackground</key>
- <string>#<%= base["02"]["hex"] %></string>
+ <string>#<%= @base["02"]["hex"] %></string>
<key>selectionForeground</key>
- <string>#<%= base["04"]["hex"] %></string>
+ <string>#<%= @base["04"]["hex"] %></string>
</dict>
<key>settings</key>
<array>
@@ -31,17 +31,17 @@
<key>settings</key>
<dict>
<key>background</key>
- <string>#<%= base["00"]["hex"] %></string>
+ <string>#<%= @base["00"]["hex"] %></string>
<key>caret</key>
- <string>#<%= base["05"]["hex"] %></string>
+ <string>#<%= @base["05"]["hex"] %></string>
<key>foreground</key>
- <string>#<%= base["05"]["hex"] %></string>
+ <string>#<%= @base["05"]["hex"] %></string>
<key>invisibles</key>
- <string>#<%= base["03"]["hex"] %></string>
+ <string>#<%= @base["03"]["hex"] %></string>
<key>lineHighlight</key>
- <string>#<%= base["01"]["hex"] %></string>
+ <string>#<%= @base["01"]["hex"] %></string>
<key>selection</key>
- <string>#<%= base["02"]["hex"] %></string>
+ <string>#<%= @base["02"]["hex"] %></string>
</dict>
</dict>
<dict>
@@ -52,7 +52,7 @@
<key>settings</key>
<dict>
<key>foreground</key>
- <string>#<%= base["05"]["hex"] %></string>
+ <string>#<%= @base["05"]["hex"] %></string>
</dict>
</dict>
<dict>
@@ -63,7 +63,7 @@
<key>settings</key>
<dict>
<key>foreground</key>
- <string>#<%= base["03"]["hex"] %></string>
+ <string>#<%= @base["03"]["hex"] %></string>
</dict>
</dict>
<dict>
@@ -74,7 +74,7 @@
<key>settings</key>
<dict>
<key>foreground</key>
- <string>#<%= base["05"]["hex"] %></string>
+ <string>#<%= @base["05"]["hex"] %></string>
</dict>
</dict>
<dict>
@@ -85,7 +85,7 @@
<key>settings</key>
<dict>
<key>foreground</key>
- <string>#<%= base["05"]["hex"] %></string>
+ <string>#<%= @base["05"]["hex"] %></string>
</dict>
</dict>
<dict>
@@ -96,7 +96,7 @@
<key>settings</key>
<dict>
<key>foreground</key>
- <string>#<%= base["05"]["hex"] %></string>
+ <string>#<%= @base["05"]["hex"] %></string>
</dict>
</dict>
<dict>
@@ -107,7 +107,7 @@
<key>settings</key>
<dict>
<key>foreground</key>
- <string>#<%= base["0E"]["hex"] %></string>
+ <string>#<%= @base["0E"]["hex"] %></string>
</dict>
</dict>
<dict>
@@ -118,7 +118,7 @@
<key>settings</key>
<dict>
<key>foreground</key>
- <string>#<%= base["08"]["hex"] %></string>
+ <string>#<%= @base["08"]["hex"] %></string>
</dict>
</dict>
<dict>
@@ -129,7 +129,7 @@
<key>settings</key>
<dict>
<key>foreground</key>
- <string>#<%= base["0D"]["hex"] %></string>
+ <string>#<%= @base["0D"]["hex"] %></string>
</dict>
</dict>
<dict>
@@ -140,7 +140,7 @@
<key>settings</key>
<dict>
<key>foreground</key>
- <string>#<%= base["0A"]["hex"] %></string>
+ <string>#<%= @base["0A"]["hex"] %></string>
</dict>
</dict>
<dict>
@@ -151,7 +151,7 @@
<key>settings</key>
<dict>
<key>foreground</key>
- <string>#<%= base["0D"]["hex"] %></string>
+ <string>#<%= @base["0D"]["hex"] %></string>
</dict>
</dict>
<dict>
@@ -162,7 +162,7 @@
<key>settings</key>
<dict>
<key>foreground</key>
- <string>#<%= base["0E"]["hex"] %></string>
+ <string>#<%= @base["0E"]["hex"] %></string>
</dict>
</dict>
<dict>
@@ -173,7 +173,7 @@
<key>settings</key>
<dict>
<key>foreground</key>
- <string>#<%= base["0C"]["hex"] %></string>
+ <string>#<%= @base["0C"]["hex"] %></string>
</dict>
</dict>
<dict>
@@ -184,7 +184,7 @@
<key>settings</key>
<dict>
<key>foreground</key>
- <string>#<%= base["0B"]["hex"] %></string>
+ <string>#<%= @base["0B"]["hex"] %></string>
</dict>
</dict>
<dict>
@@ -195,7 +195,7 @@
<key>settings</key>
<dict>
<key>foreground</key>
- <string>#<%= base["09"]["hex"] %></string>
+ <string>#<%= @base["09"]["hex"] %></string>
</dict>
</dict>
<dict>
@@ -206,7 +206,7 @@
<key>settings</key>
<dict>
<key>foreground</key>
- <string>#<%= base["09"]["hex"] %></string>
+ <string>#<%= @base["09"]["hex"] %></string>
</dict>
</dict>
<dict>
@@ -217,7 +217,7 @@
<key>settings</key>
<dict>
<key>foreground</key>
- <string>#<%= base["09"]["hex"] %></string>
+ <string>#<%= @base["09"]["hex"] %></string>
</dict>
</dict>
<dict>
@@ -228,7 +228,7 @@
<key>settings</key>
<dict>
<key>foreground</key>
- <string>#<%= base["09"]["hex"] %></string>
+ <string>#<%= @base["09"]["hex"] %></string>
</dict>
</dict>
<dict>
@@ -239,7 +239,7 @@
<key>settings</key>
<dict>
<key>foreground</key>
- <string>#<%= base["08"]["hex"] %></string>
+ <string>#<%= @base["08"]["hex"] %></string>
</dict>
</dict>
<dict>
@@ -250,7 +250,7 @@
<key>settings</key>
<dict>
<key>foreground</key>
- <string>#<%= base["09"]["hex"] %></string>
+ <string>#<%= @base["09"]["hex"] %></string>
</dict>
</dict>
<dict>
@@ -261,7 +261,7 @@
<key>settings</key>
<dict>
<key>foreground</key>
- <string>#<%= base["0D"]["hex"] %></string>
+ <string>#<%= @base["0D"]["hex"] %></string>
</dict>
</dict>
<dict>
@@ -272,7 +272,7 @@
<key>settings</key>
<dict>
<key>foreground</key>
- <string>#<%= base["0E"]["hex"] %></string>
+ <string>#<%= @base["0E"]["hex"] %></string>
</dict>
</dict>
<dict>
@@ -283,7 +283,7 @@
<key>settings</key>
<dict>
<key>foreground</key>
- <string>#<%= base["09"]["hex"] %></string>
+ <string>#<%= @base["09"]["hex"] %></string>
</dict>
</dict>
<dict>
@@ -296,7 +296,7 @@
<key>fontStyle</key>
<string></string>
<key>foreground</key>
- <string>#<%= base["0D"]["hex"] %></string>
+ <string>#<%= @base["0D"]["hex"] %></string>
</dict>
</dict>
<dict>