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

learn more… | top users | synonyms (1)

15
votes
1answer
2k views

coloring every other row of a table, with vertical lines

I am making a table that needs every other row colored. I thought to use this. \usepackage[table,svgnames]{xcolor} \rowcolors{1}{white}{gray!15} But my table has vertical bars ...
5
votes
2answers
883 views

fontspec \setmainfont over-rides href color

I'm happy with the way fontspec is working for me, but have one problem. I have the command: \setmainfont[Color=393939]{URW Palladio L} which colors all the text in my document. I have darker greys ...
8
votes
2answers
3k views

Undefined color error, if have symbol in Chapter Title

I am getting an Package xcolor Error: Undefined color 'RED' if I use a red symbol in the Chapter title. In the MWE below, commenting the last \chapter results in an error. There seems to be no ...
48
votes
2answers
57k 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 ...
10
votes
1answer
1k views

Using patterns inside pgf shapes

Is it possible to (correctly) use patterns inside a pgf shape definition ? For example, I try to define a shape as a rectangle filled with a pattern, like this \usetikzlibrary{patterns} ...
4
votes
2answers
1k views

How to convert external graphics automatically to black&white

For the last ten week me and 9 other students have worked on a report. And the final version of the report needs to be printed in black&white (so no color). The easiest method is use the grey ...
5
votes
3answers
7k views

Coloring a multirow

i have currently this code in LaTeX \begin{footnotesize} \begin{center} \begin{longtable}[c]{ll} \caption[API da listagem de um docente]{API da listagem de um docente.} \label{relStruct}\\ ...
5
votes
1answer
678 views

How to put fixed-height shading around text (inline)?

