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

learn more… | top users | synonyms (1)

19
votes
2answers
495 views

Pros and cons: pdflatex+gs vs gs+pdflatex

I need to be producing two versions of documents I deal with: colour and grayscale. Of course the real issue are images. I'm not the author of the documents nor the images, I'm only the typesetter. ...
18
votes
5answers
6k views

Color underline a formula

I want to underline different parts of a formula with different colors. What is the best possible option? Soul seems only to provide one color per document.
18
votes
3answers
10k views

beamer: change individual bullet color for pros and cons list

Is there a "nice" way to change the color of individual bullet points? For example imagine a list like this: \begin{itemize} \item A \begin{itemize} \item pro 1 \item con 1 \item pro ...
18
votes
1answer
17k views

Custom beamer blocks for pros and cons?

I want to be able to define custom block environments in Beamer. That is, where for now I use alertblock and exampleblock I would rather use problock and conblock for a pro/con discussion. This just ...
18
votes
1answer
215 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 ...
18
votes
1answer
240 views

Elements that looks different when printed with colours or in BW

Is there the possibility with LaTeX of having some element that change if it is printed with colours or in black and white? I was thinking about the rectangles around links with hyperref that are ...
17
votes
4answers
6k views

How to construct a coloured box with rounded corners

Here is the specs of the box. Color of the bar rule should be: \definecolor{mycolor}{rgb}{0.122, 0.435, 0.698} Radius of the 4 corners of the box: 4pt Thick line = 0.5pt Text should be 6pt ...
17
votes
3answers
2k views

Can I have the \overfullrule rule colored in pdfLaTeX?

I know that I can use \overfullrule=5pt to get overfull lines marked with a black marker. I am using pdfLaTeX. Is there a way I can get this marker or something similar in magenta instead?
17
votes
3answers
9k 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 ...
17
votes
1answer
607 views

Defining a Color using another

I know how to define a color using \definecolor with literals to describe the color. How can I define a color using an already defined color? In other words: How can I make a color accessible under ...
17
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 ...
17
votes
1answer
1k 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 ...
17
votes
1answer
967 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] ...
17
votes
2answers
370 views

If a letter is white on white background, does a printer see it?

In preparation for press printing, I would like to produce a version of a document for printing a glossy varnish layer, where all the text is "missing", but the images and other elements are at the ...
16
votes
2answers
1k 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 ...
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 ...
16
votes
1answer
5k views

Colors and legend in groupplots/barplot

In order to compare three items I use the groupplot command. For each item I have n different criteria to compare. Is it possible to set the color for each criteria itself? Meaning the first bar in ...
16
votes
2answers
6k views

How to use different colors for different \href commands?

I have two different \href{}{} links and I want each to be a different color. In the example below they will both be blue, how can I make each link have a different color? \documentclass{article} ...
16
votes
2answers
2k 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 ...
16
votes
1answer
543 views

Shades of colors

I have defined a new color with \definecolor{MyBlue}{rgb}{0.25,0.5,0.75}. Is it possible to define now "derivatives" of this in term of shades? I would like to use the same color in three different ...
16
votes
2answers
274 views

How to make a longitudinal sine wave shading with pgfplots?

At the moment I use TikZ shadings to show up longitudinal waves in my document like this: The shading is white where the sine is –1 and blue where the sine equals 1. This looks ok, but ...
16
votes
1answer
420 views

Color Blind Friendly Mesh Colormap

I have a plot with a mesh and it uses a lovely colormap, however, I can't find a way to make tikzpicture only use colorblind friendly colors. I'm not colorblind, but I know at least some of the people ...
15
votes
5answers
9k views

How to draw a square of 1cm in LaTeX filled with color?

How to draw a square of 1cm in LaTeX filled with colour? I found mdframed and framebox does this, but there need to write text inside it. I just need to draw a box.
15
votes
2answers
4k views

Why does \color{blue} differ from \color{Blue}?

\documentclass[dvipsnames]{article} \usepackage{xcolor} \begin{document} {\color{Blue}\bf Blue} versus {\color{blue}\bf blue}. \end{document} Why does one of them differ from ...
15
votes
1answer
5k views

