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

learn more… | top users | synonyms (1)

240
votes
7answers
58k 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?
18
votes
3answers
5k 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} ...
75
votes
1answer
6k 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 ...
33
votes
2answers
13k 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 ...
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 ...
40
votes
4answers
4k 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 ...
12
votes
1answer
1k views

pdftooltip from pdfcomment package: Using LaTeX code in tooltip

I work as a Physics teacher and I am writing a "Problem-Solution-Book" with hyperlinks from problems to solutions and backreferencing -- all of it works pretty good. Now I wanted to introduce ...
16
votes
1answer
3k views

Colored symbols

First of all, I apologize if this is a repetitive question. I searched, but couldn't find it. I was wondering if I can change the color of symbols in latex. For example \ast always give me a black ...
13
votes
1answer
1k views

Listings package: How can I format all numbers?

I want to highlight all the numbers appearing in an input code of a certain program by, for example, coloring them. By numbers I mean integer, rational and floating point numbers. I am trying with the ...
6
votes
1answer
2k views

Rounded corner colored box around figure

I'm trying to get Rounded corner grey-colored box around figures. One solution would be to use \usepackage{float} \floatstyle{boxed} \restylefloat{figure} but this results in black box around a ...
4
votes
1answer
615 views

Adobe Reader and xcolor within a table breaks the line render

I'm using the xcolor package to colour the top row in a table. This is displayed properly using PDF viewers such as Preview or Skim (Mac). But using Adobe Reader 10.1.3 (either Windows or Mac) doesn't ...
51
votes
3answers
11k 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 ...
28
votes
7answers
1k 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 ...
14
votes
3answers
1k views

Can I change the font and colour of a letter permanently?

For my lectures, I like to colour the symbols in the equations to make it easier to follow what's going on - a bit like syntax highlighting. So all vector spaces are one colour, all sets another, e ...
10
votes
1answer
1k views

How can I change the color of digits when using the listings package?

I'm using the listings package and was already able to modify the color of the keywords and almost all elements I was interested in. The only thing that remains is the color of the digits. I'd like to ...
11
votes
4answers
3k views

Inkscape → PDF → includegraphics → XeLaTeX → changed colors

I have an SVG file, which I have made/edited with Inkscape. I want to include this image in my thesis. The svg file is here: http://brussense.be/temp/theSVG.svg (because Inkscape uses a non-standard ...
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} ...
34
votes
2answers
45k 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 ...
15
votes
3answers
2k views

How to draw text-anchored tikz line below text instead of above?

I wish to mark several pairs of from/to anchor locations in text, and use tikz to draw lines between these. The anchors are not in absolute page locations; the text determines where the endpoints of ...
15
votes
2answers
2k views

Colored background in inline listings

I would like to make inline code more distinguishable from the text surrounding it, and I thought that using a background might work (like it is done on the stackexchange pages.) Since I use the ...
5
votes
2answers
373 views

Robust way to mark draft text?

When writing documents, I like to 'mark up' draft/partial text (e.g., short summaries of what will go in a section) so that I can clearly see what needs to be adjusted. I know that things like the ...
6
votes
2answers
394 views

Is it possible to change text color for all headings?

I want to change only the color (not font size, etc.) of all headings in my documents (\section, \subsection, \subsubsection, ...). I want to keep all other settings fixed. Is there a way to do ...
43
votes
3answers
12k 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 ...
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?
28
votes
3answers
9k 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 ...
20
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. ...
20
votes
2answers
962 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 ...
14
votes
2answers
1k views

How do I get different colors for math and for text?

I want to include something in my LaTeX article that will make all mathematical formulae appear in black, while all text (including everything inside \text{}s in the middle of mathematical formulae) ...
11
votes
2answers
7k views

Link formatting: colors, underlines in moderncv

Following the excellent advice in this site, I have started using moderncv for writing the new version of my CV. Unfortunately, after converting to PDF, my http links work (clicking on them leads to ...
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 ...
21
votes
2answers
17k 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 ...
14
votes
1answer
5k views

Coloring columns in a table with colortbl and booktabs

I have created a rather complicated table with some columns that I want to color. For the table, I chose the booktabs and tabularx packages. For coloring the columns, I use colortbl. The problem that ...
20
votes
2answers
5k 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} ...
15
votes
1answer
698 views

Tables: Colouring odd/even mixed up

I have a huge document (around 100 pages) and a lot of tables in it. I used \usepackage[table]{xcolor} \definecolor{lightblue}{rgb}{0.93,0.95,1.0} \rowcolors{1}{white}{lightblue} % odd = white, even ...
13
votes
4answers
3k views

Why can't I wrap \rowcolor in \only? (Beamer)

See the following minimal example: \documentclass[table]{beamer} \begin{document} \begin{frame}{Boo} \begin{table} \centering \small \begin{tabular}{rcc} \only<1>{\rowcolor{green}}Hey & ...
8
votes
4answers
1k views

How can I set the background color of the rows and columns of a matrix node in Tikz?

I have a matrix where some cells have nodes while others don't, with rows and columns of varying size depending on the biggest nodes in them. In this matrix, I would like to have the background of ...
17
votes
1answer
948 views

Is it possible to use spot colors in TikZ graphics?

Using ConTeXt and Metapost, it is fairly easy to define spot colors and use them in an image: \starttext \definecolor[MyRed][c=0,m=1,y=1,k=0] \definespotcolor[RedSpot][MyRed][p=1,e=MyRed] ...
15
votes
2answers
2k views

Coloring digits with the listings package

I'm trying to typeset some python code, and I would like integer literals to be highlighted. I've come up, after about two hours of fighting with the documentation and various other questions here and ...
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, ...
27
votes
1answer
27k 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 ...
29
votes
1answer
22k 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?
16
votes
2answers
930 views

Coloring a black and white PDF graphic

I have a graphic in PDF format (originally converted from an SVG) that is monochromatic (black on white). Is it possible using TikZ or PSTricks but not (Illustrator or Inkscape) to include this image ...
20
votes
5answers
943 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 ...
6
votes
3answers
6k views

Setting background colour for part of a page

I am designing a business card using the memoir class and hints given here and am trying out various background effects. Specifically, I would like to change the background for the last third of the ...
17
votes
3answers
7k views

Can \includegraphics be used to change an image color?

I'm including a number of PDF images in my document using \includegraphics. I'm wondering if there's a way for LaTeX to adjust their color profile, hopefully the same way it can flip images upside ...
18
votes
1answer
210 views

Why does a color meant for the first typeset line *only* (with package magaz) affect the *entire* document?

I am trying to make a nice layout that gives a different style to the first line in a section using the package magaz. All examples I have seen feature some variation of small caps {\scshape text} or ...
16
votes
2answers
1k views

How to get actual values of colour theme colours in beamer?

How would I go about finding the actual colour (like the RGB/HSV/etc) of a particular element in a given beamer colour theme (e.g., block title bg in orchid)? I would like to use these colours in ...
14
votes
2answers
5k views

How to highlight important parts (with a gray background)

In the below link http://www.math.uiowa.edu/~goodman/algebrabook.dir/bookmt.pdf the author highlights anything which is important using a greyish color background. For example, if you see ...
11
votes
1answer
2k views

\cancel draws under thing being canceled

I'm trying to use \cancel from the cancel package to strike out some colored text but it is apparent that the diagonal line is drawn first so it doesn't do a very good job of canceling. Minimal ...
10
votes
2answers
3k views

Color entire table

How do I get an entire table to get a background color. I dont mean the indivual cells but the entire table to get a gray shade. Something like this: