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

learn more… | top users | synonyms (1)

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
80 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
878 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
164 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
189 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
262 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
204 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
220 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
107 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
382 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
112 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
119 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
297 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
81 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
146 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
340 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
154 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
833 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
470 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
71 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
193 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
188 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
88 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
337 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
51 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
378 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
228 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
194 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
208 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
330 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 ...
4
votes
1answer
157 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. ...
7
votes
0answers
150 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 ...
1
vote
1answer
232 views

How to change seagull color theme alert text to non-bold

Some beamer color themes (as seagull) define alert text as bold font. However, sold font alerts are annoying when one uses overlay (eg: \onslide+<2->), because bold text takes more space than ...
15
votes
2answers
315 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{ ...
2
votes
1answer
175 views

Alternate colback and colbacklower in tcblisting

I have written a new environment based on tcblisting from package tcolorbox. I want the background color for code always in "gray" and the background color of the text compiled in "white". He held ...
3
votes
1answer
114 views

Shortcut for changing text color

I want to create a shortcut in LyX for changing the color of selected text. I tried to create a shortcut for "set-color green" or "set-color green green", but none of these worked. What is the magic ...
4
votes
1answer
244 views

Use different color for moderncv subsections

I have made color style like below for moderncv. The color1 is used for all sections and subsections I want to use the newly added color3 for subsections instead of color1. How could I do it? ...
5
votes
0answers
46 views

What are the differences between creating a new macro command vs. a new environment? [duplicate]

For the purposes of collaboration, I want to create a number of short commands or environments that will color the text within its scope so as to identify the author. My first thought was to simply ...
13
votes
1answer
178 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 ...
3
votes
2answers
112 views

Variable color for section titles

The following def takes first three letters as an argument: \newcounter{colorCounter} \def\@sectioncolor#1#2#3{% {% \color{% \ifcase\value{colorCounter}% blue\or% red\or% ...
6
votes
1answer
311 views

How do I create a Tikz mindmap that has two connected roots?

I am creating a mindmap that has multiple root concepts instead of just one. How can I create such a mindmap using Tikz? These are the mindmaps: \begin{tikzpicture}[small mindmap,concept ...
4
votes
1answer
613 views

color a text line in a code {lstlisting}

I try to use the package xcolor into a lstlisting code as follows: \begin{lstlisting} \color{red}{text...} \end{lstlisting} but I can't color the "text..." comments. Someone could help me, ...
4
votes
2answers
117 views

xcolor \color command affects the wrong word in a Hebrew sequence

When compiling \documentclass{article} \usepackage[utf8x]{inputenc} \usepackage[hebrew,english]{babel} \usepackage{xcolor} \begin{document} \sethebrew ראשונה \color{red} שניה \color{black} שלישית ...
1
vote
3answers
141 views

How to colorize only one of the three branches in a game tree?

I am using Osborne's egameps package to create a game tree of an extensive game. How could I colorize only the right branch of the tree branch in the first movement as red. I attempted to use ...