# How to change color of menukeys?

I cannot understand how to change the colors of the text in the menus typeset using menukeys. A minimal example (taken from the menukeys manual) follows:

\documentclass[12pt]{article}
\usepackage[T1]{fontenc}
\usepackage{xcolor}
\pagestyle{empty}

\begin{document}
\noindent%
\menu{Alfa > Beta > Gamma} \\
\directory{One / Two / Three} \\
\keys{\cmd + \shift + 4} \\[4ex]
\menu{Alfa > Beta > Gamma} \\[4ex]
\end{document}


(the second \changemenucolor has been added since the first one didn't work; but the \renewmenumacro works like expected). Any hint?

• you should take a look at pages 9 and 10 of the menukeys documentation ftp.rrzn.uni-hannover.de/pub/mirror/tex-archive/macros/latex/… – Rico Sep 24 '13 at 16:08
• Sorry, I don't understand. Yes, I have read the manual; my statement (\changemenucolor) is described at page 11. In pages 9/10 I don't see anything relevant... – Maurizio Loreti Sep 24 '13 at 16:11
• You are using default gray style, so you should use something like \changemenucolor{gray}{txt}{named}{red} – karlkoeller Sep 24 '13 at 16:17
• That indeed solved my problem. Well, just a couple examples would have fit well in the manual... probably that was all my fault, since english is my 3rd language only :( And many many thanks to karlkoeller for the quick and exhaustive reply. – Maurizio Loreti Sep 24 '13 at 16:25
• @Maurizio Don't worry, I'm Italian too, and I know what you mean... – karlkoeller Sep 24 '13 at 16:26

Indeed the menukeys manual could contain a few more examples, but I'm sure that Tobi will do something for it (sooner or later).

Anyway, when you issue the command \changemenucolor you have to refer to a "color theme" as a first argument (see Section 4.3 of the documentation:

\changemenucolor{<theme name>}{<element>}{<model>}{<color definition>}


There are two predefined color themes, gray and blacknwhite. You can even create new ones through the command \newmenucolortheme.

Anyway, unless you change it with \changemenucolortheme, the one used by default is gray, so the command you have to issue is

\changemenucolor{gray}{txt}{named}{red}


Complete MWE:

\documentclass[12pt]{article}
\usepackage[T1]{fontenc}
\usepackage{xcolor}
\pagestyle{empty}

\begin{document}
\noindent%
\menu{Alfa > Beta > Gamma} \\
\directory{One / Two / Three} \\
\keys{\cmd + \shift + 4} \\[4ex]