I have a chunk of code in an alltt environment and I want to highlight elements that are auto-generated (two colours for different methods): \newcommand{\gen}[1]{\colorbox{DGray}{#1}} ...
2
votes
2answers
573 views

How do I draw a white border on a black page ?

I use \pagecolor{black} \color{white} to create a document with white text on black background. I draw a border around the page using \pgfpagesdeclarelayout{boxed} { ...
4
votes
2answers
4k views

stripe pattern tikz manual chapter 78

Interleaving two colors in a stripes pattern Aim: coloring a shape (rectangle, circle, etc.) in two interleaving colors with the aid of patterns. One solution would be the definition of four ...
17
votes
2answers
19k 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 ...
4
votes
1answer
1k views

how to decrease the space between the \toprule and the \rowcolor

I have a table \begin{tabular}{ccc}\toprule ~&Jun-10&Jul-10\\\hline Energy&19\%&7\% \\ LiveStock&2\%&-7\% \\ \toprule ...
6
votes
2answers
2k views

How to access toc entries with titletoc

I'm bit lost with the content of titletoc.sty. I'd like to access toc entries, meaning chapter title, section title and so on to put them in a colorbox. I think it is somewhere in the ...
30
votes
2answers
1k 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?
13
votes
2answers
3k views

Optimising TikZ pictures for greyscale printing

I often use colours in my TikZ pictures. Are there simple ways to make versions of these that will come out looking good if I print them on a B&W printer? For example, say I have some filled ...
14
votes
1answer
10k views

Change text background within paragraph (with automatic linebreaks)

How do I change the text color as well as the text background color for e.g. a sentence within a paragraph? I know \textcolor for coloring the font and \colorbox for background coloring ...
3
votes
1answer
3k views

Using Beamer, condensed outertheme with proper colors

I am condensing a few of my talks in Beamer. The theme I like creates an enormous header when I have many sections \usetheme{Malmoe} \usecolortheme[named=Brown]{structure} I like the ...
6
votes
1answer
3k views

Why aren't my included graphics properly colored?

When I include graphics in my document, the colors are always converted to grayscale, which is very unfortunate as I depend on the colors in the images. I use LaTeX => PS => PDF for creating my ...
16
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 ...
7
votes
2answers
1k views

How to define a random number with xcolor and tikz/pgf

I tried to get a random color with xcolor and tikz: \documentclass{article} \usepackage[xetex, rgb]{xcolor} \usepackage{tikz} \begin{document} \pgfmathsetseed{1} \begin{tikzpicture} ...
50
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} ...
3
votes
1answer
809 views

Underlining a coloured DNA sequence

In the posts to the question of Timtico (here) several ways have been proposed to colour the As,Ts,Cs and Gs differently within a DNA sequence. What I want is also to be able to underline some ...
9
votes
1answer
3k 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
2answers
2k views

How to draw the border of a node using late options

I want to create a series of rectangles, each with a different shade. The shade varies from white to black. I want to make the white (first) rectangle visible by drawing its border. My first step is ...
2
votes
1answer
201 views

Colorization and kerning problem with inline lists

The problem is as follows: I need to set an inline list with colored lowercase letters surrounded by black brackets. This is not so hard to achieve, but the problem is that kerning is lost in the ...
8
votes
1answer
1k views

Add colors that depend on chapters to the TOC

I'would like to add different colors in my TOC, depending on the chapter. I've a color for the header, section subsection of each chapter (red chapter one, blue chapter two etc...). With this code I ...
2
votes
1answer
411 views

How do I make the text in the following figure white and center the figure?

How do I make the text in the following figure white and center the figure? %% LyX 1.6.9 created this file. For more info, see http://www.lyx.org/. %% Do not edit unless you really know what you ...
16
votes
4answers
4k 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 & ...
5
votes
1answer
1k views

Page border coloured

How to create a coloured page border for a document using KOMA-Script scrbook class? Something like this: (image taken from the memoir tutorial)
3
votes
2answers
433 views

color package and float package collision

I'm writing a document and I wanted to colour some text parts. In the preamble I call float package and many others and it worked properly. until I called color package. Then LaTeX return errors at ...
14
votes
2answers
5k views

Use CSS-style color specifications in xcolor?

I have colors on my website #eff5f9 and #dfecf7. I would like to also use them in a latex document. Is there a way to use such hexadecimal specifications with xcolor? I've tried to read the xcolor ...
7
votes
3answers
3k views

Add colour to margin notes

I'm using LyX with XeTeX and the KOMA-script article class. I'm trying secsty and fontspec for the first time. I'm trying to do a unique layout with large outer margins. On some pages I will put key ...
19
votes
1answer
1k 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] ...
10
votes
4answers
3k views

How to color a region?

The following code \documentclass{article} \usepackage{tikz} \usetikzlibrary{intersections,positioning} \begin{document} \begin{tikzpicture}[radius=5] \draw (0,0) rectangle (5,5); \draw[name ...
73
votes
2answers
142k 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. ...
61
votes
3answers
16k 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 ...
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 ...
5
votes
2answers
229 views

Colored sub and super-scripts are misaligned

The title basically describes the problem. Here is a minimal example: \documentclass{article} \usepackage{xcolor} \begin{document} $$X_{\color{red}{135}}^{\color{cyan}{345}}$$ \end{document} ...
2
votes
0answers
527 views

Recommendations for color palettes [closed]

To make my thesis look more consistent I would like to use a single color palette. I want to use it to prepare all drawings, charts etc. However, I could not find any resources with reasonable ...
23
votes
3answers
8k 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} ...
11
votes
1answer
4k views

How to draw a double-color line with tikz

I would like to draw a rectangle with a double color border: the border should be a line dashed with two alternating colors (blue and red, for example). Is it possible?
2
votes
1answer
3k views

Background color in Verbatim

I've to use the yellow background for data values in the following code. \usepackage \begin{Verbatim}[commandchars=\\\{\}] \color{blue}DATA \color{black}Heart; \color{blue}INPUT \color{black}X Y @@; ...
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 ...
12
votes
2answers
2k 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 ...
3
votes
3answers
501 views

Incompatibility between the `footnote` and `xcolor` packages

The following code fails to build: \documentclass{book} \usepackage{footnote} \usepackage{xcolor} \begin{document} \chapter{My first chapter} \parbox{110mm}{ Here is a footnote\footnote{The ...
2
votes
2answers
2k views

Draw a rectangle

How to draw a highlighted box around a bulleted item.
7
votes
1answer
509 views

Problems with multi-page \lstlistings and \footnotes with the liuthesis document class

Using the liuthesis document class described at http://www.control.isy.liu.se/student/exjobb/liuthesis/liuthesis.html (download link: ...
7
votes
3answers
2k views

amsthm environment and colorbox

I'd like to customize the amsthm command a little bit but I cannot find the relevant lines in the (undocumented?) .sty. How can I put a colorbox on the name of the environment ...
8
votes
6answers
3k views

Set \strut height

I'm using quite a few \colorbox and \colorfbox in a document but they weren't sitting at the same heights (because some words contained g and this seemed to push the box down. The solution I found ...
2
votes
1answer
873 views

Two color line in gnuplot

Is there any way to plot a line graph where each series is plotted with two alternating colors? For example, say I was plotting the population of bees over time and I wanted the line to alternate ...