add slides on IETF
[ach-master.git] / presentations / HACK.LU-2014 / presentation / ietf / beamercolorthememodifiedsolarized.sty
1 % Beamer Color Theme using the Solarized Palette,
2 % http://ethanschoonover.com/solarized.
3 %
4 % Copyright 2012 Jeffrey B. Arnold
5
6 % This program is free software: you can redistribute it and/or modify
7 % it under the terms of the GNU General Public License as published by
8 % the Free Software Foundation, either version 3 of the License, or
9 % (at your option) any later version.
10 %
11 % This program is distributed in the hope that it will be useful,
12 % but WITHOUT ANY WARRANTY; without even the implied warranty of
13 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 % GNU General Public License for more details.
15 %
16 % You should have received a copy of the GNU General Public License
17 % along with this program.  If not, see <http://www.gnu.org/licenses/>.
18
19 %
20 % modified to be even darker/or black and white by azet@azet.org @ 24/03/2014
21 %
22
23 \ProvidesPackage{modifiedsolarized}[2013/10/11 1.0.1 Solarized color theme for beamer]
24 \RequirePackage{etoolbox}
25 \RequirePackage{kvoptions}
26
27 %% This is ugly. First time using options and conditionals in LaTeX
28 \SetupKeyvalOptions{
29   family=solarized,
30   prefix=solarized@,
31 }
32 \DeclareBoolOption[false]{dark}
33 \DeclareComplementaryOption{light}{dark}
34 \DeclareStringOption[yellow]{accent}[yellow]
35 \ProcessKeyvalOptions*
36
37 % Solarized palette
38 \definecolor{solarizedBase03}{HTML}{000000}
39 \definecolor{solarizedBase02}{HTML}{073642}
40 \definecolor{solarizedBase01}{HTML}{586e75}
41 \definecolor{solarizedBase00}{HTML}{657b83}
42 \definecolor{solarizedBase0}{HTML}{FFFFFF}%{839496}
43 \definecolor{solarizedBase1}{HTML}{FFFFFF}%{93a1a1}
44 \definecolor{solarizedBase2}{HTML}{EEE8D5}
45 \definecolor{solarizedBase3}{HTML}{FDF6E3}
46 \definecolor{solarizedYellow}{HTML}{B58900}
47 \definecolor{solarizedOrange}{HTML}{CB4B16}
48 \definecolor{solarizedRed}{HTML}{DC322F}
49 \definecolor{solarizedMagenta}{HTML}{D33682}
50 \definecolor{solarizedViolet}{HTML}{6C71C4}
51 \definecolor{solarizedBlue}{HTML}{268BD2}
52 \definecolor{solarizedCyan}{HTML}{2AA198}
53 \definecolor{solarizedGreen}{HTML}{859900}
54 \definecolor{solarizedWhite}{HTML}{FFFFFF}
55
56 % Set Accent color
57 % Ugly. Should be done with a switch
58 \ifdefstring{\solarized@accent}{yellow}{
59   \colorlet{solarizedAccent}{solarizedYellow}
60 }{}
61 \ifdefstring{\solarized@accent}{orange}{
62   \colorlet{solarizedAccent}{solarizedOrange}
63 }{}
64 \ifdefstring{\solarized@accent}{red}{
65   \colorlet{solarizedAccent}{solarizedRed}
66 }{}
67 \ifdefstring{\solarized@accent}{magenta}{
68   \colorlet{solarizedAccent}{solarizedMagenta}
69 }{}
70 \ifdefstring{\solarized@accent}{violet}{
71   \colorlet{solarizedAccent}{solarizedViolet}
72 }{}
73 \ifdefstring{\solarized@accent}{blue}{
74   \colorlet{solarizedAccent}{solarizedBlue}
75 }{}
76 \ifdefstring{\solarized@accent}{cyan}{
77   \colorlet{solarizedAccent}{solarizedCyan}
78 }{}
79 \ifdefstring{\solarized@accent}{green}{
80   \colorlet{solarizedAccent}{solarizedGreen}
81 }{}
82 \ifdefstring{\solarized@accent}{white}{
83   \colorlet{solarizedAccent}{solarizedWhite}
84 }{}
85
86 %% Set base colors for dark or light versions
87 %% Dark
88 % Switch between light and dark themes using the method in the CSS
89 % stylesheet http://ethanschoonover.com/solarized
90 \ifboolexpe{ bool {solarized@dark}}{
91   \colorlet{solarizedRebase03}{solarizedBase03}
92   \colorlet{solarizedRebase02}{solarizedBase02}
93   \colorlet{solarizedRebase01}{solarizedBase01}
94   \colorlet{solarizedRebase00}{solarizedBase00}
95   \colorlet{solarizedRebase0}{solarizedBase0}
96   \colorlet{solarizedRebase1}{solarizedBase1}
97   \colorlet{solarizedRebase2}{solarizedBase2}
98   \colorlet{solarizedRebase3}{solarizedBase3}
99 }{
100   %% Light
101   \colorlet{solarizedRebase03}{solarizedBase3}
102   \colorlet{solarizedRebase02}{solarizedBase2}
103   \colorlet{solarizedRebase01}{solarizedBase1}
104   \colorlet{solarizedRebase00}{solarizedBase0}
105   \colorlet{solarizedRebase0}{solarizedBase00}
106   \colorlet{solarizedRebase1}{solarizedBase01}
107   \colorlet{solarizedRebase2}{solarizedBase02}
108   \colorlet{solarizedRebase3}{solarizedBase03}
109 }
110
111 \mode<presentation>
112
113 \setbeamercolor{normal text}{fg=solarizedRebase0, bg=solarizedRebase03}
114 \setbeamercolor{alerted text}{fg=solarizedAccent}
115 % based css pre element 
116 \setbeamercolor{example text}{fg=solarizedRebase1, bg=solarizedRebase02}
117
118 % Header and footer from CSS 
119 \setbeamercolor{footline}{bg=solarizedRebase02,fg=solarizedRebase01}
120 \setbeamercolor{headline}{bg=solarizedRebase01,fg=solarizedRebase1}
121
122 % Titles
123 \setbeamercolor*{titlelike}{fg=solarizedAccent}
124 \setbeamercolor*{frametitle}{fg=solarizedAccent}
125 \setbeamercolor*{title}{fg=solarizedAccent}
126
127 % Structure elements use css style for header 
128 \setbeamercolor*{structure}{bg=solarizedRebase01, fg=solarizedRebase1}
129
130 % Do not mess with subtle colors in palette. I don't like it. 
131 \setbeamercolor*{palette primary}{bg=solarizedRebase01, fg=solarizedRebase1}
132 \setbeamercolor*{palette secondary}{bg=solarizedRebase01, fg=solarizedRebase1}
133 \setbeamercolor*{palette tertiary}{bg=solarizedRebase01, fg=solarizedRebase1}
134 \setbeamercolor*{palette quaternary}{bg=solarizedRebase01, fg=solarizedRebase1}
135
136 % Make Blocks slightly lighter/darker
137 \setbeamercolor{block title}{fg=solarizedAccent, bg=solarizedRebase02}
138 %\setbeamercolor{block title alerted}{}
139 %\setbeamercolor{block title example}{}
140
141 \setbeamercolor{block body}{parent=normal text, bg=solarizedRebase02}
142 % \setbeamercolor{block body alerted}{}
143 % \setbeamercolor{block body example}{}
144
145 % same as footline
146 % Set Sidebar and footline to use the css style for footer
147 \setbeamercolor*{sidebar}{parent=headline}
148 \setbeamercolor*{palette sidebar primary}{fg=solarizedRebase01, fg=solarizedRebase1}
149 \setbeamercolor*{palette sidebar secondary}{fg=solarizedRebase01, fg=solarizedRebase1}
150 \setbeamercolor*{palette sidebar tertiary}{fg=solarizedRebase01, fg=solarizedRebase1}
151 \setbeamercolor*{palette sidebar quaternary}{fg=solarizedRebase01, fg=solarizedRebase1}
152
153 % border-color for headings
154 \setbeamercolor{separation line}{fg=solarizedRebase0}
155 \setbeamercolor{fine separation line}{fg=solarizedRebase0}
156
157 \setbeamercolor*{section in sidebar shaded}{parent=palette sidebar primary}
158 % a.hover.navlink in CSS
159 \setbeamercolor*{section in sidebar}{parent=palette sidebar primary, fg=solarizedRebase02}
160 \setbeamercolor*{subsection in sidebar}{parent=section in sidebar}
161 \setbeamercolor*{subsection in sidebar shaded}{parent=section in sidebar shaded}
162
163 \mode
164 <all>
165