I am trying to setup a colorbox with HTML saying submit. I have tried
[HTML]\colorbox{red}{Submit}[/HTML] and
\colorbox[HTML]{00FF00}{Submit}
and their variations but nothing seems to work. I always get a control sequence error.
Any ideas guys? Thanks in advance.
Graphics, Figures & Tables ⇒ Colorbox with HTML problem
Colorbox with HTML problem
Last edited by exactos on Sun Jul 25, 2010 7:10 pm, edited 1 time in total.
NEW: TikZ book now 40% off at Amazon.com for a short time.
Re: Colorbox with HTML problem
First make sure you’ve loaded an appropriate package, like xcolor, in your preamble:
\usepackage{xcolor}
Next, it should work just to write:
\colorbox{red}{Submit}
I’m not sure what you’re doing with the “HTML” there. Do you mean to use the HTML color model for hexcodes? If so, the following works for me (assuming xcolor is loaded):
\colorbox[HTML]{FF0000}{Submit}
\usepackage{xcolor}
Next, it should work just to write:
\colorbox{red}{Submit}
I’m not sure what you’re doing with the “HTML” there. Do you mean to use the HTML color model for hexcodes? If so, the following works for me (assuming xcolor is loaded):
\colorbox[HTML]{FF0000}{Submit}
Re: Colorbox with HTML problem
Thanks a lot! That was quick. And yes I was trying hexcodes.