Une solution simple est d'ajouter dans votre préambule
\makeatletter
\patchcmd{\@dottedtocline}{\hbox{.}}{\hbox{\textcolor{red}{.}}}{}{}
\ExplSyntaxOn
Pour appliquer cette modification uniquement à liste des théorèmes, vous pouvez appliquer la
méthode de l'ECM suivant:
\documentclass{article}
\usepackage{keytheorems}
\newkeytheoremstyle{mystyle}{
tcolorbox={ colback=blue!10, colframe=blue!75 }
}
\newkeytheorem{theorem}[style=mystyle,]
\begin{document}
\makeatletter
\let\@thmdottedtocline\@dottedtocline
\patchcmd{\@thmdottedtocline}{\hbox{.}}{\hbox{\textcolor{red}{.}}}{}{}
\ExplSyntaxOn
\cs_set_protected:Npn \__keythms_listof_default_tocline:
\keythms_listof_tocline:
{
\@thmdottedtocline{ 1 }{ \l__keythms_listof_indent_dim }
{ \l__keythms_listof_numwidth_dim }
}
\cs_set_eq:NN \keythms_listof_tocline: \__keythms_listof_default_tocline:
\ExplSyntaxOff
\makeatother
\begin{theorem}[foo]Content of the theorem.\end{theorem}
\listofkeytheorems[
title=Liste des théorèmes,
note-code={#1},
format-code=Th.~\numberline{#2}#3
]
\end{document}