I am trying to change the color of the name of a section in ACM template.

\section{\color{red} My Section}

I have found this solution but it did not work.

It gives the error of Undefined color RED

This is my code:


\renewcommand\footnotetextauthorsaddresses[1]{}% \pagestyle{plain} 


\usepackage{booktabs} % For formal tables


\title{My Title} 




\section{\color{red} My Section}

This is my file. This is an algorithm, called \textsc{exp3}. Numbers like $1,2,3$ are not small caps. 


As you can see in the log file, the error says ! Package xcolor Error: Undefined color RED. while you are using the red one! It's because of changing the case by section macro, therefore you have to prevent this action. The following will fix your issue by preventing uppercase. \lowercase macro also forces latex not to convert to uppercase.


\section{\mycolor My Section}
\section{\lowercase{\color{green}}My Section}

enter image description here

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.