27

Is there a "nice" way to change the color of individual bullet points? For example imagine a list like this:

\begin{itemize}
  \item A
  \begin{itemize}
    \item pro 1
    \item con 1
    \item pro 2
  \end{itemize}
  \item B
  \begin{itemize}
    \item pro 3
    \item con 2
    \item con 3
  \end{itemize}
\end{itemize}

How can I make pro bullets green and cons bullets red?

BTW.: I use the circle innertheme

3

3 Answers 3

30

Here's a more beamer way to do things.

The idea is to make an "action" environment that changes the bullet colour.

\documentclass{beamer}
\useinnertheme{circles}
\newenvironment{proenv}{\only{\setbeamercolor{local structure}{fg=green}}}{}
\newenvironment{conenv}{\only{\setbeamercolor{local structure}{fg=red}}}{}
\begin{document} 

\begin{frame}
  \frametitle{Some pros and cons}
    \begin{itemize}
      \item<pro@1-> A pro item
      \item<con@1-> A con item
      \item A neutral  item
    \end{itemize}
\end{frame}

\end{document}

The syntax of adding the action requires you to specify the slide range that the action will apply to; you should set this to 1- (which means slide 1 and all further slides) otherwise the colour will change back to the default colour theme if you are uncovering any parts of the slide.

output of code

4
  • Why is it impossible to get colored items if you add \setbeamercolor{item}{fg=blue} in the beginning of the document? Is there a way to avoid it to override everything?
    – s__C
    Apr 23, 2014 at 14:57
  • @s__C I'm not quite sure the reason, but as a fix you can replace local structure with item in my code and things will work as advertised.
    – Alan Munn
    Apr 23, 2014 at 15:23
  • Just one thing remaining : why is it also coloring all items that are one level below (encapsulated itemize)?
    – s__C
    Apr 23, 2014 at 15:31
  • @s__C Because that semantically makes sense? :) But I'm not sure how the inheritance structure works in Beamer, so I don't have a quick answer to that, nor much time to investigate.
    – Alan Munn
    Apr 23, 2014 at 15:54
10

You can define new commands based on \item and use its optional argument to obtain colored bullets; I don't know if this is "nice", though:

\documentclass{beamer}

\newcommand*\MyPitem{%
  \item[\color{green}\scalebox{0.9}{\textbullet}]}
\newcommand*\MyCitem{%
  \item[\color{red}\scalebox{0.9}{\textbullet}]}

\begin{document}

\begin{frame}
\begin{itemize}
  \item A
  \begin{itemize}
    \MyPitem pro 1
    \MyCitem con 1
    \MyPitem pro 2
  \end{itemize}
  \item B
  \begin{itemize}
    \MyPitem pro 3
    \MyCitem con 2
    \MyCitem con 3
  \end{itemize}
\end{itemize}
\end{frame}

\end{document}

4
  • 1
    True, but this is more a duplicate of How to define a list with custom symbols?. See my comments under the question. Mar 27, 2011 at 9:37
  • @Martin Scharrer: yes, I didn't read the question you linked; should I delete my answer? Mar 27, 2011 at 12:48
  • 2
    No, it not really necessary. Your example includes the textbullets which some people might want. Mar 27, 2011 at 12:54
  • 1
    This answer is extremely useful in case you need to adjust symbol and color. Thanks. Feb 17, 2013 at 10:41
9

I was with the same problem. But I figured it out you could use the "\bullet" command and change its color:

\begin{itemize}
  \item[\textcolor{green}{$\bullet$}] Pro:
  \item[\textcolor{red}{$\bullet$}] Con:
  \item[\textcolor{blue}{$\bullet$}] Neutral:
\end{itemize}

Result:

enter image description here

If you want to create a new command with this \textcolor{blue}{$\bullet$} it would be even better.

You must log in to answer this question.