# Change the colors used in pgf-umlcd

Is it possible to change the colors used in the pgf-umlcd package used to model UML class diagrams? The default yields a yellow background and a red border. However I'd like to use black and white diagrams (bg=white, border=black). It is probably possible by changing the tikz-settings, but I'm not familiar with that.

Example code:

\documentclass{article}
\usepackage{pgf-umlcd}
\begin{document}
\begin{tikzpicture}

\begin{class}{MyClass}{0, 0}
\operation{myMethod(arg : ArgClass)}
\end{class}

\end{tikzpicture}
\end{document}

• Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. May 30, 2015 at 11:06

I found the answer by looking at the source-code at CTAN.

Change the text color:

\renewcommand{\umltextcolor}{black}


Change the border color:

\renewcommand{\umldrawcolor}{black}


Change the background color:

\renewcommand{\umlfillcolor}{white}

• These settings are now added to the manual of pgp-umlcd. Jun 1, 2015 at 8:28