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

learn more… | top users | synonyms (1)

3
votes
1answer
56 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
60 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
64 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
92 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
120 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
447 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 ...
6
votes
0answers
64 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
207 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 ...
4
votes
1answer
168 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
76 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 ...
12
votes
1answer
277 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
38 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
60 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
405 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
115 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
130 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
49 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
135 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
150 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
109 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
201 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
98 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
280 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
83 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
101 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
242 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
73 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
120 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
299 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
106 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] ...
4
votes
2answers
367 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
255 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
64 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 ...
3
votes
1answer
100 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
153 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
77 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
229 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
303 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
49 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
228 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
62 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
124 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
104 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
80 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
140 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
145 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
235 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 ...
3
votes
1answer
131 views

Color background for chapter titles which stretches horizontally to the margins

I'm working on my chapter titles. I like them to have a background which stretches to the edge of the page. The drawbacks of the minimal document below are: The TOC also has the background, too. ...
6
votes
0answers
104 views

Arabic with colored vowels and colored suffix … possible?

is it possible to do this with XelaTex? (Im using texmaker): I already tried some of the suggestions posted here, for instance by using Arabtex. But I wanted to this with arabic type text and not ...