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

learn more… | top users | synonyms (1)

6
votes
0answers
119 views

Does it make sense to convert lightgray into cmyk for more legible printing results? Does this necessitate choosing a (different and) darker colour?

In my document I'm using the colour lightgray which looks nice on screen, but is barely decipherable when printed (with a BW-laser-printer). Using the xcolor pkg: Would it make sense to try and ...
6
votes
1answer
203 views

Shaded multicols II

In extending a previous question, Shaded multicols, how can I put rounded corners on the multicol environment, for the outer 4 corners (ie the corners directly next to the page margins) This question ...
6
votes
2answers
5k views

LaTeX Error: Option clash for package xcolor

I have an option clash between package xcolor and another package, but I don't know which. Here is my MWE \documentclass[10pt]{beamer} \setbeamertemplate{navigation symbols}{} \usepackage{caption} ...
5
votes
3answers
490 views

Is it possible to define a multicolumn environment with a background colour

EDIT: I should have given a MWE based on memoir (which I am using) where the inner and outer margins are initially different. I would like the margins to be the same in that new environment. (Inner ...
15
votes
2answers
5k views

How do I specify color in RGB using \hypersetup in hyperref?

How do I specify color in RGB using \hypersetup in hyperref? I know that this is the right way to do it with color names: \hypersetup{colorlinks,breaklinks, urlcolor=Maroon, ...
13
votes
2answers
1k views

coloring entire row of tabular*

I would like to have the first row of all my tables colored with a certain color (below yellow) but somehow below thing is not working as expected This: \documentclass[a4paper, 12pt]{report} ...
11
votes
4answers
483 views

Colored box around sentences

I want to have a colored box around the text/sentences and its width will be fixed to be 80% of the page width. I tried \fcolorbox but it can't break lines. It is possible to do it with TikZ or is ...
10
votes
2answers
1k views

Options and suggestions for hyperref font?

Background I am interested in finding and implementing a more aesthetically pleasing style for the hyperlinks in my document. I have read through the documentation, but I find both the colored text ...
9
votes
3answers
309 views

How to “bubble in”/color fill an item counter ((A),(B),(C),…) in an enumerated list

I'm trying to make an answer explanation guide for a test where the correct answer is "bubbled in". I've tried using the enumitem package and tikz as shown in this post (Enumerated list with blue ...
8
votes
2answers
5k views

\cellcolor overwrites table lines

I have a table which I want to fill with multiple colors, each cell possibly different from another. Which means, I can't make use of e.g. \columncolor (as in this post). While the table without any ...
7
votes
2answers
554 views

Particular bar plot with pgfplots: bar color = category

I want to create a bar plot using pgfplots. In this plot the bars should be represent categorys. So that one color suggest the category. The categorys are: 0-8 None 9-13 Minimal 14-19 Slightly ...
7
votes
1answer
4k views

Switching color and grayscale mode for \includegraphics

Suppose I have a document that includes a lot of colorful PDFs. Now I'd like to easily switch between "color" version and "greyscale version". I'm aware of \DeclareGraphicsRule, but I think this needs ...
7
votes
1answer
367 views

How does changing colour affect spacing?

In the following example, the space after the red equation is much larger than the space after the black one. \documentclass[12pt]{article} \usepackage{xcolor} \begin{document} \[ a = b \] The quick ...
6
votes
2answers
117 views

Change the color model of an included pdf

Say I have a pdf file foo.pdf that I want to include in my bla.tex document via \includegraphics{foo.pdf}. Say that foo.pdf is a colored document and that I need bla.pdf to be in gray levels. How can ...
6
votes
1answer
3k views

Coloring arrows in \xymatrix

Is there a way to color certain (but not all) arrows using \xymatrix? I wish the following ignorant attempt would work!! \usepackage{xypic,color} \begin{document} \[ \xymatrix { ...
5
votes
4answers
630 views

Color background of chapter headings

I'm trying to change the background color of the chapter headings. I'd like the full top part of the page, including top and right margins to turn gray until the titlerule. Currently they look like ...
5
votes
2answers
5k views

(TikZ or xcolor) lighten color

I am plotting some simple stuff using TikZ like circles and lines. They are colored. I know the color I want to plot with but would like create a new color that is a lighter version of the old. ...
19
votes
1answer
399 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 ...
17
votes
1answer
888 views

Retrieve the color definition in HTML

I need to build a table of this type: STUFF | COLOR | PICTURE | COLOR DEFINITION To retrieve the color definition, I tried to use \extractcolorspecs expecting that the third argument { color-cmd ...
13
votes
1answer
315 views

\everymath and author color

Consider the following example: \documentclass[11pt]{paper} \usepackage[usenames]{color} \definecolor{foo}{rgb}{0.75,0.0,0.0} \everymath{\color{foo}} \title{something} \author{someone} ...
13
votes
3answers
4k views

How to colour multiple paragraphs?

I have a set of commands in my document's preamble that look like this: \newcommand{\nathaniel}[1]{\textcolor{blue}{[#1]}} \newcommand{\anotherAuthor}[1]{\textcolor{darkgreen}{[#1]}} They are to ...
12
votes
1answer
347 views

Tikz patterns and cmyk color model

Consider the following example. \documentclass{standalone} \usepackage[cmyk]{xcolor} \usepackage{tikz} \usetikzlibrary{patterns} \begin{document} \begin{tikzpicture} \tracingall \draw [pattern = ...
12
votes
2answers
3k views

Conflict between color, graphicx and libertine

Compiling the following with pdflatex (TeXLive 2009/Debian on Ubuntu 10.04 "Lucid Lynx") \documentclass{article} \usepackage{ifpdf} \ifpdf \usepackage[T1]{fontenc} \usepackage{libertine} % ...
11
votes
1answer
435 views

What is the difference between \textcolor and \color?

I would like to define a new command to work as an alert command. If I want to alert some part of my text I would simply write \alert{}. But I want the result in red color. What is the best way to ...
11
votes
2answers
244 views

How to color delimiters

I have some special delimiters that I want to add to a glossary, those get hyperlinks and colors etc. However when i want to use those delimiters, using \left, \right and \middle becomes impossible. I ...
10
votes
1answer
109 views

Use \cellcolor in \tabulary

The \cellcolor command from package colortbl doesn't seem to have any effect in a tabulary environment, though it works in tabular. Here is a minimal example: \documentclass[a4paper]{article} ...
10
votes
1answer
922 views

white text on black background in entire table

I am looking for a way have white text on black background in the PDF output of PDFLaTeX applied to a document containing a basic table with dividing lines and some colored links. Using ...
10
votes
3answers
712 views

How can I ensure all teletype/monospaced text is in a certain color?

I'm trying to include some monospaced text, and I'd like it to be in a different color than the normal text. There will be several (read: hundreds) of instances of monospaced text, and I want it all ...
9
votes
2answers
4k views

\hhline adds white line where no line is intended

In a table, containing colored cells, i want to have a \hline dividing only some cells, similar to \cline but compatible with coloring single cells with \cellcolor, which is possible by using \hhline ...
9
votes
2answers
1k views

How to change color of some particular environment for entire document

I want to change color of particular environment in document. For example wherever I found verbatim environment or equation environment appears in my tex file. With some global settings, I want to ...
9
votes
1answer
7k views

How to define macro for colored text?

I know that it is possible to obtain colored text in Latex by including the color package and writing like \textcolor{red}{This is red text} How could I define a macro which would produce text of a ...
9
votes
2answers
9k views

Setting text color in TikZ without changing line color; conflict with double

I have a certain TikZ style that I would like to use over and over again (so I'd like to use it as a scope). Namely, I want the color of the curves to be red, with white borders (to give a "crossing ...
8
votes
2answers
1k views

Avoid addition of spaces when using colorbox in equations

Colorbox adds some spaces when I use it in equations. E.g. in \documentclass[12pt]{article} \usepackage{xcolor} \begin{document} \colorbox{yellow}{${a^2}+b^2=c^2$} ...
8
votes
1answer
2k views

Coloured equation number (without changing colour of reference using hyperref)

I am working on a file where I am using the package hyperref so that the references to equations are linked and coloured. Here is a MWE: \documentclass{article} \usepackage{amsmath} ...
8
votes
2answers
2k views

Background color for fancyvrb

For reasons unclear to me, fancyvrb doesn't have a background option. However, the minted package, which it is based on, has one, which suggests it should not be too difficult to add. The relevant ...
8
votes
3answers
3k views

Highlight environment by setting a gray background color

The title explains everything. I have a theorem with ntheorem and want to highlight it with a gray background color. What would be the easiest way to achieve this?
7
votes
2answers
136 views

Highlighting text through stacked colored underlines

I have sentences in which characters have been "marked" by some people and not by others. I'd like to present the markings simultaneously. Stacked colored underlining (in which a line represents each ...
7
votes
1answer
221 views

How do I evenly fill the background color of a block of elements inside a TikZ matrix?

When I fill each element separately of the blocks that I want to highlight, the PDF output shows very small white spaces in between the backgrounds of the separate matrix elements inside the ...
7
votes
1answer
157 views

MetaPost: Randomly generated number, distinct from previously generated number

Overview Looking to create random page background colours where the same background colour never appears more than once in succession (i.e., red, green, blue, green, blue, red, etc. -- never red, ...
7
votes
2answers
274 views

title of a colored box

In an another post, beamer style text box, I've seen a box that I'm interested in making it. However, I would like to use it in a book, and I would like before the title to write: Definition (or ...
7
votes
1answer
190 views

xcolor and everycr-Problem

I'm trying to insert some \noalign-code in every row of a tabular by using colortbl and \everycr or \CT@everycr. In most cases it works fine, but not if there is a \rowcolors-command (from xcolor) ...
7
votes
1answer
422 views

Transparency with psSurface in pst-solides 3D

I'm trying to draw a graph with pst-solides3D with the option psSurface : The problem is as follows : I want to draw z = +/- (y^2-y^2), which should give a saddle-point graph with the lines x=y and ...
7
votes
1answer
135 views

Are nath and xcolor incompatible?

I have a file that compiles fine. It uses nath and color packages: \documentclass[10pt,a4paper]{article} \usepackage{color} \usepackage{nath} \delimgrowth=1 \begin{document} \begin{equation} A ...
7
votes
2answers
372 views

Isolated coloring of math symbols and boxes in equations

I know that by using a package like xcolor I can use $\color{<color>} <math symbols>$ to typeset math symbols in my preferred color. But how can I isolate the color to specific symbols ...
7
votes
1answer
390 views

Sideways label for table with alternating row colours

I have a multirow column in a longtable with alternating coloured rows. The alternating colour overflows into the multirow. Colouring the first column white wipes out the specialrule but doesn't seem ...
7
votes
3answers
4k views

Best way to create colored text boxes

I am retyping some old exams into LaTeX, and I encountered the page below Now with some clever commands, and whatnot I was able to create something almost identical. Though the spacing is a tad ...
7
votes
1answer
2k views

Color of square cell in array

I would like to have array with square cells and fill cells with colors. There is done implementation of table with square cells by W. Robertson ...
7
votes
3answers
8k views

Colored fancy boxes

I am trying to produce some fancy boxes. I have found the fancybox package that does the boxes I want. What I can't find now is: How do I change their background color? I would also like to make the ...
6
votes
4answers
181 views

How to color only a “tilde” accent on a letter? [duplicate]

I would like to color only a "tilde" on my letters. I read how to do this with Umlauts or other accent, but for my expression it seems different I think. Here is my expression : \widetilde{E}^w So, ...
6
votes
1answer
100 views

Change the background color of line numbers in a lstlisting?

Consider the following code which deals with a lstlisting. \documentclass{article} \usepackage[T1]{fontenc} \usepackage{listings} \usepackage{xcolor} ...