Change color in finished pdf file

Suppose I have a finished PDF file, say a figure generated from some software, where the ink is black. I would include it in a document. Suppose I want to include it in a beamer presentation with ...
15
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) ...
15
votes
1answer
408 views

xcolor black isn't black enough

I'm making a poster (using baposter) where I wish to include some microscopy images. To make the fluorescent signals stand out better, I changed the background of that cell to "pitchblack", which I ...
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, ...
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 ...
15
votes
2answers
1k views

Coloring chapters and sections with respect to parts

I am using the book document class and I want to produce a document with several parts, chapters, sections, sections and subsections. I would like to make it easier for the reader by coloring ...
15
votes
1answer
4k views

Option clash for package xcolor

Im doing a report, and having a rather large table in my appendix. And want to emphasize some specific values by coloring some single cells. I'm trying to do it with xcolor. But receiving the error: ...
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 ...
15
votes
2answers
334 views

Is it possible to detect the “current color”? (for example in a pgfplot drawing?)

Is there a code to deduce the current color of a PGF plot to which a node is associated? Better yet, is it possible to get the RGB decomposition as well? ... addplot coordinates{ (0,0) (1,1) } node{ ...
15
votes
2answers
811 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 ...
15
votes
1answer
681 views

XeLaTeX and TikZ - how do I ensure my PDFs are using the CMYK color model?

The place I want to print my document at needs the PDF to be provided in CMYK. The document is mostly text, except for a few graphs and plots which are done in TikZ or pgfplots. As suggested in this ...
14
votes
4answers
865 views

Color the faces of a graph

I want to modify the image (see code below) by shading in the regions formed by the dashed lines that contain a black dot. The goal is to obtain something like How can I shade these regions? ...
14
votes
2answers
6k 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 ...
14
votes
3answers
10k views

Height of colorbox

I'm trying to "highlight" two parts of a sentence by using a \colorbox like so: \colorbox{red}{This is} \colorbox{blue}{a great sentence.} The problem is that in the second part the height colorbox ...
14
votes
2answers
412 views

“Drill holes” using glyphs or TikZ's even odd rule for text

I know how to use TikZ even and odd rule, but what I need is to apply it on a node text. Compare I need the text to be punched out such that when I use the resulting pdf on top of a background, the ...
14
votes
2answers
729 views

Color gradient fill between three corners of a triangle

Updates Update1: Tried to implement solution by Harish Kumar (below) Update2: Added a real example of what I would like to get in the end. I have a feeling I tried to leave to many things out. ...
14
votes
2answers
1k views

Figuring out RGB or HEX color from xcolor

I have defined a color using: \definecolor{canvascolor}{rgb}{0.643,0.690,0.843} Then this is used with this command like canvascolor!75!white from xcolor. This is actually done in the beamer theme ...
14
votes
1answer
198 views

Spotcolor bleeds into the surrounding

This question led to a new package: xspotcolor I have a problem using spotcolor package. When using the package for redefining headers, titles, \emph etc. the color bleeds into the ...
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 ...
14
votes
2answers
381 views

Creating my first command

I want to create a command that will format code in a certain way. In this case I want code to be italic and red. So instead of doing \textcolor{red}{\textit code} I want to make a function, if you ...
14
votes
2answers
9k views

Changing style of alert environment in beamer

I would like to specify a background color in the alert environment. I can, for example, use \setbeamercolor{alerted text}{fg=blue} to change the colour of the alterted text to blue, but this ...
14
votes
1answer
372 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} ...
14
votes
1answer
3k views

Changing color of already printed text

For making a small quiz in class I am working on a presentation in beamer. I want to change the color of statements to red (wrong statement) or green (right statement) but only after my class ...
14
votes
1answer
376 views

Intersection of 5 ellipses

I would like to fill the intersection of each of my 5 ellisses with the same color (black for example). It works very well with two. But with a third or more, I don't know how to "save" the first ...
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 ...