Permalink
Browse files

More work on Watts theme

  • Loading branch information...
1 parent 3c659a9 commit f4db2875cb61e3c692bf7c7f5a30be91f4186646 @mapmarkus committed Apr 4, 2012
Showing with 310 additions and 41 deletions.
  1. +2 −0 palettes/.vimrc.local
  2. +267 −0 palettes/watts_pastel.rb
  3. +41 −41 vim/colors/watts.vim
View
2 palettes/.vimrc.local
@@ -0,0 +1,2 @@
+" Save, compile palette and set as color scheme
+:nmap <leader>c :w<CR> :!palette % > ../vim/colors/watts.vim<CR> :colorscheme watts<CR>
View
267 palettes/watts_pastel.rb
@@ -0,0 +1,267 @@
+Palette::ColorScheme.class_eval do
+ def mix(hex_a,hex_b,weight=50)
+ color1, color2 = hex_a, hex_b
+ color1 = swatch(hex_a) if hex_a.is_a?(Symbol) && swatch(hex_a)
+ color2 = swatch(hex_b) if hex_b.is_a?(Symbol) && swatch(hex_b)
+ sass_evaluator(:mix, hex_to_sass_color(color1), hex_to_sass_color(color2), Sass::Script::Number.new(weight))
+ end
+
+ # TODO: This is a todo
+ # Cool!!
+ #
+ def swatch(name,color=nil)
+ @swatches ||= Hash.new
+ @swatches[name.to_sym] = color if color
+ @swatches[name.to_sym]
+ end
+
+ def swatches(hash)
+ hash.each do |k,v|
+ swatch k, v
+ end
+ end
+
+ alias_method :sw, :swatch
+
+ def tint(color,weight=50)
+ mix('FFF',color,weight)
+ end
+
+ def shade(color,weight=50)
+ mix(sw(:fg) || '000',color,weight)
+ end
+
+ def fade(color,weight=50)
+ mix(sw(:bg) || 'FFF',color,weight)
+ end
+end
+
+vim_colors "watts" do
+ author "Marcos A."
+ notes "Light pastel theme"
+
+ reset true
+ background :light
+
+ # Basic
+
+ swatch :red, 'D04432' # 'F80326'
+ swatch :blood, 'CF0500'
+ swatch :green, '00C63F'
+ swatch :blue, '314CDE' # '002BEE'
+ swatch :yellow, 'FFF92E'
+ swatch :gold, 'FACE00'
+ swatch :pink, 'D100BD'
+
+ # Code palette
+
+ swatches :fg => '5A5957', # '514746',
+ :bg => 'EAE9E7', # 'F4F1EF',
+ :method => '4375A3',
+ :string => '60A345', #'649400',
+ :keyword => '825196',
+ :numeric => '5F5196',
+ :variable => 'BB435B',
+ :symbol => 'C34E8D', #'C60F70',
+ :type => '45A388', # 'D6331B',
+ :statement => '5996A6' #'4F59DC'
+
+ # Vim palette
+
+ swatches :cursor => 'C32481',
+ :search => '07FA00',
+ :msg => '28E883'
+
+
+ # Code definitions
+
+ Normal :fg => sw(:fg),
+ :bg => sw(:bg)
+
+ LineNr :fg => tint(:fg,50),
+ :bg => shade(:bg,5),
+ :gui => 'italic'
+
+ Function :fg => sw(:method)
+
+ Comment :fg => fade(:fg),
+ :bg => 'NONE',
+ :gui => 'italic'
+
+ String :fg => sw(:string),
+ :gui => 'italic'
+
+ Number :fg => sw(:numeric),
+ :bg => 'NONE'
+
+ Keyword :fg => sw(:keyword),
+ :gui => 'italic'
+
+ Constant :fg => sw(:keyword),
+ :bg => 'NONE'
+
+ Identifier :fg => sw(:variable),
+ :bg => 'NONE'
+
+ Special :fg => sw(:symbol),
+ :bg => 'NONE',
+ :gui => 'italic'
+
+ Typedef :fg => sw(:type),
+ :bg => 'NONE'
+
+ Statement :fg => sw(:statement),
+ :bg => 'NONE'
+
+ Todo :fg => fade(:fg),
+ :bg => fade(:yellow),
+ :gui => 'bold,italic'
+
+ Delimiter :fg => sw(:blood),
+ :gui => 'italic'
+
+ PreProc :fg => sw(:blue)
+
+ StorageClass :fg => sw(:fg),
+ :gui => 'italic'
+
+ type :fg => sw(:type),
+ :bg => 'NONE'
+
+ link :Repeat, :to => :Statement
+
+ link :Operator, :to => :Special
+
+ link :Label, :to => :Identifier
+
+ # Ruby
+
+ link :rubySymbol, :to => :Special
+
+ link :rubyInterpolation, :to => :Normal
+
+ link :rubyStringDelimiter, :to => :String
+
+ link :rubyDefine,
+ :rubyMethodExceptional,
+ :rubyClass,
+ :rubyModule,
+ :to => :Statement
+
+ # Javascript
+
+ link :javaScriptType,
+ :javaScriptNull,
+ :javaScriptThis,
+ :to => :Keyword
+
+ link :javaScriptGlobalObjects, :to => :type
+
+ # CSS
+
+ link :cssSelectorOp, :cssSelectorOp2, :to => :PreProc
+
+ # Git
+
+ gitCommitType :fg => fade(:fg),
+ :gui => 'bold,italic'
+
+ gitCommitFile :fg => sw(:type)
+
+ link :gitcommitSummary, :to => :Title
+ link :gitcommitHeader, :to => :gitcommitType
+ link :gitcommitOverflow, :to => :Error
+
+ # Vim definitions
+
+ Cursor :fg => sw(:bg),
+ :bg => sw(:cursor)
+
+ CursorLine :fg => 'NONE',
+ :bg => shade(:bg,5)
+
+ StatusLine :fg => sw(:bg),
+ :bg => fade(:fg,30),
+ :gui => 'italic'
+
+ StatusLineNC :fg => sw(:bg),
+ :bg => fade(:fg,50),
+ :gui => 'italic'
+
+ VertSplit :fg => fade(:fg,30),
+ :bg => fade(:fg,30)
+
+ Visual :bg => fade(:yellow,20)
+
+ VisualNOS :bg => fade(:yellow,40)
+
+ IncSearch :fg => sw(:fg),
+ :bg => sw(:search),
+ :gui => 'bold'
+
+ Search :fg => sw(:fg),
+ :bg => fade(:search),
+ :gui => 'bold'
+
+ NonText :fg => fade(:fg),
+ :bg => fade(:fg,95),
+ :gui => 'bold'
+
+ Error :fg => sw(:bg),
+ :bg => sw(:red),
+ :gui => 'bold'
+
+ WarningMsg :fg => sw(:bg),
+ :bg => sw(:red),
+ :gui => 'bold'
+
+ Directory :fg => sw(:blue)
+
+ DiffAdd :fg => sw(:green),
+ :bg => fade(:green,90)
+
+ DiffChange :fg => sw(:fg),
+ :bg => fade(:yellow)
+
+ DiffDelete :fg => sw(:red),
+ :bg => fade(:red,90)
+
+ DiffText :fg => tint(:fg,30),
+ :bg => fade(:yellow,90)
+
+ Pmenu :fg => shade('FFF',70),
+ :bg => shade('FFF',12)
+
+ PmenuSel :fg => sw(:fg),
+ :bg => sw(:yellow),
+ :gui => 'bold'
+
+ PmenuThumb :fg => sw(:bg),
+ :bg => fade(:fg,10)
+
+ WildMenu :fg => sw(:fg),
+ :bg => sw(:yellow),
+ :gui => 'italic'
+
+ MatchParen :fg => sw(:fg),
+ :bg => sw(:gold)
+
+ MoreMsg :fg => sw(:fg),
+ :bg => sw(:msg),
+ :gui => 'bold'
+
+ Question :fg => sw(:msg),
+ :bg => 'NONE',
+ :gui => 'bold'
+
+ ModeMsg :fg => sw(:fg),
+ :bg => fade(:msg)
+
+ Title :fg => sw(:fg),
+ :gui => 'bold'
+
+ PreProc :fg => sw(:blue)
+
+ link :ErrorMsg, :to => :Error
+ link :PmenuSbar, :to => :PmenuSel
+end
View
82 vim/colors/watts.vim
@@ -18,51 +18,51 @@ if has("gui_running")
set background=light
endif
-hi Normal guifg=#272629 ctermfg=235 guibg=#E8E6DD ctermbg=254 gui=NONE cterm=NONE
-hi LineNr guifg=#939294 ctermfg=246 guibg=#DEDCD4 ctermbg=253 gui=ITALIC cterm=NONE
-hi Function guifg=#1664AE ctermfg=25 gui=NONE cterm=NONE
-hi Comment guifg=#8A8685 ctermfg=102 guibg=NONE ctermbg=NONE gui=ITALIC cterm=NONE
-hi String guifg=#599E0E ctermfg=70 gui=ITALIC cterm=NONE
-hi Number guifg=#00A97F ctermfg=36 guibg=NONE ctermbg=NONE gui=NONE cterm=NONE
-hi Keyword guifg=#7C00D1 ctermfg=92 gui=ITALIC cterm=NONE
-hi Constant guifg=#7C00D1 ctermfg=92 guibg=NONE ctermbg=NONE gui=NONE cterm=NONE
-hi Identifier guifg=#009570 ctermfg=29 guibg=NONE ctermbg=NONE gui=NONE cterm=NONE
-hi Special guifg=#CB1A76 ctermfg=162 guibg=NONE ctermbg=NONE gui=ITALIC cterm=NONE
-hi Typedef guifg=#8E003E ctermfg=89 guibg=NONE ctermbg=NONE gui=NONE cterm=NONE
-hi Statement guifg=#1786C4 ctermfg=32 guibg=NONE ctermbg=NONE gui=NONE cterm=NONE
-hi Todo guifg=#9F726C ctermfg=131 guibg=NONE ctermbg=NONE gui=BOLD,ITALIC cterm=NONE
+hi Normal guifg=#5A5957 ctermfg=240 guibg=#EAE9E7 ctermbg=254 gui=NONE cterm=NONE
+hi LineNr guifg=#ACACAB ctermfg=145 guibg=#E2E1DF ctermbg=254 gui=ITALIC cterm=NONE
+hi Function guifg=#4375A3 ctermfg=67 gui=NONE cterm=NONE
+hi Comment guifg=#A2A19F ctermfg=247 guibg=NONE ctermbg=NONE gui=ITALIC cterm=NONE
+hi String guifg=#60A345 ctermfg=71 gui=ITALIC cterm=NONE
+hi Number guifg=#5F5196 ctermfg=60 guibg=NONE ctermbg=NONE gui=NONE cterm=NONE
+hi Keyword guifg=#825196 ctermfg=96 gui=ITALIC cterm=NONE
+hi Constant guifg=#825196 ctermfg=96 guibg=NONE ctermbg=NONE gui=NONE cterm=NONE
+hi Identifier guifg=#BB435B ctermfg=131 guibg=NONE ctermbg=NONE gui=NONE cterm=NONE
+hi Special guifg=#C34E8D ctermfg=132 guibg=NONE ctermbg=NONE gui=ITALIC cterm=NONE
+hi Typedef guifg=#45A388 ctermfg=72 guibg=NONE ctermbg=NONE gui=NONE cterm=NONE
+hi Statement guifg=#5996A6 ctermfg=67 guibg=NONE ctermbg=NONE gui=NONE cterm=NONE
+hi Todo guifg=#A2A19F ctermfg=247 guibg=#F4F18A ctermbg=228 gui=BOLD,ITALIC cterm=NONE
hi Delimiter guifg=#CF0500 ctermfg=160 gui=ITALIC cterm=NONE
hi PreProc guifg=#314CDE ctermfg=62 gui=NONE cterm=NONE
-hi StorageClass guifg=#272629 ctermfg=235 gui=ITALIC cterm=NONE
-hi type guifg=#8E003E ctermfg=89 guibg=NONE ctermbg=NONE gui=NONE cterm=NONE
-hi gitCommitType guifg=#8A8685 ctermfg=102 gui=BOLD,ITALIC cterm=NONE
-hi gitCommitFile guifg=#8E003E ctermfg=89 gui=NONE cterm=NONE
-hi Cursor guifg=#E8E6DD ctermfg=254 guibg=#C32481 ctermbg=126 gui=NONE cterm=NONE
-hi CursorLine guifg=NONE ctermfg=NONE guibg=#DEDCD4 ctermbg=253 gui=NONE cterm=NONE
-hi StatusLine guifg=#E8E6DD ctermfg=254 guibg=#605F5F ctermbg=59 gui=ITALIC cterm=NONE
-hi StatusLineNC guifg=#E8E6DD ctermfg=254 guibg=#878683 ctermbg=102 gui=ITALIC cterm=NONE
-hi VertSplit guifg=#605F5F ctermfg=59 guibg=#605F5F ctermbg=59 gui=NONE cterm=NONE
-hi Visual guibg=#FAF551 ctermbg=227 gui=NONE cterm=NONE
-hi VisualNOS guibg=#F5F174 ctermbg=228 gui=NONE cterm=NONE
-hi IncSearch guifg=#272629 ctermfg=235 guibg=#07FA00 ctermbg=46 gui=BOLD cterm=BOLD
-hi Search guifg=#272629 ctermfg=235 guibg=#77F06E ctermbg=119 gui=BOLD cterm=BOLD
-hi NonText guifg=#878683 ctermfg=102 guibg=#DEDCD4 ctermbg=253 gui=BOLD cterm=BOLD
-hi Error guifg=#E8E6DD ctermfg=254 guibg=#D04432 ctermbg=167 gui=BOLD cterm=BOLD
-hi WarningMsg guifg=#E8E6DD ctermfg=254 guibg=#D04432 ctermbg=167 gui=BOLD cterm=BOLD
+hi StorageClass guifg=#5A5957 ctermfg=240 gui=ITALIC cterm=NONE
+hi type guifg=#45A388 ctermfg=72 guibg=NONE ctermbg=NONE gui=NONE cterm=NONE
+hi gitCommitType guifg=#A2A19F ctermfg=247 gui=BOLD,ITALIC cterm=NONE
+hi gitCommitFile guifg=#45A388 ctermfg=72 gui=NONE cterm=NONE
+hi Cursor guifg=#EAE9E7 ctermfg=254 guibg=#C32481 ctermbg=126 gui=NONE cterm=NONE
+hi CursorLine guifg=NONE ctermfg=NONE guibg=#E2E1DF ctermbg=254 gui=NONE cterm=NONE
+hi StatusLine guifg=#EAE9E7 ctermfg=254 guibg=#858482 ctermbg=102 gui=ITALIC cterm=NONE
+hi StatusLineNC guifg=#EAE9E7 ctermfg=254 guibg=#A2A19F ctermbg=247 gui=ITALIC cterm=NONE
+hi VertSplit guifg=#858482 ctermfg=102 guibg=#858482 ctermbg=102 gui=NONE cterm=NONE
+hi Visual guibg=#FAF553 ctermbg=227 gui=NONE cterm=NONE
+hi VisualNOS guibg=#F6F278 ctermbg=228 gui=NONE cterm=NONE
+hi IncSearch guifg=#5A5957 ctermfg=240 guibg=#07FA00 ctermbg=46 gui=BOLD cterm=BOLD
+hi Search guifg=#5A5957 ctermfg=240 guibg=#78F173 ctermbg=119 gui=BOLD cterm=BOLD
+hi NonText guifg=#A2A19F ctermfg=247 guibg=#E2E1DF ctermbg=254 gui=BOLD cterm=BOLD
+hi Error guifg=#EAE9E7 ctermfg=254 guibg=#D04432 ctermbg=167 gui=BOLD cterm=BOLD
+hi WarningMsg guifg=#EAE9E7 ctermfg=254 guibg=#D04432 ctermbg=167 gui=BOLD cterm=BOLD
hi Directory guifg=#314CDE ctermfg=62 gui=NONE cterm=NONE
-hi DiffAdd guifg=#00C63F ctermfg=41 guibg=#D0E2CD ctermbg=252 gui=NONE cterm=NONE
-hi DiffChange guifg=#272629 ctermfg=235 guibg=#F3EF85 ctermbg=228 gui=NONE cterm=NONE
-hi DiffDelete guifg=#D04432 ctermfg=167 guibg=#E5D5CB ctermbg=188 gui=NONE cterm=NONE
-hi DiffText guifg=#676769 ctermfg=242 guibg=#EAE7CB ctermbg=254 gui=NONE cterm=NONE
-hi Pmenu guifg=#676769 ctermfg=242 guibg=#E5E4E5 ctermbg=254 gui=NONE cterm=NONE
-hi PmenuSel guifg=#272629 ctermfg=235 guibg=#FFF92E ctermbg=226 gui=BOLD cterm=BOLD
-hi PmenuThumb guifg=#E8E6DD ctermfg=254 guibg=#3A393A ctermbg=237 gui=NONE cterm=NONE
-hi WildMenu guifg=#272629 ctermfg=235 guibg=#FFF92E ctermbg=226 gui=ITALIC cterm=NONE
-hi MatchParen guifg=#272629 ctermfg=235 guibg=#FACE00 ctermbg=220 gui=NONE cterm=NONE
-hi MoreMsg guifg=#272629 ctermfg=235 guibg=#28E883 ctermbg=42 gui=BOLD cterm=BOLD
+hi DiffAdd guifg=#00C63F ctermfg=41 guibg=#D2E5D6 ctermbg=188 gui=NONE cterm=NONE
+hi DiffChange guifg=#5A5957 ctermfg=240 guibg=#F4F18A ctermbg=228 gui=NONE cterm=NONE
+hi DiffDelete guifg=#D04432 ctermfg=167 guibg=#E7D8D4 ctermbg=188 gui=NONE cterm=NONE
+hi DiffText guifg=#8B8A89 ctermfg=245 guibg=#ECEAD4 ctermbg=254 gui=NONE cterm=NONE
+hi Pmenu guifg=#8B8A89 ctermfg=245 guibg=#EBEBEA ctermbg=255 gui=NONE cterm=NONE
+hi PmenuSel guifg=#5A5957 ctermfg=240 guibg=#FFF92E ctermbg=226 gui=BOLD cterm=BOLD
+hi PmenuThumb guifg=#EAE9E7 ctermfg=254 guibg=#686765 ctermbg=241 gui=NONE cterm=NONE
+hi WildMenu guifg=#5A5957 ctermfg=240 guibg=#FFF92E ctermbg=226 gui=ITALIC cterm=NONE
+hi MatchParen guifg=#5A5957 ctermfg=240 guibg=#FACE00 ctermbg=220 gui=NONE cterm=NONE
+hi MoreMsg guifg=#5A5957 ctermfg=240 guibg=#28E883 ctermbg=42 gui=BOLD cterm=BOLD
hi Question guifg=#28E883 ctermfg=42 guibg=NONE ctermbg=NONE gui=BOLD cterm=BOLD
-hi ModeMsg guifg=#272629 ctermfg=235 guibg=#88E7B0 ctermbg=115 gui=NONE cterm=NONE
-hi Title guifg=#272629 ctermfg=235 gui=BOLD cterm=BOLD
+hi ModeMsg guifg=#5A5957 ctermfg=240 guibg=#89E8B5 ctermbg=115 gui=NONE cterm=NONE
+hi Title guifg=#5A5957 ctermfg=240 gui=BOLD cterm=BOLD
hi PreProc guifg=#314CDE ctermfg=62 gui=NONE cterm=NONE
hi link Repeat Statement

0 comments on commit f4db287

Please sign in to comment.