christiaan pauw wrote:
Hi everybody
dvips knows 68 standard colours (see then at h t t p ://
en.wikibooks.org/wiki/LaTeX/Colors#The_68_standard_colors_known_to_dvips )
that have names. Some of them are quite beautiful. How can I use these named
colours is Lyx - for example to define text colours or the shading colour. I
have tried to insert:
\usepackage[usenames,dvipsnames]{color}
\definecolor{shadecolor}{named}{ProcessBlue}
in the preamble but it doesnt work.
If I export the LyX file to LateX and insert the in the first part of the
latex preamble it does work. Is there something extra that I need to do in
Lyx ?
I don't know, but the answer to your question lies here: Export the LyX
file to LaTeX, then compare it to what does work. I'll guess there's an
issue with the order in which things are loaded. Alternatively, it may
be that LyX is loading the color package before you do. So you may need
to pass the options as document options (which get forwarded to the
packages).
Defning the shadecolor using rgb codes does work: e.g
\definecolor{shadecolor}{rgb}{0.95,0.1,1} for a purplish colour to use in a
shaded box. I suppose one could try to find the rgb codes for all those
nice dvips colours, but using the names would be more elegant and easy to
remember.
Incedently: Can I define the colour of a certain type of text (e.g. section
heading) in the preamble?
If you want the color to appear in LaTeX output, then yes. Use the
titlesec package, or the customization facilities of the koma-script
classes, if you're using them.
Richard