# Beamer: Warsaw style biliography colors

In Beamer, I am using Warsaw style. In bibliography, I use \newblock for different type of entries (author, title, journal, ect.). Where can I learn the colour information about these structures (in which file, at which line)? For instance, when I mention an author's name in text, I want to colour the name with the same colour as it appears in the bibliography.

-
I have found by searching in google that the authorname color is defined by %\definecolor{beamer@blendedblue}{RGB}{0.2,0.2,0.7} hence using \textcolor{beamer@blendedblue}{AuthorName} does the job. But I don't know how can I find where this color set for bibliography. I also don't know the name of the light purple colour which is used for the journal name. –  bkarpuz Jun 29 '13 at 15:56

The relevant information can be found in Section 10.6 Adding a Bibliography of the beamer manual. The relevant colors/templates/fonts you are looking for are

• bibliography entry author

• bibliography entry title

• bibliography entry location

• bibliography entry note

If you want to see the actual definitions governing the bibliography, you can see the file beamerbaselocalstructure.sty. There, one finds, for example:

\def\beamer@newblock{%
\usebeamercolor[fg]{bibliography entry author}%
\usebeamerfont{bibliography entry author}%
\usebeamertemplate{bibliography entry author}%
\def\newblock{%
\usebeamercolor[fg]{bibliography entry title}%
\usebeamerfont{bibliography entry title}%
\usebeamertemplate{bibliography entry title}%
\def\newblock{%
\usebeamercolor[fg]{bibliography entry location}%
\usebeamerfont{bibliography entry location}%
\usebeamertemplate{bibliography entry location}%
\def\newblock{%
\usebeamercolor[fg]{bibliography entry note}%
\usebeamerfont{bibliography entry note}%
\usebeamertemplate{bibliography entry note}}}}%
\leavevmode\setbox\beamer@tempbox=\hbox{}\ht\beamer@tempbox=1.5em\box\beamer@tempbox}


Each theme can redefine these colors/templates/fonts as desired. Most themes use the definitions of the default theme. For example, for the involved colors, one has (in the file beamercolorthemedefault.sty):

\setbeamercolor{bibliography entry author}{use=structure,fg=structure.fg}
\setbeamercolor{bibliography entry title}{use=normal text,fg=normal text.fg}
\setbeamercolor{bibliography entry location}{use=structure,fg=structure.fg!65!bg}
\setbeamercolor{bibliography entry note}{use=structure,fg=structure.fg!65!bg}


Notice that, in order to use these colors, you don't need to know the exact color definitions (model, etc.). If you want to use these attributes, then you can use \usebeamercolor, \usebeamerfont; a little example:

\documentclass{beamer}
\usetheme{Warsaw}

\begin{document}

\begin{frame}
\frametitle{Bibliography colors}
{\usebeamercolor[fg]{bibliography entry author}
\usebeamerfont{bibliography entry author}Author}

{\usebeamercolor[fg]{bibliography entry title}
\usebeamerfont{bibliography entry title}Title}

{\usebeamercolor[fg]{bibliography entry location}
\usebeamerfont{bibliography entry location}Location}

{\usebeamercolor[fg]{bibliography entry note}%
\usebeamerfont{bibliography entry note}Note}

\begin{thebibliography}{Dijkstra, 1982}
\bibitem[Dijkstra, 1982]{Dijkstra1982}
E.~Dijkstra.
\newblock Smoothsort, an alternative for sorting in situ.
\newblock {Science of Computer Programming}, 1(3):223--233, 1982.
\newblock{London}
\end{thebibliography}
\end{frame}

\end{document}


-
I have just figured out that using \newblocks apply the same colours. {\newblock {Author} \newblock {Title} \newblock {Location}} –  bkarpuz Jun 30 '13 at 15:33
Is it possible to get the text in the first (author name) or the second (title) \newblock just by using reference number? –  bkarpuz Jul 1 '13 at 10:10
@bkarpuz it all depends on how you build the bibliography; building it "by hand", using the thebibliography environment, this is not possible. Building it using BibTeX or biblatex this is easy. You can open a fresh new question about this. –  Gonzalo Medina Jul 2 '13 at 15:04