{color} is about using color in (La)TeX documents. Popular packages are color and xcolor.

learn more… | top users | synonyms (1)

273
votes
7answers
69k views

Remove ugly borders around clickable cross-references and hyperlinks

I know that I can use hyperref to make cross-references and hyperlinks clickable. That makes the clickable areas outlined in fluorescent green, however. How can I make the green boxes go away?
80
votes
1answer
7k views

PDF colour model and LaTeX

(Strictly speaking, this is a question about XeLaTeX and the xcolor package but I’m assuming that the issue is actually with the color model of PDF.) I’m having the problem that colours in my PDF ...
63
votes
2answers
4k views

Is there a way to have coloured hyperref hyperlinks in the PDF, but have them print “as if” they were black?

I like having my hyperref hyperlinks a different colour, so it's obvious that they are links. But when I print a copy of the PDF, I don't want the links to be coloured, because you can't click them, ...
53
votes
3answers
12k views

Block quote with big quotation marks

How can I create a block quote enviroment with big quotation marks similar to the Cquote Template of Wikipedia? Additionally it would be nice to place both quotation marks and quote in a colored box ...
48
votes
1answer
82k views

How to change color for a block of texts?

I am editing a LaTeX paper with Emacs. Sometimes, just for myself, I want to make a block of texts less obvious (or less important to see). Instead of totally hide them, I still want them to be there. ...
47
votes
3answers
14k views

How to create alternating rows in a table?

Sometimes you can see in books tables, that have alternating background color for rows in a table to support readability. How I can achieve this with LaTeX? And yes, I could put macros \odd and \even ...
45
votes
3answers
6k views

Detecting all pages which contain color

In an larger LaTeX document there are often only some pages with color content (mainly figures) and the remaining ones are only black and white. Because printing costs for color pages are much higher ...
44
votes
1answer
2k views

Creating a zebra effect using listings

This question led to a new package: lstlinebgrd (lstaddons bundle) Friends, consider the following example using the listings package: \documentclass{article} \usepackage[T1]{fontenc} ...
40
votes
4answers
5k views

Does anybody know a good source of (free) ornaments, decorations, frames, backgrounds etc.?

I'd like to prepare a "fancy" typographical project, more interesting visually than a "boring" black-on-white text. I'm not very talented at drawing, though, so I'd like to ask about a place to find ...
38
votes
2answers
52k views

color only a cell of a table [duplicate]

Possible Duplicate: Color merged and regular cells in a table individually I tried to color only a cell of my table but I don't know how do it. I found the method to color an entire row.How ...
36
votes
2answers
1k views

Partially coloring cell background to fake histogram

Excel has a cool feature called "data bar" conditional formatting that allows the user to partially fill a cell background to create histograms based on cell contents. Here is a screen clip example ...
36
votes
2answers
15k views

How can I have colored and underlined links with hyperref?

I would like the internal hyperlinks generated by hyperref to be colored and underlined. Reading some of the package documentation, I know that these \hypersetup keys exist: colorlinks: when ...
32
votes
3answers
3k views

Best practice for hyperref link colours?

I'm using the hyperref package with the option colorlinks=true. However, I'm not happy with the default link colours: for instance, citation links appear in a flamboyantly bright green that hurts my ...
31
votes
2answers
873 views

Color all vowels differently in a LaTeX document

Is it possible to give the letters a,e,i,o,u,y a different color in a piece of text? For instance, color all the a's red, the e's blue, the i's green, etc. EDIT: Without doing it manually of course.
31
votes
1answer
33k views

How to color math symbols?

One can use the command such as \textcolor[rgb]{1.00,0.00,0.00}{boundary} to color the word "boundary" in a document. Here is my question: How to color the math symbols in $$? For example, can one ...
30
votes
2answers
859 views

How to color the characters in LaTeX2e logo?

I want to get the LaTeX2e logo but with each character having a different color. I know that \LaTeXe produces the logo, but how do I give a color to each character?
29
votes
3answers
29k views

