0

I am in the beamer class, and using tikz. I want to use a color from the xcolor package, but am not able to get it working. Here is my preamble.

\documentclass[usenames, dvipsnames]{beamer}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{libertine}
%\usepackage[font={small}, labelfont=bf]{caption}
%\usepackage{subcaption}


\usetheme{Cuerna}

%\usepackage{amsmath,commath,amssymb,amsthm,blkarray}
%\usepackage{bbm}
%\usepackage{mathtools}
%\usepackage{booktabs}
%\usepackage{array}


%\usepackage{siunitx}
%\newcommand{\imp}[1]{\textbf{#1}}
%\renewcommand{\vv}[1]{\mathbf{#1}}
%\DeclareMathOperator{\inff}{inf \;}
%\DeclareMathOperator{\supp}{sup \;}
\usepackage{tikz}
\usepackage{pgfplots}
%\usepackage{physics}
\addtobeamertemplate{navigation symbols}{}{%
\usebeamerfont{footline}%
\usebeamercolor[fg]{footline}%
\hspace{1em}%
\insertframenumber/\inserttotalframenumber
}

\setbeamercolor{itemize item}{fg=midnightblue}
\setbeamertemplate{itemize items}{\begin{tikzpicture}
\shade[ball color=midnightblue!50!white, preaction={fill=black,
opacity=.25,transform canvas={xshift=1mm,yshift=-1mm, yscale=0.5}}] (0,0)      circle (0.6ex);
\end{tikzpicture}}
\title{Project}
\author{Name}
\begin{document}

\begin{frame}
 \titlepage
\end{frame}

\section{Introduction}
\begin{frame}
\begin{itemize}
    \item something random
\end{itemize}
\end{frame}
\end{document}

I have seen similar questions, but none of the suggestions have worked, such as loading in the package xcolor explicitly, or changing the order of when it is loaded.

  • 3
    Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – samcarter_is_at_topanswers.xyz Nov 12 '18 at 23:39
  • 2
    Maybe you are looking for \documentclass[xcolor={usenames, dvipsnames}]{beamer}? but difficult to test without compilable code... – samcarter_is_at_topanswers.xyz Nov 12 '18 at 23:40
  • The dvips color is MidnightBlue, not midnightblue. Also the usenames option is obsolete: it's been the default for quite a few years; – Bernard Nov 12 '18 at 23:48
2
  • if you want to pass options to the xcolor package, use xcolor={usenames, dvipsnames}

  • the name of the colour is MidnightBlue not midnightblue

  • there is a missing } at the end of \addtobeamertemplate{navigation symbols}{}{}% (in its current form this command does nothing...)

  • \renewcommand{\vv}[1]{\mathbf{#1}} won't work because vv is not defined previously


\documentclass[xcolor={usenames, dvipsnames}]{beamer}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{libertine}
\usepackage[font={small}, labelfont=bf]{caption}
\usepackage{subcaption}


\usetheme{Cuerna}

\usepackage{amsmath,commath,amssymb,amsthm,blkarray}
\usepackage{bbm}
\usepackage{mathtools}
\usepackage{booktabs}
\usepackage{array}


\usepackage{siunitx}
\newcommand{\imp}[1]{\textbf{#1}}
\newcommand{\vv}[1]{\mathbf{#1}}
\DeclareMathOperator{\inff}{inf \;}
\DeclareMathOperator{\supp}{sup \;}
\usepackage{tikz}
\usepackage{pgfplots}
\usepackage{physics}
\addtobeamertemplate{navigation symbols}{}{}%

\setbeamercolor{itemize item}{fg=MidnightBlue}
\setbeamertemplate{itemize items}{\begin{tikzpicture}
\shade[ball color=MidnightBlue!50!white, preaction={fill=black,
opacity=.25,transform canvas={xshift=1mm,yshift=-1mm, yscale=0.5}}] (0,0)      circle (0.6ex);
\end{tikzpicture}
}

\begin{document}

\begin{frame}
content...

\begin{itemize}
\item test
\end{itemize}
\end{frame}


\end{document}
  • awesome thank you. What a dumb mistake haha. Anyways, thanks again – Jimmy TwoCents Nov 12 '18 at 23:49
  • I also have the esvect package downloaded (where \vv is from), but I didnt include it here, because it wasnt really necessary, but thank you – Jimmy TwoCents Nov 12 '18 at 23:51
  • This is also one of those occasions where the colour of the shaded ball shifts from CMYK to RGB (if the OP cares). – David Purton Nov 12 '18 at 23:56
  • @DavidPurton Oh, right! Do you want to write a comment or answer yourself? – samcarter_is_at_topanswers.xyz Nov 13 '18 at 0:02
  • Nah. In this case the risk of the colour shift being noticed is minimal. It will make it more confusing to make it part of the answer. Leave it as the comment. In the end it's always going to be a problem whenever someone uses dvipsnames which are defined in CMYK. And I notice people prefer dvipsnames to svgnames or x11names which are defined in RGB for some reason. – David Purton Nov 13 '18 at 0:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.