# Why : Error Minted package with rule color?

I have problem about use minted package, my mwe like this :

\documentclass{article}
\usepackage{minted}
\usepackage{xcolor}
\definecolor{Rub}{HTML}{061089}
\begin{document}
\begin{minted}[frame=lines,rulecolor=Rub]{c}
int main() {
printf("hello, world");
return 0;
}
\end{minted}
\end{document}


After i use rulecolor =red and others color, i get like this :

How to solve it ?

• The optional argument is in the wrong place: \begin{minted}[...] – Joseph Wright Nov 2 '14 at 16:55
• @JosephWright Thank for your comment but i replace my question. – Hirwanto Nov 2 '14 at 17:04

You need to put the optional argument in the right place, and slightly oddly the value of rulecolor is apparently a command not a colour name

\documentclass{article}

\usepackage{minted}
\definecolor{red}{rgb}{1,0,0}
\begin{document}

%\tracingall
\begin{minted}[rulecolor=\color{red},frame=lines]{c}
int main() {
printf("hello, world");
return 0;
}
\end{minted}
\end{document}