Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.
<to be read again>
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.

share|improve this question
add comment

1 Answer

up vote 4 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

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}
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
add comment

Your Answer

 
discard

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.