Compare commits

..

No commits in common. 'master' and 'lunarized' have entirely different histories.

  1. 61
      README.rst
  2. 156
      beamercolorthemesolarized.sty

@ -1,4 +1,4 @@
Beamer Color Theme Lunarized
Beamer Color Theme Solarized
===============================
A color theme for `Beamer
@ -12,13 +12,16 @@ and its `github page
<https://github.com/altercation/ethanschoonover.com>`_ more
information about the color palette and themes for Vim, Emacs, etc.
If you use **R**, I have also written a `ggplot
<http://had.co.nz/ggplot2/>`_ plot theme using the Solarized colors,
which is available https://github.com/jrnold/ggthemes.
Installation
===============
Download the theme from
https://github.com/wilderjds/beamercolorthemesolarized and place it in
either the same folder as your presentation .tex file or in the LaTeX
installation tree.
Download the theme from https://github.com/jrnold/beamercolorthemesolarized and
place it in either the same folder as your presentation .tex file or
in the LaTeX installation tree.
Usage
================
@ -27,7 +30,7 @@ To load the color theme, add the following line to your document,
::
\usecolortheme[<options>]{lunarized}
\usecolortheme[<options>]{solarized}
The following *<options>* may be given when loading the theme,
@ -38,7 +41,7 @@ The following *<options>* may be given when loading the theme,
``red``, ``magenta``, ``violet``, ``blue``, ``cyan``, or
``green``.
For example, to use a dark theme with a cyan accent,
For example, to use a dark theme with a cyan accent,
::
@ -46,27 +49,27 @@ For example, to use a dark theme with a cyan accent,
In addition to the beamer colors that it sets, this package defines
colors which can be used elsewhere, e.g. in ``\setbeamercolor``.
The package defines the sixteen colors of the Solarized palette.
::
solarizedBase03 #002b36
solarizedBase02 #073642
solarizedBase01 #586e75
solarizedBase00 #657b83
solarizedBase0 #839496
solarizedBase1 #93a1a1
solarizedBase2 #eee8d5
solarizedBase3 #fdf6e3
solarizedYellow #b58900
solarizedOrange #cb4b16
solarizedRed #dc322f
solarizedMagenta #d33682
solarizedViolet #6c71c4
solarizedBlue #268bd2
solarizedCyan #2aa198
solarizedGreen #859900
::
solarizedBase03 #002b36
solarizedBase02 #073642
solarizedBase01 #586e75
solarizedBase00 #657b83
solarizedBase0 #839496
solarizedBase1 #93a1a1
solarizedBase2 #eee8d5
solarizedBase3 #fdf6e3
solarizedYellow #b58900
solarizedOrange #cb4b16
solarizedRed #dc322f
solarizedMagenta #d33682
solarizedViolet #6c71c4
solarizedBlue #268bd2
solarizedCyan #2aa198
solarizedGreen #859900
Additionally, it defines these colors, the values of which are
dependent on the options specified when the theme is loaded.
@ -89,7 +92,7 @@ A light background with yellow accents (the default).
.. code:: latex
\usecolortheme{solarized}
\usecolortheme{solarized}
.. image:: https://raw.github.com/jrnold/beamercolorthemesolarized/master/examples/example_yellow_light-1.png
:scale: 50%
@ -104,7 +107,7 @@ A light background with blue accents.
.. code:: latex
\usecolortheme[accent=blue]{solarized}
\usecolortheme[accent=blue]{solarized}
.. image:: https://raw.github.com/jrnold/beamercolorthemesolarized/master/examples/example_blue_light-1.png
@ -120,7 +123,7 @@ A dark background with yellow accents.
.. code:: latex
\usecolortheme[dark]{solarized}
\usecolortheme[dark]{solarized}
.. image:: https://raw.github.com/jrnold/beamercolorthemesolarized/master/examples/example_yellow_dark-1.png
:scale: 50%

