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

learn more… | top users | synonyms (1)

1
vote
0answers
118 views

Why are my hyper references pink?

I have this in the heading of my document: \usepackage[unicode=true, colorlinks=true, linkcolor=blue]{hyperref} Yet the links look like this: Why the pink color ...
3
votes
1answer
161 views

Accessing colors defined by a beamer color theme for a standalone tikzpicture

This is a follow-up to this question. I use the standalone documentclass to externalize my tikzpictures. Now, I want to include it in a beamer presentation with its color theme set to, say, default. ...
3
votes
1answer
99 views

Changing the color of steps in the “cuisine” package

If you've used the cuisine package before, you will know that \newstep or \ing will lead to a step number being generated. In much the same way as the equation label in the equation environment, these ...
0
votes
0answers
14 views

Latex Table Border gets bleached to grey with cell coloring [duplicate]

I have a table here that makes use of multirow/colums. I want to colorize each second entry block grey, unfortunately the middle line in one block which is perfectly ok with white background starts to ...
3
votes
1answer
68 views

grayed box for enumerate

I am using a lyx article template . I want to put my all enumerate items in grayed box . How can I define the enumerate environment in preamble so that all my enumerated lists appear in a grey boxes. ...
2
votes
1answer
83 views

Changing colors over multiple sections and pages

I would like to mark up a whole section (including all subsections and footnotes, spanning multiple pages) as proposed for deletion -- ideally, with color and strikethrough, but just one of the two ...
2
votes
0answers
116 views

Background colour of LaTeX template

How to change the background colour of LaTeX file template? Not the output file. I have a white background and white font. So I am not able to see the text I am typing.
6
votes
2answers
132 views

LaTeX referencing colorful numbering

I have some silly questions on LaTeX use: In an article, how do I get colorful references like in the figure below? How do I reduce the built-in reference font size given below? How do I write ...
11
votes
4answers
484 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 ...
7
votes
1answer
89 views

dotted or colored arc in \xymatrix

