TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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


But I'm getting error:

! Illegal parameter number in definition of \iterate.
<to be read again>
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.

share|improve this question
up vote 5 down vote accepted

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

enter image description here


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



\textcolor[HTML]{121b28}{a} \textcolor[HTML]{0000de}{{}={}} \textcolor[HTML]{0da344}{10}
share|improve this answer
Thanks for answer. I'm going to report this bug to QSource Highlight IDE. – sorush-r Nov 3 '12 at 6:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.