# How to use color by number?

I'm trying to use Bettini's QSource Highlight IDE to colorize my python code. Generated LaTeX output is something like:

\noindent
\mbox{}\textcolor{#121b28}{a}\textcolor{#0000de}{=}\textcolor{#0da344}{10}


But I'm getting error:

! Illegal parameter number in definition of \iterate.
1
l.72 }
You meant to type ## instead of #, right?
Or maybe a } was forgotten somewhere earlier, and things
are all screwed up? I'm going to assume that you meant ##.


Examples of xcolor and color package define colors by a different way. I'm looking for a way to be able to use a color by its hexadecimal RGB value ( generated code) in xelatex using beamer.

-

You need to specify the color mode if you want to use it with \textcolor, and remove the #:

## Notes:

• I added an additional {} around the = to get the proper math spacing.

## Code:

\documentclass{article}
\usepackage{xcolor}

\begin{document}
\noindent
\textcolor[HTML]{121b28}{a} \textcolor[HTML]{0000de}{{}={}} \textcolor[HTML]{0da344}{10}
\end{document}

-
Thanks for answer. I'm going to report this bug to QSource Highlight IDE. –  sorush-r Nov 3 '12 at 6:03