Does not arrows style or color option apply an arc in \xymatrix? Please let me know the way. \documentclass{article} \usepackage[arrow, matrix]{xy} \begin{document} \[ \xymatrix{ A ...
8
votes
3answers
267 views

How to use a large number of arbitrary rgb colors in a TikZ image?

I have a document with some TikZ images in it, which are automatically generated from a program I have written. All images are fairly similar, and each of them contains of a large number of squares ...
5
votes
1answer
195 views

How to change the color scheme to make this figure more elegant?

Here different colors means different weight of the edge, and the color of the points is arbitrary. The tex code: \documentclass[aps,prl,superscriptaddress]{revtex4} \usepackage{subfigure} ...
7
votes
1answer
93 views

Color bleeding when using \vsplit for a box with colored text

I want to \vsplit a box with quite arbitrary content. If the content does some color changes, strange things happen. The following MWE demonstrates the problem. The example text changes font and ...
14
votes
1answer
441 views

Color gradient filling along a path

I want to make the gradient color to follow the pipe curve below rather than to span from the left to the right. The following MWE shows the default behavior which is not what I'm looking for. ...
2
votes
1answer
41 views

colored scratched out entries in a Table

I have a weird problem: If I put a scratched out entry (using package ulem) in a table everything ist fine. But if I color that entry it slips down a little bit. Does anyone know why? Here an ...
4
votes
1answer
82 views

how can I make an fbox like command with certain color, shape and width of border?

I am using a style file that has a certain color for section headers. I want to create a macro, which will behave the same like fbox, only: There will be some (predefined) padding below, above, ...
0
votes
1answer
986 views

Incompatible color definition when using tikz with color package

I am using the tikz package to draw some diagrams. In addition, I need the color package for some highlighting. As the wikibooks page of the color package states, it has to be used before the tikz ...
1
vote
0answers
116 views

\rowcolors causes missing vertical lines [duplicate]

When using \rowcolors to alternate row coloring, some vertical lines are missing in the restulting table. \documentclass{scrreprt} \usepackage[table]{xcolor} \begin{document} \begin{table} ...
2
votes
1answer
166 views

Colour gradient filling in PSTricks figure

Consider the following drawing: \documentclass[ a4paper, 12pt ]{article} \usepackage[utf8]{inputenc} \usepackage[ hmargin=2.4cm, vmargin=3cm ]{geometry} \usepackage{rotating} ...
4
votes
1answer
57 views

How to make a hbox several lines under the specified place?

Recently I asked How to colourfuly highlight some lines of an algorithm using algorithm2e? I wanted to acheive this effect using the algorithm2e package: Thanks to JLDiaz's answer I know how to do ...
6
votes
0answers
196 views

Changing colors of included cmyk jpg

I am trying to convert a pdf containing grayscale pictures and black text into shades of a single color in cmyk color space (for printing). I was thus very happy to learn, from a side remark in one ...
4
votes
1answer
288 views

Booktab color rows with multicolumn

I would like to color certain rows in my booktabs table. I have tried the following \documentclass[a4paper,10pt]{article} \usepackage[utf8]{inputenc} \usepackage{colortbl}% ...
2
votes
1answer
225 views

How can I colourfuly highlight some lines of an algorithm using algorithm2e?

I am trying to achieve something like this: This image is linked from this answer. This answer also provides a solution and seems simpler. Both answers deal with the algorithmicx package however. ...
7
votes
2answers
222 views

Color fraction bar

What would be the easiest way to create a fraction whose bar can be coloured as desired? I know one can use the \genfrac{left-delim}{right-delim}{thickness}{mathstyle}{numerator}{denominator} command ...
3
votes
0answers
110 views

How to color groups of bars in a graph, coming form an external file?

I have a graph displaying bars and error bars, the numbers comming from an external .dat, being simply black and white. And this is how I got there: \documentclass[12pt]{report} ...
10
votes
1answer
400 views

Transparent shade using TikZ

I wonder whether it is possible to create a transparent shading effect (like the one below) without an exact specification of the fill color. This solution is good until I have to change the ...
4
votes
2answers
116 views

How to colorize escaped math in syntax highlighted listings?

my listings are syntax highlighted using \lstset with escapechar=$ and commentstyle=\color[rgb]{0,0.5,0}. Now my C-code looks like int16_t speed; // calculated speed in $\(\frac{cm}{s}\)$ and the ...
6
votes
2answers
123 views

How to seamlessy color the background of a series of \items

I need to change the background of a number of (full) \items in a numbered list. I saw the answers to How to highlight an entire paragraph? and (naively) tried to do the following: ...
6
votes
2answers
309 views

Path with complicated colormap in TikZ

I want to draw a path in tikz whose local color is a function of position. Here are two examples of what I have in mind: I found the answers from Path following color gradient in TikZ very ...
3
votes
1answer
82 views

How to set a background color for a listing?

Someone who knows how to fill with color only the box? \begin{shaded} \begin{lstlisting} if (a < b) { printf("A is smaller than B!\n"); } a = b; \end{lstlisting} \end{shaded}
7
votes
1answer
147 views

Alternating row colours in tabulary?

I managed to get alternating row colours working when using tabular but when I converted them to tabulary to make the tables match \textwidth the row colouring became messed up. Now it completely ...
12
votes
1answer
348 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 = ...
8
votes
1answer
159 views

algorithm2e: Applying color to an entire line, excluding the line number

Consider the following MWE: \documentclass{article} \usepackage{xcolor} \usepackage[boxed, noline, linesnumbered]{algorithm2e} \begin{document} \begin{algorithm}[t] ...
5
votes
2answers
901 views

How to change background color of the frametitle (in warsaw theme)?

I'm using \setbeamercolor{structure}{fg=cyan!90!cyan} and it works for the top and bottom of the frame. Now I want to change the background color of the frametitles. I've tried with ...
2
votes
2answers
498 views

Option clash for package color. \RequirePackage

I'm very new to LaTeX, and I'm having a problem which seems to originate from the following lines of code. \RequirePackage[usenames]{color} \RequirePackage{fancyhdr} \RequirePackage{nomencl} ...
4
votes
1answer
73 views

Undefined color error in Section after defining the color

In the following MWE, \documentclass[twocolumn,showpacs,preprintnumbers,amsmath,amssymb,superscriptaddress]{revtex4} \usepackage[dvips]{graphicx} \usepackage[usenames,dvipsnames]{xcolor} % in order ...
4
votes
1answer
207 views

How can I define multiple identifier classes and styles in listings?

I'm trying to add different styles (color, etc.) to different groups of words in the listings package. Note that my question is different from How can I use multiple declarations (\textbf, \emph) in ...
9
votes
3answers
196 views

Use \macro within xcolor expression

So this seems to be impossible: OrangeRed!\c!white with \c being any kind of \def formula, or precisely in my case, with a \pgfmathsetmacro. Here is MWE \documentclass{article} ...
1
vote
0answers
91 views

Color/Opacity of a circle segment [closed]

I'd like to know how to color a segment of a circle, more specifically using the provided example in this link. For example I want to color the circle in 45 degree segments or similar. I'd also like ...
1
vote
1answer
1k views

How to change the color of itemized text using `\color<>[]{}` in Beamer?

I want to change the item text color in Beamer. I checked the Beamer User Guide and found the \color<>[]{} command in page 80. \color<2-3>[rgb]{1,0,0} This text is red on slides 2 and 3, ...
9
votes
3answers
342 views

How can I shade from red to green along a curve?

Let's take the following picture as an example. I want to shade the fan-shaped area from red to green along the curve shown with the arrow in TikZ. How can I do this? Code: ...
1
vote
1answer
52 views

Listing package only outputs black colored source code even though the language parameter is specified

The problem is pretty much in the title. With this code: \documentclass{report} \usepackage{listings} \begin{document} \lstset{language=Python} \begin{lstlisting} def ...
1
vote
1answer
406 views

\cellcolor command from colortbl package not working

I've been trying to colour single cells but it's not working. Here's a MWE: \documentclass{memoir} \usepackage[usenames,dvipsnames,svgnames,table]{xcolor} \begin{document} \begin{tabular}{|l|c|} ...
4
votes
2answers
64 views

Why is \color moving the relative position of an entire \picture environment?

I've been writing a set of simple line drawing macros for some piecewise functions. For some reason, when I attempt to add color to the lines, each segment is translated to the right. I've verified ...
3
votes
2answers
256 views

Color and rules in tables with multirow

I have a problem with colors and lines in tables. I have this code: \usepackage{multirow} \usepackage{colortbl} \begin{tabular}{ll|c|c|c|c|c|c|} \cline{3-8} \cline{3-8} & & ...
3
votes
0answers
105 views

Change color theme for Beamer [duplicate]

this question is indeed trivial, but I haven't found any answer to it online. I'm for the first time using the Beamer environment to make a presentation. I'm using the Cambridge US theme, but I want ...
3
votes
2answers
88 views

highlighting vowels using a background color [duplicate]

Is it possible to give the letters a,e,i,o,u,y a different background color in a piece of text by using a loop or package? For instance, give the a's a red background, the e's a blue background, etc. ...
2
votes
1answer
207 views

tikz array indexing to paint with custom palette

I have a custom palette which I want to paint with it by indexing. Here is my attempt: \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \def\colorPallete{{0.00 ...
3
votes
2answers
227 views

How to define the distance of color regions in radial shading using TikZ?

I am making a series of figures explaining the photolithographic process, and need to find a way to illustrate edge beads during spin coating. To show this I initially wanted to use radial shading, ...
12
votes
2answers
350 views

How to improve color consistency of bitmap pictures from native format to target pdf file?

For the first time I am concerned about proper rendition of pictures for the draft of a document with artistic content. I use the basic macro below to embed the pictures. The pictures are in .jpg ...