GeneralDefining color font for the whole document

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
nunolf
Posts: 14
Joined: Wed Jul 18, 2007 1:41 pm

Defining color font for the whole document

Post by nunolf »

Hi guys

I want to produce a document (book) using a text font color different from black (I think is the default value), to say 90% gray.

Of course this is easily doable under latex! Can you guys point me to a good package for managing the colors? I read something about the color package, but got the idea that it was more suited to change the color of some sentences, not the overall text color.

Thanks,
N.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Defining color font for the whole document

Post by localghost »

What about the xcolor package? Should be something like the \textcolor command. Just search the documentation for this.
nunolf
Posts: 14
Joined: Wed Jul 18, 2007 1:41 pm

Defining color font for the whole document

Post by nunolf »

Great!
xcolor seems to manage colors better than color.

And answering my question, it's trivial :oops:
Just have to define the color, and b4 starting the real stuff, call the new color.
Just for the record:

Code: Select all

\documentclass[11pt,pdftex]{book}
\usepackage{xcolor}
\definecolor{bookColor}{cmyk}{0	, 0  , 0   , 0.90}  % 0.90\% of black
\color{bookColor}
\begin{document}
...
Cheers,
N.
Post Reply