Okay so I have the command
\newcommand{\hlc}[2][yellow]{{\sethlcolor{#1}\hl{#2}}}
in my preamble (after the inclusion of soul and xcolor packages), and colors that are already defined work perfectly well.
\hlc[pink]{hello}
gives me hello highlighted in pink. However, colour combinations don't output anything for me.
\hlc[cyan!50]{hello}
would output just
hello
without any colour.
I want a command that's completely generic (ie. let's me highlight with any colour combination I want). Is there any nice way to do that? I don't want to repeatedly use the command \setcolor
either. I want to be able to input the colors right in the command.
sethlcolor
does not understand this colour specification and uses named colours only