How to specify a fill color in RGB format in a node in tikzpicture?

I am just trying to get a rounded corner box with some text in it. The text color will be white and the box will be filled with a particular color. The preamble includes: \usepackage{tikz} ...
29
votes
3answers
11k views

How to highlight an entire paragraph?

I'd like to highlight paragraphs such that the highlight color appears as one whole rectangle underlying the entire paragraph. I have looked around but nothing gives me the desired effect so far. For ...
29
votes
1answer
23k views

How do I fill table cells with a background color?

I'd like to fill the cells of a table with a background color. How can this be done?
29
votes
1answer
3k views

When to use the xcolor package instead of the color package?

Can someone explain when to use the xcolor package instead of the color package? Unless you are creating your own specific colors, the differences between the packages seem to be fairly superficial. ...
28
votes
7answers
2k views

How to replace a large block of text by an empty block of the same size?

I know there exists the \phantom command, but does it work on large blocks of text (containing several paragraphs or even several pages)? What I want is to have some commands, call them \hide and ...
28
votes
4answers
15k views

What colors are good to use for graphs and figures in scientific publications that print well in black and white?

This question is not TeX specific. When creating scientific documents with graphs and figures, what colors are good to use such that they help the reader understand the figure but will also print well ...
28
votes
3answers
766 views

Documenting on code revisions

I have made modifications to a few files of a C++ program. I would like to document on these changes in a nice LaTeX report, by showing exactly what I modified and explaining why I did so. Since ...
27
votes
4answers
1k views

How to change color of edge of characters? [duplicate]

Possible Duplicate: Outlined characters There are many ways how to change whole character color. I want edge color to be different from body color of character. How to do it? It is ...
27
votes
4answers
1k views

Coloring combining characters without changing color of a base character

Problem I am trying to find out is there a good way to paint combining characters without changing the color of the base character they are combined with. My actual problem case is to make some ...
26
votes
3answers
2k views

Parametrize shading in table through TikZ

I wanted to do some shading in a table according to its values. For example, if you see the table below: a b c d a 90 10 0 0 b 0 80 10 10 c 0 0 95 5 d 0 10 5 85 I want to ...
26
votes
2answers
9k views

How do I make sure images are CMYK?

I am submitting a paper to a conference in a few days and just noticed they require all images to be in CMYK color space. Is there a quick easy way to check if they are? And if they are not, is ...
25
votes
2answers
2k views

Gradient color in one cell of a table

I'm trying to create a tabular and I'm facing the following small issue. I would like to make the background of one cell a gradient color. Is it easy to do that in LaTeX? And if so, how to do it?
25
votes
2answers
953 views

Using Pantone/spot colors and TikZ together

This question led to a new package: xspotcolor I came to the end of writing book in LaTeX. Thanks to this great community I have succeeded to apply designer's wishes into document and I ...
24
votes
1answer
13k views

options for appearance of links in hyperref

If I use \usepackage[colorlinks]{hyperref} I get colored links for \cite (not good for printing or even viewing) but table of content looks fine. If I use ...
23
votes
1answer
501 views

How can I highlight ligatures?

I'd like to highlight all the ligatures used in a document similar to the image below as an attempt to show off some of TeX's tender loving care for the font being used. Is there a way to do this ...
22
votes
3answers
6k views

How to change the background color only for the current page?

How can I change the background color only for the current page? I found that I can change the color with \pagecolor{color} but that unfortunately changes the color for all pages after this command. ...
22
votes
2answers
19k views

Change the background color of a frame in Beamer

How can I change the background color of one frame in my Beamer document? I tried doing \begin{frame} \setbeamercolor{background canvas}{bg=violet} % frame contents here \end{frame} but it ...
22
votes
2answers
717 views

How to divide document for black and color printing?

Most of my document is black text, but there is a color figure here and there. I would like to print the text on a black and white printer, and the figures on a color printer. I know i could just ...
21
votes
2answers
41k views