@ -0,0 +1,156 @@
% Beamer Color Theme using the Solarized Palette,
% http://ethanschoonover.com/solarized.
%
% Copyright 2012 Jeffrey B. Arnold
%
% 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/>.
\ProvidesPackage{beamercolorthemesolarized}[2013/10/11 1.0.1 Solarized color theme for beamer]
\RequirePackage{etoolbox}
\RequirePackage{kvoptions}
%% This is ugly. First time using options and conditionals in LaTeX
\SetupKeyvalOptions{
family=solarized,
prefix=solarized@,
}
\DeclareBoolOption[false]{dark}
\DeclareComplementaryOption{light}{dark}
\DeclareStringOption[yellow]{accent}[yellow]
\ProcessKeyvalOptions*
% Solarized palette
\definecolor{solarizedBase03}{HTML}{002B36}
\definecolor{solarizedBase02}{HTML}{073642}
\definecolor{solarizedBase01}{HTML}{586e75}
\definecolor{solarizedBase00}{HTML}{657b83}
\definecolor{solarizedBase0}{HTML}{839496}
\definecolor{solarizedBase1}{HTML}{93a1a1}
\definecolor{solarizedBase2}{HTML}{EEE8D5}
\definecolor{solarizedBase3}{HTML}{FDF6E3}
\definecolor{solarizedYellow}{HTML}{B58900}
\definecolor{solarizedOrange}{HTML}{CB4B16}
\definecolor{solarizedRed}{HTML}{DC322F}
\definecolor{solarizedMagenta}{HTML}{D33682}
\definecolor{solarizedViolet}{HTML}{6C71C4}
\definecolor{solarizedBlue}{HTML}{268BD2}
\definecolor{solarizedCyan}{HTML}{2AA198}
\definecolor{solarizedGreen}{HTML}{859900}
% Set Accent color
% Ugly. Should be done with a switch
\ifdefstring{\solarized@accent}{yellow}{
\colorlet{solarizedAccent}{solarizedYellow}
}{}
\ifdefstring{\solarized@accent}{orange}{
\colorlet{solarizedAccent}{solarizedOrange}
}{}
\ifdefstring{\solarized@accent}{red}{
\colorlet{solarizedAccent}{solarizedRed}
}{}
\ifdefstring{\solarized@accent}{magenta}{
\colorlet{solarizedAccent}{solarizedMagenta}
}{}
\ifdefstring{\solarized@accent}{violet}{
\colorlet{solarizedAccent}{solarizedViolet}
}{}
\ifdefstring{\solarized@accent}{blue}{
\colorlet{solarizedAccent}{solarizedBlue}
}{}
\ifdefstring{\solarized@accent}{cyan}{
\colorlet{solarizedAccent}{solarizedCyan}
}{}
\ifdefstring{\solarized@accent}{green}{
\colorlet{solarizedAccent}{solarizedGreen}
}{}
%% Set base colors for dark or light versions
%% Dark
% Switch between light and dark themes using the method in the CSS
% stylesheet http://ethanschoonover.com/solarized
\ifboolexpe{ bool {solarized@dark}}{
\colorlet{solarizedRebase03}{solarizedBase03}
\colorlet{solarizedRebase02}{solarizedBase02}
\colorlet{solarizedRebase01}{solarizedBase01}
\colorlet{solarizedRebase00}{solarizedBase00}
\colorlet{solarizedRebase0}{solarizedBase0}
\colorlet{solarizedRebase1}{solarizedBase1}
\colorlet{solarizedRebase2}{solarizedBase2}
\colorlet{solarizedRebase3}{solarizedBase3}
}{
%% Light
\colorlet{solarizedRebase03}{solarizedBase3}
\colorlet{solarizedRebase02}{solarizedBase2}
\colorlet{solarizedRebase01}{solarizedBase1}
\colorlet{solarizedRebase00}{solarizedBase0}
\colorlet{solarizedRebase0}{solarizedBase00}
\colorlet{solarizedRebase1}{solarizedBase01}
\colorlet{solarizedRebase2}{solarizedBase02}
\colorlet{solarizedRebase3}{solarizedBase03}
}
\mode<presentation>
\setbeamercolor{normal text}{fg=solarizedRebase0, bg=solarizedRebase03}
\setbeamercolor{alerted text}{fg=solarizedAccent}
% based css pre element
\setbeamercolor{example text}{fg=solarizedRebase1, bg=solarizedRebase02}
% Header and footer from CSS
\setbeamercolor{footline}{bg=solarizedRebase02,fg=solarizedRebase01}
\setbeamercolor{headline}{bg=solarizedRebase01,fg=solarizedRebase1}
% Titles
\setbeamercolor*{titlelike}{fg=solarizedAccent}
\setbeamercolor*{frametitle}{fg=solarizedAccent}
\setbeamercolor*{title}{fg=solarizedAccent}
% Structure elements use css style for header
\setbeamercolor*{structure}{bg=solarizedRebase01, fg=solarizedRebase1}
% Do not mess with subtle colors in palette. I don't like it.
\setbeamercolor*{palette primary}{bg=solarizedRebase01, fg=solarizedRebase1}
\setbeamercolor*{palette secondary}{bg=solarizedRebase01, fg=solarizedRebase1}
\setbeamercolor*{palette tertiary}{bg=solarizedRebase01, fg=solarizedRebase1}
\setbeamercolor*{palette quaternary}{bg=solarizedRebase01, fg=solarizedRebase1}
% Make Blocks slightly lighter/darker
\setbeamercolor{block title}{fg=solarizedAccent, bg=solarizedRebase02}
%\setbeamercolor{block title alerted}{}
%\setbeamercolor{block title example}{}
\setbeamercolor{block body}{parent=normal text, bg=solarizedRebase02}
% \setbeamercolor{block body alerted}{}
% \setbeamercolor{block body example}{}
% same as footline
% Set Sidebar and footline to use the css style for footer
\setbeamercolor*{sidebar}{parent=headline}
\setbeamercolor*{palette sidebar primary}{fg=solarizedRebase01, fg=solarizedRebase1}
\setbeamercolor*{palette sidebar secondary}{fg=solarizedRebase01, fg=solarizedRebase1}
\setbeamercolor*{palette sidebar tertiary}{fg=solarizedRebase01, fg=solarizedRebase1}
\setbeamercolor*{palette sidebar quaternary}{fg=solarizedRebase01, fg=solarizedRebase1}
% border-color for headings
\setbeamercolor{separation line}{fg=solarizedRebase0}
\setbeamercolor{fine separation line}{fg=solarizedRebase0}
\setbeamercolor*{section in sidebar shaded}{parent=palette sidebar primary}
% a.hover.navlink in CSS
\setbeamercolor*{section in sidebar}{parent=palette sidebar primary, fg=solarizedRebase02}
\setbeamercolor*{subsection in sidebar}{parent=section in sidebar}
\setbeamercolor*{subsection in sidebar shaded}{parent=section in sidebar shaded}
\mode
<all>
Loading…
Cancel
Save