[Tex/LaTex] How to change the link colour in the table of contents

beamercolorfontstable of contents

I am currently adapting my employer's PowerPoint slides to beamer. I am struggling with the font colour on the table of contents slide.
Unfortunately, the colour does not show on the slide but presumably the link colour. How can I get the colour right?

A working example:

\documentclass{beamer}

\definecolor{new_red}{RGB}{240, 50, 5}
\definecolor{new_gray}{RGB}{85, 85, 85}

\setbeamercolor*{section in toc}{fg=new_gray, bg=white}
\setbeamercolor*{subsection in toc}{fg=new_gray, bg=white}

\setbeamertemplate{section in toc}[sections numbered]

\begin{document}

\begin{frame}
\tableofcontents
\end{frame}

\section{Section}

\begin{frame}
\end{frame}

\subsection{Subsection}

\begin{frame}
\end{frame}

\section{Section}

\begin{frame}
\end{frame}

\subsection{Subsection}

\begin{frame}
\end{frame}

\subsection{Subsection}

\begin{frame}
\end{frame}

\end{document}

In this example it works out as intended: The font colour in the toc is gray. But in the following example it does not.

First the class file:

\ProvidesClass{mybeamer}

% General settings

\PassOptionsToPackage{english}{babel}
\PassOptionsToPackage{table}{xcolor}
\PassOptionsToPackage{bookmarks,colorlinks}{hyperref}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{beamer}}
\ProcessOptions\relax
\LoadClass{beamer}
\RequirePackage[T1]{fontenc}
\RequirePackage{babel}
\RequirePackage{graphicx}
\RequirePackage{tabularx}
\RequirePackage{tikz}
\RequirePackage[scaled]{helvet}

% Colour settings

\definecolor{my_red}{RGB}{240, 50, 5}
\definecolor{my_gray}{RGB}{85, 85, 85}

\setbeamercolor*{alerted text}{fg=my_red, bg=white}
\setbeamercolor*{caption}{fg=my_gray, bg=white}
\setbeamercolor*{caption name}{fg=my_gray, bg=white}
\setbeamercolor*{description item}{fg=my_gray, bg=white}
\setbeamercolor*{footline}{fg=my_gray, bg=white}
\setbeamercolor*{frametitle}{fg=my_red, bg=white}
\setbeamercolor*{item}{fg=my_gray, bg=white}
\setbeamercolor*{normal text}{fg=my_gray, bg=white}
\setbeamercolor*{section in toc}{fg=my_gray, bg=white} % Why don't you work? Link colour must be adapted
\setbeamercolor*{subsection in toc}{fg=my_gray, bg=white} % Why don't you work? Link colour must be adapted
\setbeamercolor*{separation line}{fg=my_gray, bg=white}
\setbeamercolor*{structure}{fg=my_gray, bg=white} % might be redundant to item list et al.
\setbeamercolor*{subitem}{fg=my_gray, bg=white}
\setbeamercolor*{subsubitem}{fg=my_gray, bg=white}
\setbeamercolor*{title}{fg=my_red, bg=white}

% Font settings

\setbeamerfont*{author}{size=\normalsize, series=\bfseries}
\setbeamerfont*{frametitle}{size=\large, series=\bfseries}
\setbeamerfont*{subtitle}{size=\Large, series=\bfseries}
\setbeamerfont*{title}{size=\huge, series=\bfseries}

% Inner theme

\setbeamertemplate{itemize items}[square]
\setbeamertemplate{section in toc}[sections numbered]
\setbeamertemplate{headline}{}
\setbeamertemplate{navigation symbols}{}

% Outer theme

% Title page
\defbeamertemplate*{title page}{my}
{
    \thispagestyle{empty}

    {% Logo
        \begin{tikzpicture}[remember picture,overlay]
        \node[anchor=north west, xshift=0.7cm, yshift=-0.7cm] at (current page.north west)
        {
            \includegraphics[width=0.4\linewidth]{my_Markenzusatz_EN_1C}
        };
        \end{tikzpicture}

        \begin{tikzpicture}[remember picture,overlay]
        \node[anchor=north west, xshift=-3.3cm, yshift=-0.35cm] at (current page.north east)
        {
            \includegraphics[width=0.25\linewidth]{my_Wort_Bildmarke_RGB}
        };
        \end{tikzpicture}
     }

    { % Title
        \usebeamerfont{title}
        \usebeamercolor[fg]{title}

        \begin{tikzpicture}[remember picture,overlay]
        \node[anchor=west, xshift=1cm] at (current page.west)
        {
            \begin{beamercolorbox}{}
                \inserttitle 
            \end{beamercolorbox}
        };
        \end{tikzpicture}
    }

    { % Author
        \usebeamerfont{author}
        \usebeamercolor{normal text}

        \begin{tikzpicture}[remember picture,overlay]
        \node[anchor=west, xshift=1cm, yshift=-2.5cm] at (current page.west)
        {
            \begin{beamercolorbox}{}
                \insertauthor
            \end{beamercolorbox}
        };
        \end{tikzpicture}
    }

    { % Date
        \usebeamerfont{author}
        \usebeamercolor{normal text}

        \begin{tikzpicture}[remember picture,overlay]
        \node[anchor=west, xshift=1cm, yshift=-3.5cm] at (current page.west)
        {
            \begin{beamercolorbox}{}
                \insertdate
            \end{beamercolorbox}
        };
        \end{tikzpicture}
    }
}

% Frame title
\defbeamertemplate*{frametitle}{my}
{
    \usebeamerfont*{frametitle}
    \usebeamercolor[fg]{frametitle}

    \begin{tikzpicture}[remember picture,overlay]
    \node[anchor=north west, xshift=0.7cm, yshift=-0.7cm] at (current page.north west)
    {
        \begin{beamercolorbox}[wd=8cm]{}
            \insertframetitle
        \end{beamercolorbox}
    };
    \end{tikzpicture}

    \begin{tikzpicture}[remember picture, overlay]
    \node[anchor=north west, xshift=-2.75cm, yshift=-0.35cm] at (current page.north east)
    {
        \includegraphics[width=0.2\linewidth, height=\paperheight, keepaspectratio]{my_Wort_Bildmarke_RGB}
    };
    \end{tikzpicture}
}

% Frame title continuations
\defbeamertemplate*{frametitle continuation}{my}{\insertcontinuationcountroman}

% Footer
\newcommand{\my@footline}{\centering \insertframenumber/\inserttotalframenumber}

\defbeamertemplate*{footline}{my}
{
    \begin{beamercolorbox}[leftskip=15pt,rightskip=15pt,ht=2.5ex,dp=1ex]{footline}
    \usebeamerfont{footline}\my@footline\par
    \vspace{2ex}
    \end{beamercolorbox}    
}

Now an example file:

\documentclass{mybeamer}

    \begin{document}

    \begin{frame}
    \tableofcontents
    \end{frame}

    \section{Section}

    \begin{frame}
    \end{frame}

    \subsection{Subsection}

    \begin{frame}
    \end{frame}

    \section{Section}

    \begin{frame}
    \end{frame}

    \subsection{Subsection}

    \begin{frame}
    \end{frame}

    \subsection{Subsection}

    \begin{frame}
    \end{frame}

    \end{document}

Best Answer

I have commented the line

\PassOptionsToPackage{bookmarks,colorlinks}{hyperref}

for now. Then it works. Probably, I am going to run into problems at the url front. But that's for another battle.