How do I color table columns and rows?

I've found question How do I fill table cells with a background color?, but the link to the documentation isn't helping me at all. I'd like to know how to color a table column given my column code, ...
21
votes
5answers
1k views

typesetting different characters with different colors in a DNA sequence

I have created a macro which I used to format DNA sequences, as they should be in the monospaced font and uppercased: \newcommand{\DNA}[1]{\texttt{\uppercase{#1}}} Now I have a column with some ...
21
votes
3answers
875 views

Umlaut dots in a different color

Is there an easy way to do the dots of an o-umlaut in a different color than the o? I've already tried using the textcolor function in the color package, but I suspect that's the wrong way to go. I ...
21
votes
2answers
6k views

Option clash with xcolor and TikZ

I want to draw some coloured circles, so I loaded tikz in my preamble. However, now xcolor is telling me that it has an "option clash". How should I fix this? \documentclass{article} ...
21
votes
2answers
707 views

Change the color of capital letters

Is there a way to define a command that changes the colour of any capital letter in an input string? Most of the results I find when I type "LaTeX string capital" are results about capitalizing the ...
20
votes
4answers
1k views

How to shade text in different colors?

I need a single character in two colors. Figuring I could use the shadings library of TikZ, I followed the manual (section 23.4.1, the TikZ example): \documentclass{article} \usepackage{tikz} ...
20
votes
2answers
16k views

How to change line color in tabular?

How can I change the color of the lines (the frame) in a tabular environment? In the following MWE: \begin{tabular}{c|c|c} a&b&c \\ \hline d&e&f \\ \hline g&h&i \end{tabular} ...
20
votes
2answers
525 views

Colored margin with vertical text

What I'd like to reproduce on LaTeX can be seen on the picture below. I am writing my master thesis (book style) and I'd like to add a colored margin on every page (on the right for the right pages ...
20
votes
3answers
2k views

Option cmyk for xcolor package does not produce a CMYK PDF

I am trying to produce a CMYK PDF file to pass onto a printshop. When I use the [cmyk] option for the xcolor package, the colours in the resulting PDF do look muted and less vibrant as is the case ...
20
votes
1answer
1k views

Pre-defined color cycles à la RColorBrewer?

When I have multiple line plots in pgfplots, the colors of the lines cycle through a few colors (my guess is the colors are blue, red, black and dark khaki) before repeating with different marks. See ...
20
votes
1answer
1k views

How to color just the wave produced by the ulem package

I am using \uwave{Some text here} to put a wave like emphasis under the text. Is it possible to change the color of only the wave and leave the text black?
20
votes
2answers
984 views

How can I put a coloured outline around fraction lines?

I use the contour package to put thick white outlines around labels in graphs, so they remain readable above the grid lines without taking up too much space. Unfortunately, the package is not able to ...
20
votes
3answers
6k views

\includegraphics PDF, color problem

I'm using pdflatex, and use \includegraphics to include content of figures from PDF. PDF are exported from InkScape. \begin{figure} [!h] \centering \includegraphics[height=3cm]{fig/SUSAN.pdf} ...
19
votes
2answers
1k views

Can I alias a color?

I would like to define some colors and then define some aliases to them. For instance, if I define the following color: \definecolor{MyColorA}{rgb}{0.1,0.2,0.3} and then want to define an alias ...
19
votes
1answer
941 views

Caption parbox 6.0 pt too wide

For my listings, I use this caption setup: \usepackage{caption} \DeclareCaptionFont{white}{\color{white}} \DeclareCaptionFormat{listing}{\colorbox{gray}{\parbox{\textwidth}{#1#2#3}}} ...
19
votes
1answer
456 views

Strange disappearing colored rules in beamer

I have received a booktabs bug report of \cmidrules that disappear when coloured rules are used inside beamer (together with colortbl). The problem can be illustrated with the following simple code ...