1% Copyright 2003--2007 by Till Tantau 2% Copyright 2010 by Vedran Mileti\'c 3% Copyright 2012,2013,2015 by Vedran Mileti\'c, Joseph Wright 4% 5% This file may be distributed and/or modified 6% 7% 1. under the LaTeX Project Public License and/or 8% 2. under the GNU Free Documentation License. 9% 10% See the file doc/licenses/LICENSE for more details. 11 12\section{Colors} 13 14\label{section-colors} 15 16\beamer's color management allows you to specify the color of every element (like, say, the color of the section entries in a table of contents or, say, the color of the subsection entries in a mini table of contents in a sidebar). While the system is quite powerful, it is not trivial to use. To simplify the usage of the color system, you should consider using a predefined color theme, which takes care of everything for you. 17 18In the following, color themes are explained first. The rest of the section consists of explanations of how the color management works internally. You will need to read these sections only if you wish to write your own color themes; or if you are quite happy with the predefined themes but you absolutely insist that displayed mathematical text simply has to be typeset in a lovely pink. 19 20 21\subsection{Color Themes} 22 23In order to also show the effect of the different color themes on the sidebar, in the following examples the color themes are used together with the outer theme |sidebar|. 24 25\subsubsection{Default and Special-Purpose Color Themes} 26 27\begin{colorthemeexample}{default} 28 The |default| color theme is very sober. It installs little special colors and even less backgrounds. The default color theme sets up the default parent relations between the different \beamer-colors. 29 30 The main colors set in the |default| color theme are the following: 31 \begin{itemize} 32 \item 33 |normal text| is black on white. 34 \item 35 |alerted text| is red. 36 \item 37 |example text| is a dark green (green with 50\% black). 38 \item 39 |structure| is set to a light version of MidnightBlue (more precisely, 20\% red, 20\% green, and 70\% blue). 40 \end{itemize} 41 Use this theme for a no-nonsense presentation. Since this theme is loaded by default, you cannot ``reload'' it after having loaded another color theme. 42\end{colorthemeexample} 43 44\begin{colorthemeexample}[\oarg{options}]{structure} 45 The example was created using |\usecolortheme[named=SeaGreen]{structure}|. 46 47 This theme offers a convenient way of changing the color used for structural elements. More precisely, it just changes the foreground of the \beamer-color |structure|. You can also achieve this by directly invoking the function |\setbeamercolor|, but this color theme makes things a bit easier. 48 49 The theme offers several \meta{options}, which can be used to specify the color to be used for structural elements: 50 \begin{itemize} 51 \item 52 \declare{|rgb=|\marg{rgb tuple}} sets the |structure| foreground to the specified red-green-blue tuple. The numbers are given as decimals between 0 and 1. For example, |rgb={0.5,0,0}| yields a dark red. 53 \item 54 \declare{|RGB=|\marg{rgb tuple}} does the same as |rgb|, except that the numbers range between 0 and 255. For example, |RGB={128,0,0}| yields a dark red. 55 \item 56 \declare{|cmyk=|\marg{cmyk tuple}} sets the |structure| foreground to the specified cyan-magenta-yellow-black tuple. The numbers are given as decimals between 0 and 1. For example, |cmyk={0,1,1,0.5}| yields a dark red. 57 \item 58 \declare{|cmy=|\marg{cmy tuple}} is similar to |cmyk|, except that the black component is not specified. 59 \item 60 \declare{|hsb=|\marg{hsb tuple}} sets the |structure| foreground to the specified hue-saturation-brightness tuple. The numbers are given as decimals between 0 and 1. For example, |hsb={0,1,.5}| yields a dark red. 61 \item 62 \declare{|named=|\marg{color name}} sets the |structure| foreground to a named color. This color must previously have been defined using the |\DefineNamedColor| command. Adding the class option |xcolor=dvipsnames| or |xcolor=svgnames| will install a long list of standard |dvips| or SVG color names (respectively). See the file |dvipsnam.def| for the list. 63 \end{itemize} 64\end{colorthemeexample} 65 66\begin{colorthemeexample}{sidebartab} 67 This theme changes the colors in a sidebar such that the current entry in a table of contents shown there gets highlighted by showing a different background behind it. 68\end{colorthemeexample} 69 70\subsubsection{Complete Color Themes} 71 72A ``complete'' color theme is a color theme that completely specifies all colors for all parts of a frame. It installs specific colors and does not derive the colors from, say, the |structure| \beamer-color. Complete color themes happen to have names of flying animals. 73 74\begin{colorthemeexample}{albatross} 75 The color theme is a ``dark'' or ``inverted'' theme using yellow on blue as the main colors. The color theme also installs a slightly darker background color for blocks, which is necessary for presentation themes that use shadows, but which (in Till's opinion) is undesirable for all other presentation themes. By using the |lily| color theme together with this theme, the backgrounds for blocks can be removed. 76 77 When using a light-on-dark theme like this one, be aware that there are certain disadvantages: 78 \begin{itemize} 79 \item 80 If the room in which the talk is given has been ``darkened,'' using such a theme makes it more difficult for the audience to take or read notes. 81 \item 82 Since the room becomes darker, the pupil becomes larger, thus making it harder for the eye to focus. This \emph{can} make text harder to read. 83 \item 84 Printing such slides is difficult at best. 85 \end{itemize} 86 87 On the other hand, a light-on-dark presentation often appears to be more ``stylish'' than a plain black-on-white one. 88 89 The following \meta{options} may be given: 90 \begin{itemize} 91 \item 92 \declare{|overlystylish|} installs a background canvas that is, in Till's opinion, way too stylish. But then, it is not his intention to press his taste on other people. When using this option, it is probably a very good idea to also use the |lily| color theme. 93 \end{itemize} 94 95 \example 96 The |overlystylish| option together with the |lily| color theme: \genericthemeexample{colorthemealbatrossstylish} 97\end{colorthemeexample} 98 99\begin{colorthemeexample}{beetle} 100 The main ``theme behind this theme'' is to use white and black text on gray background. The white text is used for special emphasis, the black text for normal text. The ``outer stuff'' like the headline and the footline use, however, a bluish color. To change this color, change the background of |palette primary|. 101 102 Great care must be taken with this theme since both the white/gray and the black/gray contrasts are much lower than with other themes. Make sure that the contrast is high enough for the actual presentation. 103 104 You can change the ``grayish'' background by changing the background of |normal text|. 105\end{colorthemeexample} 106 107\begin{colorthemeexample}{crane} 108 This theme uses the colors of Lufthansa, whose logo is a crane. It is \emph{not} an official theme by that company, however. 109\end{colorthemeexample} 110 111\begin{colorthemeexample}{dove} 112 This theme is nearly a black and white theme and useful for creating presentations that are easy to print on a black-and-white printer. The theme uses grayscale in certain unavoidable cases, but never color. It also changes the font of alerted text to boldface. 113 114 When using this theme, you should consider using the class option |gray|, which ensures that all colors are converted to grayscale. Also consider using the |structurebold| font theme. 115\end{colorthemeexample} 116 117\begin{colorthemeexample}{fly} 118 This theme is the ``consequent'' version of |beetle| and uses white/black/gray throughout. It does not go particularly well with themes that use shadows. 119\end{colorthemeexample} 120 121\begin{colorthemeexample}{monarca} 122 The theme is based on the colors of the Monarch butterfly. 123 124 \themeauthor Max Dohse. 125\end{colorthemeexample} 126 127\begin{colorthemeexample}{seagull} 128 Like the |dove| color theme, this theme is useful for printing on a black-and-white printer. However, it uses different shades of gray extensively, which may or may not look good on a transparency. 129\end{colorthemeexample} 130 131\begin{colorthemeexample}{wolverine} 132 The theme is based on the colors of the University of Michigan's mascot, a wolverine. 133 134 \themeauthor Madhusudan Singh. 135\end{colorthemeexample} 136 137\begin{colorthemeexample}{beaver} 138 The theme is based on the colors of MIT's mascot, a beaver. 139 140 \themeauthor Madhusudan Singh. 141\end{colorthemeexample} 142 143\begin{colorthemeexample}{spruce} 144 The theme is based on the colors of Michigan State University. 145 146 \themeauthor Alan Munn. 147\end{colorthemeexample} 148 149\subsubsection{Inner Color Themes} 150 151Inner color themes only specify the colors of elements used in inner themes. Most noticeably, they specify the colors used for blocks. They can be used together with other (color) themes. If they are used to change the inner colors installed by a presentation theme or another color theme, they should obviously be specified \emph{after} the other theme has been loaded. Inner color themes happen to have flower names. 152 153\begin{colorthemeexample}{lily} 154 This theme is mainly used to \emph{uninstall} any block colors setup by another theme, restoring the colors used in the |default| theme. In particular, using this theme will remove all background colors for blocks. 155\end{colorthemeexample} 156 157\begin{colorthemeexample}{orchid} 158 This theme installs white-on-dark block titles. The background of the title of a normal block is set to the foreground of the structure color, the foreground is set to white. The background of alerted blocks are set to red and of example blocks to green. The body of blocks get a nearly transparent background. 159\end{colorthemeexample} 160 161\begin{colorthemeexample}{rose} 162 This theme installs nearly transparent backgrounds for both block titles and block bodies. This theme is much less ``aggressive'' than the |orchid| theme. The background colors are derived from the foreground of the structure \beamer-color. 163\end{colorthemeexample} 164 165\subsubsection{Outer Color Themes} 166 167An outer color theme changes the palette colors, on which the colors used in the headline, footline, and sidebar are based by default. Outer color themes normally do not change the color of inner elements, except possibly for |titlelike|. They happen to be sea-animal names. 168 169\begin{colorthemeexample}{whale} 170 Installs a white-on-dark palette for the headline, footline, and sidebar. The backgrounds used there are set to shades between the structure \beamer-color and black. The foreground is set to white. 171 172 While this color theme can appear to be aggressive, you should note that a dark bar at the border of a frame will have a somewhat different appearance during a presentation than it has on paper: During a presentation the projection on the wall is usually surrounded by blackness. Thus, a dark bar will not create a contrast as opposed to the way it does on paper. Indeed, using this theme will cause the main part of the frame to be more at the focus of attention. 173 174 The counterpart to the theme with respect to blocks is the |orchid| theme. However, pairing it with the |rose| color theme is also interesting. 175\end{colorthemeexample} 176 177\begin{colorthemeexample}{seahorse} 178 Installs a near-transparent backgrounds for the headline, footline, and sidebar. Using this theme will cause navigational elements to be much less ``dominant'' than when using the |whale| theme (see the discussion on contrast there, though). 179 180 It goes well with the |rose| or the |lily| color theme. Pairing it with the |orchid| overemphasizes blocks (in Till's opinion). 181\end{colorthemeexample} 182 183\begin{colorthemeexample}{dolphin} 184 A color theme somewhere in the middle between the whale and the seahorse. It was graciously donated by Manuel Carro. Like the seahorse, it goes well with the |rose| and the |lily| color theme. 185\end{colorthemeexample} 186 187 188\subsection{Changing the Colors Used for Different Elements of a Presentation} 189 190This section explains how \beamer's color management works. 191 192\subsubsection{Overview of Beamer's Color Management} 193 194In \beamer's philosophy, every element of a presentation can have a different color. Unfortunately, it turned out that simply assigning a single color to every element of a presentation is not such a good idea. First of all, we sometimes want colors of elements to change during a presentation, like the color of the item indicators when they become alerted or inside an example block. Second, some elements naturally have two colors, namely a foreground and a background, but not always. Third, sometimes elements somehow should not have any special color but should simply ``run along'' with the color of their surrounding. Finally, giving a special color to every element makes it very hard to globally change colors (like changing all the different kind-of-blue things into kind-of-red things) and it makes later extensions even harder. 195 196For all these reasons, the color of an element in \beamer\ is a structured object, which we call a \emph{\beamer-color}. Every \beamer-color has two parts: a foreground and a background. Either of these may be ``empty,'' which means that whatever foreground or background was active before should remain active when the color is used. 197 198\beamer-colors can \emph{inherit} from other \beamer-colors and the default themes make extensive use of this feature. For example, there is a \beamer-color called |structure| and all sorts of elements inherit from this color. Thus, if someone changes |structure|, the color of all these elements automatically change accordingly. When a color inherits from another color, it can nevertheless still override only the foreground or the background. 199 200It is also possible to ``inherit'' from another \beamer-color in a more sophisticated way, which is more like \emph{using} the other \beamer-color in an indirect way. You can specify that, say, the background of the title should be a 90\% of the background of normal text and 10\% of the foreground of |structure|. 201 202Inheritance and using of other \beamer-colors is done dynamically. This means that if one of the parent \beamer-colors changes during the presentation, the derived colors automatically also change. 203 204The default color theme, which is always loaded, installs numerous \beamer-colors and inheritance relations between them. These colors are explained throughout this guide. The color used for, say, frametitles is discussed in the section on frametitles, and so on. 205 206\subsubsection{Using Beamer's Colors} 207 208A \beamer-color is not a normal color as defined by the |color| and |xcolor| packages and, accordingly, cannot be used directly as in commands like |\color| or |\colorlet|. Instead, in order to use a \beamer-color, you should first call the command |\usebeamercolor|, which is explained below. This command will setup two (normal) colors called |fg| (for foreground) and |bg| (for, well, guess what). You can then say |\color{fg}| to install the foreground color and |\color{bg}| to install the background color. You can also use the colors |fg| and |bg| in any context in which you normally use a color like, say, |red|. If a \beamer-color does not have a foreground or a background, the colors |fg| or |bg| (or both) remain unchanged. 209 210Inside templates, this command will typically have already been called for you with the option |[fg]|. 211 212\begin{command}{\usebeamercolor\opt{|*|}\oarg{fg or bg}\marg{beamer-color name}} 213 This command (possibly) changes the two colors |fg| and |bg| to the foreground and background color of the \meta{beamer-color name}. If the \beamer-color does not specify a foreground, |fg| is left unchanged; if does not specify a background, |bg| is left unchanged. 214 215 You will often wish to directly use the color |fg| or |bg| after using this command. For this common situation, the optional argument \meta{fg or bg} is useful, which may be either |fg| or |bg|. Giving this option will cause the foreground |fg| or the background |bg| to be immediately installed after they have been setup. Thus, the following command 216 217\begin{verbatim} 218\usebeamercolor[fg]{normal text} 219\end{verbatim} 220 is a shortcut for 221\begin{verbatim} 222\usebeamercolor{normal text} 223\color{fg} 224\end{verbatim} 225 226 If you use the starred version of this command, the \beamer-color |normal text| is used before the command is invoked. This ensures that, barring evil trickery, the colors |fg| and |bg| will be setup independently of whatever colors happened to be in use when the command is invoked. 227 228 This command has special side-effects. First, the (normal) color |parent.bg| is set to the value of |bg| prior to this call. Thus you can access the color that was in use prior to the call of this command via the color |parent.bg|. 229 230 Second, the special color \meta{beamer-color name}|.fg| is \emph{globally} set to the same value as |fg| and \meta{beamer-color name}|.bg| is globally set to the value of |bg|. This allows you to access the foreground or background of a certain \meta{beamer-color name} after another \beamer-color has been used. However, referring to these special global colors should be kept to the unavoidable minimum and should be done as locally as possible since a change of the \beamer-color will not reflect in a change of the colors \meta{beamer-color name}|.fg| and \meta{beamer-color name}|.bg| until the next invocation of |\usebeamercolor|. Also, if the \meta{beamer-color name} does not specify a foreground or a background color, then the values of the special colors are whatever happened to be the foreground or background at the time of the last invocation of |\usebeamercolor|. 231 232 So, try not to get into the habit of writing |\color{structure.fg}| all the time, at least not without a |\usebeamercolor{structure}| close by. 233 234 \example 235\begin{verbatim} 236 This text is {\usebeamercolor[fg]{alerted text} alerted}. The 237 following box uses the fore- and background of frametitles: 238 { 239 \usebeamercolor[fg]{frametitle} 240 \colorbox{bg}{Frame Title} 241 } 242\end{verbatim} 243 244 \articlenote 245 This command has no effect in |article| mode. 246\end{command} 247 248 249\begin{command}{\ifbeamercolorempty\oarg{fg or bg}\marg{beamer-color name}\marg{if undefined}\marg{if defined}} 250 This command can be used to check whether the foreground or background of some \meta{beamer-color name} is non-empty. If the foreground or background of \meta{beamer-color name} is defined, \meta{if defined} will be executed, otherwise the \meta{if undefined} code. 251 252 \example 253\begin{verbatim} 254\ifbeamercolorempty[bg]{frametitle} 255{ % ``Transparent background'' 256 \usebeamercolor[fg]{frametitle} 257 \insertframetitle 258} 259{ % Opaque background 260 \usebeamercolor[fg]{frametitle} 261 \colorbox{bg}{\insertframetitle} 262} 263\end{verbatim} 264\end{command} 265 266\subsubsection{Setting Beamer's Colors} 267 268To set or to change a \beamer-color, you can use the command |\setbeamercolor|. 269 270\begin{command}{\setbeamercolor\opt{|*|}\marg{beamer-color name}\marg{options}} 271 Sets or changes a \beamer-color. The \meta{beamer-color name} should be a reasonably simple text (do not try too much trickery and avoid punctuation symbols), but it may contain spaces. Thus, |normal text| is a valid \meta{beamer-color name} and so is |My Color Number 2|. 272 273 In the most simple case, you just specify a foreground by giving the |fg=| option and, possibly, also a background using the |bg=| option. 274 275 \example |\setbeamercolor{normal text}{fg=black,bg=mylightgrey}| 276 \example |\setbeamercolor{alerted text}{fg=red!80!black}| 277 278 The effect of this command is accumulative, thus the following two commands 279 280\begin{verbatim} 281\setbeamercolor{section in toc}{fg=blue} 282\setbeamercolor{section in toc}{bg=white} 283\end{verbatim} 284 have the same effect as 285\begin{verbatim} 286\setbeamercolor{section in toc}{fg=blue,bg=white} 287\end{verbatim} 288 289 Naturally, a second call with the same kind of \meta{option} set to a different value overrides a previous call. 290 291 The starred version first resets everything, thereby ``switching off'' the accumulative effect. Use this starred version to completely reset the definition of some \beamer-color. 292 293 The following \meta{options} may be given: 294 \begin{itemize} 295 \item 296 \declare{|fg=|\meta{color}} sets the foreground color of \meta{beamer-color name} to the given (normal) \meta{color}. The \meta{color} may also be a color expression like |red!50!black|, see the manual of the \textsc{xcolor} package. If \meta{color} is empty, the \meta{beamer-color name} ``has no special foreground'' and when the color is used, the foreground currently in force should not be changed. 297 298 Specifying a foreground this way will override any inherited foreground color. 299 \item 300 \declare{|bg=|\meta{color}} does the same as the |fg| option, but for the background. 301 \item 302 \declare{|parent=|\meta{parent beamer-color(s)}} specifies that \meta{beamer-color name} should inherit from the specified \meta{parent beamer-color(s)}. Any foreground and/or background color set by the parents will also be used when \meta{beamer-color name} is used. If multiple parents specify a foreground, the last one ``wins''; and likewise for the backgrounds. 303 304 \example 305\begin{verbatim} 306\setbeamercolor{father}{fg=red} 307\setbeamercolor{mother}{bg=green} 308\setbeamercolor{child}{parent={father,mother}} 309\begin{beamercolorbox}{child} 310 Terrible red on green text. 311\end{beamercolorbox} 312 313\setbeamercolor{father}{fg=blue} 314\begin{beamercolorbox}{child} 315 Now terrible blue on green text, since parent was changed. 316\end{beamercolorbox} 317\end{verbatim} 318 319 Note that a change of the foreground or background of a parent changes the corresponding foreground or background of the child (unless it is overruled). 320 321 A \beamer-color can not only have parents, but also grandparents and so on. 322 \item 323 \declare{|use=|\meta{another beamer-color}} is used to make sure that another \beamer-color is setup correctly before the foreground or background color specification are evaluated. 324 325 Suppose you wish the foreground of items to be a mixture of 50\% of the foreground of structural elements and 50\% of the normal foreground color. You could try 326 327\begin{verbatim} 328\setbeamercolor{item}{fg=structure.fg!50!normal text.fg} 329\end{verbatim} 330 331 However, this will not necessarily give the desired result: If the \beamer-color |structure| changes, the (normal) color |structure.fg| is not immediately updated. In order to ensure that the normal color |structure.fg| is correct, use the following: 332 333\begin{verbatim} 334\setbeamercolor{item}{use={structure,normal text},fg=structure.fg!50!normal text.fg} 335\end{verbatim} 336 337 This will guarantee that the colors |structure.fg| and |normal text.fg| are setup correctly when the foreground of |item| is computed. 338 339 To show the difference, consider the following example: 340 341\begin{verbatim} 342\setbeamercolor{grandfather}{fg=red} 343\setbeamercolor{grandmother}{bg=white} 344\setbeamercolor{father}{parent={grandfather,grandmother}} 345\setbeamercolor{mother}{fg=black} 346{ 347 \usebeamercolor{father}\usebeamercolor{mother} 348 %% Defines father.fg and mother.fg globally 349} 350\setbeamercolor{my color A}{fg=father.fg!50!mother.fg} 351\setbeamercolor{my color B}{use={father,mother},fg=father.fg!50!mother.fg} 352 353{\usebeamercolor[fg]{my color A} dark red text} 354{\usebeamercolor[fg]{my color B} also dark red text} 355 356\setbeamercolor{grandfather}{fg=green} 357 358{\usebeamercolor[fg]{my color A} still dark red text} 359{\usebeamercolor[fg]{my color B} now dark green text} 360\end{verbatim} 361 \end{itemize} 362\end{command} 363 364 365\subsection{The Color of Mathematical Text} 366 367By default, mathematical text does not have any special color---it just inherits the ``surrounding'' color. Some people prefer mathematical text to have some special color. Though we do not recommend this (we believe mathematical text should \emph{not} stand out amid the normal text), \beamer\ makes it (reasonably) easy to change the color of mathematical text. Simply change the following colors: 368 369\begin{element}{math text}\no\yes\no 370 This color is the parent of |math text inlined| and |math text displayed|. It is empty by default. See those colors for details. 371\end{element} 372 373\begin{element}{math text inlined}\no\yes\no 374 \colorparents{math text} 375 If the foreground of this color is set, inlined mathematical text is typeset using this color. This is done via some |\everymath| hackery and may not work in all cases. If not, you'll have to try to find a way around the problem. The background is currently ignored. 376\end{element} 377 378\begin{element}{math text displayed}\no\yes\no 379 \colorparents{math text} 380 Like |math text inlined|, only for so-called ``displayed'' mathematical text. This is mathematical text between |\[| and |\]| or between |$$| and |$$| or inside environments like |equation| or |align|. The setup of this color is somewhat fragile, use at your own risk. The background is currently ignored. 381\end{element} 382 383\begin{element}{normal text in math text}\no\yes\no 384 If the foreground of this color is set, normal text inside mathematical text (which is introduced using the |\text| command) will be typeset using this color. The background is currently ignored. 385\end{element} 386 387 388\subsection{The Color Palettes} 389 390When one designs a color theme, one faces the following problem: Suppose we want the colors in the headline to gradually change from black to, say, blue. Whatever is at the very top of the headline should be black, what comes right below it should be dark blue, and at the bottom of the headline things should just be blue. Unfortunately, different outer themes will put different things at the top. One theme might put the author at the top, another theme might put the document title there. This makes it impossible to directly assign one of the three colors ``black'', ``dark blue,'' and ``blue'' to the different elements that are typically rendered in the headline. No matter how we assign them, things will look wrong for certain outer themes. 391 392To circumvent this problem, \beamer\ uses a layer of \emph{palette colors}. Color themes typically only change these palette colors. For example, a color theme might make the \beamer-color |palette primary| blue, make |palette secondary| a dark blue, and make |palette tertiary| black. Outer themes can now setup things such that whatever they show at the top of the headline inherits from |palette primary|, what comes below inherits from |palette secondary|, and whatever is at the bottom inherits from |palette tertiary|. This way, color themes can change the way even complicated outer themes look and they can do so consistently. 393 394Note that the user can still change the color of every element individually, simply by overriding the color(s) of the elements in the headline. In a sense, the palette colors are just a ``suggestion'' how things should be colored by an outer theme. 395 396In detail, the following palette colors are used by outer themes. 397 398\begin{element}{palette primary}\no\yes\no 399 Outer themes (should) base the color of navigational elements and, possibly, also of other elements, on the four palette colors. The ``primary'' palette should be used for the most important navigational elements, which are usually the ones that change most often and hence require the most attention by the audience. The ``secondary'' and ``tertiary'' are less important, the ``quaternary'' one is the least important. 400 401 By default, the palette colors do not have a background and the foreground ranges from |structure.fg| to |black|. 402 403 For the sidebar, there is an extra set of palette colors, see |palette sidebar primary|. 404\end{element} 405 406\begin{element}{palette secondary}\no\yes\no 407 See |palette primary|. 408\end{element} 409 410\begin{element}{palette tertiary}\no\yes\no 411 See |palette primary|. 412\end{element} 413 414\begin{element}{palette quaternary}\no\yes\no 415 See |palette primary|. 416\end{element} 417 418\begin{element}{palette sidebar primary}\no\yes\no 419 Similar to |palette primary|, only outer themes (should) base the colors of elements in the sidebar on the four sidebar palette colors. 420\end{element} 421 422\begin{element}{palette sidebar secondary}\no\yes\no 423 See |palette sidebar primary|. 424\end{element} 425 426\begin{element}{palette sidebar tertiary}\no\yes\no 427 See |palette sidebar primary|. 428\end{element} 429 430\begin{element}{palette sidebar quaternary}\no\yes\no 431 See |palette sidebar primary|. 432\end{element} 433 434 435\subsection{Miscellaneous Colors} 436 437In this section some ``basic'' colors are listed that do not ``belong'' to any special commands. 438 439\begin{element}{normal text}\no\yes\yes 440 The color is used for normal text. At the beginning of the document the foreground color is installed as |\normalcolor|. The background of this color is used by the default background canvas for the background of the presentation, see Section~\ref{section-canvas}. The background is also the default value of the normal color |bg|. 441 442 Since the color is the ``root'' of all other \beamer-colors, both a foreground and a background must be installed. In particular, to get a transparent background canvas, make the background of the \beamer-color |background canvas| empty, not the background of this color. 443 444 The \beamer-font currently is not used. In particular, redefining this font will not have any effect. This is likely to change in the future. 445\end{element} 446 447\begin{element}{example text}\no\yes\yes 448 The color/font is used when text is typeset inside an |example| block. 449\end{element} 450 451\begin{element}{titlelike}\no\yes\yes 452 This color/font is a more specialized form of the |structure| color/font. It is the base for all elements that are ``like titles.'' This includes the frame title and subtitle as well as the document title and subtitle. 453\end{element} 454 455\begin{element}{separation line}\no\yes\no 456 The foreground of this color is used for separating lines. If the foreground is empty, no separation line is drawn. 457\end{element} 458 459\begin{element}{upper separation line head}\no\yes\no 460 \colorparents{separation line} 461 Special case for the uppermost separation line in a headline. 462\end{element} 463 464\begin{element}{middle separation line head}\no\yes\no 465 \colorparents{separation line} 466 Special case for the middle separation line in a headline. 467\end{element} 468 469\begin{element}{lower separation line head}\no\yes\no 470 \colorparents{separation line} 471 Special case for the lower separation line in a headline. 472\end{element} 473 474\begin{element}{upper separation line foot}\no\yes\no 475 \colorparents{separation line} 476 Special case for the uppermost separation line in a footline. 477\end{element} 478 479\begin{element}{middle separation line foot}\no\yes\no 480 \colorparents{separation line} 481 Special case for the middle separation line in a footline. 482\end{element} 483 484\begin{element}{lower separation line foot}\no\yes\no 485 \colorparents{separation line} 486 Special case for the lower separation line in a footline. 487\end{element} 488 489 490\subsection{Transparency Effects} 491\label{section-transparent} 492 493By default, \emph{covered} items are not shown during a presentation. Thus if you write |\uncover<2>{Text.}|, the text is not shown on any but the second slide. On the other slides, the text is not simply printed using the background color -- it is not shown at all. This effect is most useful if your background does not have a uniform color. 494 495Sometimes however, you might prefer that covered items are not completely covered. Rather, you would like them to be shown already in a very dim or shaded way. This allows your audience to get a feeling for what is yet to come, without getting distracted by it. Also, you might wish text that is covered ``once more'' still to be visible to some degree. 496 497Ideally, there would be an option to make covered text ``transparent.'' This would mean that when covered text is shown, it would instead be mixed with the background behind it. Unfortunately, |pgf| does not support real transparency yet. Instead, transparency is created by mixing the color of the object you want to show with the current background color (the color |bg|, which has hopefully been setup such that it is the average color of the background on which the object should be placed). To install this effect, you can use: 498 499\begin{verbatim} 500\setbeamercovered{transparent} 501\end{verbatim} 502 503This command allows you to specify in a quite general way how a covered item should be rendered. You can even specify different ways of rendering the item depending on how long it will take before this item is shown or for how long it has already been covered once more. The transparency effect will automatically apply to all colors, \emph{except} for the colors in images. For images there is a workaround, see the documentation of the \pgfname\ package. 504 505\begin{command}{\setbeamercovered\marg{options}} 506 This command offers several different options, the most important of which is |transparent|. All options are internally mapped to the two options |still covered| and |again covered|. 507 508 In detail, the following \meta{options} may be given: 509 \begin{itemize} 510 \item 511 \declare{|invisible|} is the default and causes covered text to ``completely disappear''. 512 \item 513 \declare{|transparent|}\opt{|=|\meta{opaqueness}} causes covered text to be typeset in a ``transparent'' way. By default, this means that 85\% of the background color is mixed into all colors or that the \meta{opaqueness} of the text is 15\%. You can specify a different \meta{percentage}, where |0| means ``totally transparent'' and |100| means ``totally opaque.'' 514 515 Unfortunately, this value is kind of ``specific'' to every projector. What looks good on your screen need not look good during a presentation. 516 \item 517 \declare{|dynamic|} Makes all covered text quite transparent, but in a dynamic way. The longer it will take till the text is uncovered, the stronger the transparency. 518 \item 519 \declare{|highly dynamic|} Has the same effect as |dynamic|, but the effect is stronger. 520 \item 521 \declare{|still covered=|\meta{not yet list}} specifies how to render covered items that have not yet been uncovered. The \meta{not yet list} should be a list of |\opaqueness| commands, see the description of that command, below. 522 \example 523\begin{verbatim} 524\setbeamercovered{% 525 still covered={\opaqueness<1>{15}\opaqueness<2>{10}\opaqueness<3>{5}\opaqueness<4->{2}}, 526 again covered={\opaqueness<1->{15}}} 527\end{verbatim} 528 529 \item 530 \declare{|again covered=|\meta{once more list}} specifies how to render covered items that have once more been covered, that is, that had been shown before but are now covered again. 531 \end{itemize} 532\end{command} 533 534\begin{command}{\opaqueness\ssarg{overlay specification}\marg{percentage of opaqueness}} 535 The \meta{overlay specification} specifies on which slides covered text should have which \meta{percentage of opaqueness}. Unlike other overlay specifications, this \meta{overlay specification} is a ``relative'' overlay specification. For example, the specification ``3'' here means ``things that will be uncovered three slides ahead,'' respectively ``things that have once more been covered for three slides.'' More precisely, if an item is uncovered for more than one slide and then covered once more, only the ``first moment of uncovering'' is used for the calculation of how long the item has been covered once more. 536 537 An opaqueness of 100 is fully opaque and 0 is fully transparent. Currently, since real transparency is not yet implemented, this command causes all colors to get a mixing of \meta{percentage of opaqueness} of the current |bg|. At some future point this command might result in real transparency. 538 539 The alternate \pgfname\ extension used inside an opaque area is \meta{percentage of opaqueness}|opaque|. In case of nested calls, only the innermost opaqueness specification is used. 540 \example 541\begin{verbatim} 542\setbeamercovered{still covered={\opaqueness<1->{15}},again covered={\opaqueness<1->{15}}} 543\pgfdeclareimage{book}{book} 544\pgfdeclareimage{book.!15opaque}{filenameforbooknearlytransparent} 545\end{verbatim} 546 547 Makes everything that is uncovered in two slides only 15 percent opaque. 548\end{command} 549