\ProvidesPackage{beamerbasecolor}[2004/01/10 ver 1.20]
\NeedsTeXFormat{LaTeX2e}[1995/12/01]

% Copyright 2003 by Till Tantau <tantau@users.sourceforge.net>.
%
% This program can be redistributed and/or modified under the terms
% of the GNU Public License, version 2.


\mode<presentation>

%
% Average background color management
%
\def\beamersetaveragebackground#1{%
  \colorlet{averagebackgroundcolor}{#1}}

\beamersetaveragebackground{white}

\mode
<article>
{
  \def\beamersetaveragebackground#1{}
  
  \ifbeamer@articlexcolor
    \colorlet{averagebackgroundcolor}{white}
  \fi
}



%
% This needs to be managed differently in the future...
%
\colorlet{alert}{red!95!black}

\colorlet{beameralert}{alert}
\colorlet{beamerexample}{green!50!black}
\colorlet{beamerstructure}{structure}

\mode
<article>
{
  \ifbeamer@articlexcolor
    \definecolor{alert}{rgb}{1,0,0}

    \colorlet{beameralert}{alert}
    \colorlet{beamerexample}{green!50!black}
    \colorlet{beamerstructure}{black}
    \colorlet{structure}{beamerstructure}
  \fi
    
}



%
% Allow mixins to survive groups:
%

\let\beamerorig@set@color=\set@color
\let\beamerorig@reset@color=\reset@color

\edef\beamer@zeropt{\the\z@}

\def\beamer@current@colorhook{}

\def\set@color{%
  \edef\beamer@current@colorhook{\beamer@colorhook}%
  \beamerorig@set@color}
\def\reset@color{%
  \beamer@lastskip=\lastskip%
  \edef\beamer@lastskiptexta{\the\lastskip}%
  \ifx\beamer@lastskiptexta\beamer@zeropt\else%
  \ifvmode\unskip\fi\ifhmode\unskip\fi\fi%
   \ifx\beamer@current@colorhook\beamer@colorhook%
    \beamerorig@reset@color%
  \else% mixin changed -> recalculate
    \colorlet{@hookcolor}{.}%
    \colorhook%
    \expandafter\let\expandafter\current@color%
      \csname\string\color@ @hookcolor\endcsname%
    \beamerorig@reset@color%
    \beamer@postscriptcolorhack%  
  \fi%
  \ifx\beamer@lastskiptexta\beamer@zeropt\else%
  \ifvmode\vskip\beamer@lastskip\fi\ifhmode\hskip\beamer@lastskip\fi\fi%
}

\ifx\pdftexversion\@undefined
  \def\beamer@postscriptcolorhack{%
    \edef\beamer@pscolor{\XC@c@lor@to@ps{@hookcolor}}%
    \special{ps: \beamer@pscolor}}
\else
  \def\beamer@postscriptcolorhack{}%
\fi

\mode
<all>


%%% Local Variables: 
%%% mode: latex
%%% TeX-master: "~/texmf/tex/latex/beamer/examples/beamerexample1.tex"
%%% End: 
