# Clash with \usepackage[<options>]{hyperref} and beamer

When I use the following preamble:

\documentclass{beamer}
\mode<presentation>
\usetheme{Berkeley}
\usecolortheme{default}
\usefonttheme{default}
\setbeamertemplate{caption}[numbered]
\usepackage{ragged2e}
\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\usepackage{hyperref}
\hypersetup{citecolor=DeepPink4}
\hypersetup{urlcolor=DarkBlue}
\usepackage{cleveref}
\title[something]{something}
\author{someone}
\date{someday}
\begin{document}
\begin{frame}{}
\titlepage
\end{frame}
\begin{frame}{something}
\justifying
\end{frame}
\end{document}


option clash for package hyperref. \hypersetup


However, when I suppress \usepackage[colorlinks]{hyperref} it works, but without the colour.

Any ideas?

beamer already loads hyperref internally, so you attempt produces a clash. You can pass the options to the class using the hyperref key (there are also pgf, color and xcolor keys to pass options to the corresponding packages):

\documentclass[
xcolor={svgnames},
]{beamer}
\mode<presentation>
\usetheme{Berkeley}

\setbeamertemplate{caption}[numbered]
\usepackage{cleveref}

\title[something]{something}
\author{someone}
\date{someday}

\begin{document}

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

\begin{frame}{something}

• @unmark1: The usual way to say 'Thank you' is to accept the answer by clicking on the checkmark left on the answer post! ;-) – user31729 Aug 24 '16 at 20:11