Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [color]

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

1
vote
1answer
17 views

Changing color of align* environment

I have this text that I want to include in my LaTeX document. I only want to change the color of the equations in the align* environment, but when I do it changes the color for the rest of the ...
0
votes
1answer
16 views

How to set color conditionally

Disambiguation. For tables and odd even row color, see if this search at Stack Exchange helps: https://tex.stackexchange.com/search?q=table+row+color Disambiguation. For just unilaterally setting a ...
3
votes
1answer
104 views

How do I set a background color and font for inline verb text?

I wish to customize the verb command such that I can customize the font and color, as well as set a rounded colored rectangle as background. I found this in the Tcolorbox manual: \DeclareTotalTCBox{\...
3
votes
1answer
39 views

Advanced customization of Minted code?

I'm a newbie to LaTeX, especially the minted package. I would like to customize it such that the code has a similar style to the attached screenshot. Specifically, I wish to be able to customize: The ...
1
vote
0answers
20 views

Why is xcolor causing a layout change in a tabularx column? [duplicate]

I've made a MWE below. It's a simple two column {r X} table in tabularx. In the first row, without any xcolor commands, the first lines start in line with each other but in the second row, with ...
1
vote
2answers
45 views

Suggested way to color a multirow table without package of colored tabulars

I have this code: \documentclass[a4paper,twocolumn]{article} \usepackage[margin=1in]{geometry} \usepackage{multirow,booktabs} \usepackage{amssymb} \usepackage[table]{xcolor} \usepackage{booktabs} \...
1
vote
2answers
42 views

Where should I put PassOptionsToPackage when loading xcolor?

I'm trying to draw a graph from a table were I have these data: DIM AVRG1 MAX1 MIN1 AVRG2 MAX2 MIN2 So I would like to draw 6 lines in my graph: 2 means 2 for the maximum values 2 for the minimum ...
0
votes
0answers
37 views

Caption & Footnote color in book class environment

I'm dealing with a book class document. Actually I've got some problems trying to set color for the caption text. I saw this solution, but strangely it doesn't work. Then I tried to do the same with ...
0
votes
1answer
52 views

Change color in both text and equations

Is it possible to make a command that changes the color of both text and math, including in equations, for everything between brackets. So for example something that does either Either: \toRed{ ...
1
vote
0answers
26 views

emph: how to change the color only if two words follow each other?

I would like to know whether it is possible to give a different color for a string of multiple words. I would like to use dark blue for "proc catalog" and default blue for "catalog". Plese find the ...
8
votes
2answers
155 views

How to use svg names in ConTeXt?

ConTeXt provides multiple color modules which contain predefined colors. Among those distributed in TeX Live are X11 color and some others, but the svg names, which have become more common these days, ...
0
votes
1answer
30 views

Using ''textpos'' in a colored page

I want to write a text in a given position in a colored page. So I used the code: \documentclass{article} \usepackage[italian]{babel} \usepackage[T1]{fontenc} % \usepackage[absolute]{textpos} ...
2
votes
3answers
114 views

Tikzpicture: How to color separate fields at the arrays and use resizebox?

I want to color only separated nodes? How could I do this? I want also resize the tikzfigure, but I got the error message Undefined control sequence. } \documentclass[12pt]{article} \usepackage{...
1
vote
1answer
28 views

pgfplots: change legend text color according to plot fill color

I have a (large) set of graphs with (multiple) lines/fills in a large document. The style generally corresponds to the MWE picture below. Many relevant style parameters like colors and line sizes etc. ...
18
votes
2answers
1k views

can glue be colored?

When I'm fine-tuning the design of my documents in LaTeX/XeLaTeX, it's sometimes helpful to use color to highlight the location and size of my fixed spacing. For example, I sometimes temporarily ...
5
votes
1answer
42 views

Different behaviour of \color in “tabular… m” and “tabular… p”

The following MWE : \documentclass[10pt]{article} \usepackage[french]{babel} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{color} \usepackage{array,float} \begin{document} \...
0
votes
0answers
14 views

How can I get a longtabu with alternating row colors to restart its coloring when reaching a new page?

In the following document I specify that the rows should be colored using 5 colors ranging from white to black: \documentclass[a4paper,oneside,article,11pt,english]{memoir} \usepackage[utf8]{inputenc}...
0
votes
0answers
26 views

Color all material in math mode with TeXShop

This is more about the features of TeXShop than a LaTeX question. I'm tired of writing a whole paragraph, trying to compile, and then having to search through the whole thing to see where I forgot to ...
1
vote
0answers
28 views

Package xcolor Error: “Undefined colors when master (classicthesis 3.1) has PDF included” even though the PDF has been deleted from the document

I think this is a bug I've stumbled upon and it's driving me up the wall. Referring to this question, I've got the same setup: Package xcolor Error: Undefined colors “Maroon”/“Royal Blue” when master ...
2
votes
1answer
34 views

Is it possible to invert the colors in Kile's live preview?

I like to use a dark theme for Kile, but the live PDF preview window (which is a great feature) is very bright. Is there any way to make it dark, or set the background black, or invert the colors, or ...
1
vote
2answers
20 views

Recolor text, such that floats and footnotes are affected correctly

I want to define an environment redout, that causes all text defined inside to be typeset in a changed color. However, I can't find a way to consistently recolor floats. If recoloring is performed ...
1
vote
1answer
44 views

Changing title's color - Classic thesis template

Default color of the title is red in classic thesis template. I tried to search the word red in the file Titlepage.tex, ClassicThesis.tex and classicthesis-config.tex, but there is not. How can I ...
0
votes
0answers
17 views

Border covered by colour

In the following (relatively) minimal example, most of the tables are correct. But in the first cell of the first one, the borders seem to be covered by the background colour. Why? I read already ...
3
votes
1answer
56 views

custom color multinode shape with inherited default color

I would like to create a multinode shape doublecirc with two node parts, say text and lower, consisting of two circles with text in each. (There are obviously ways to do this more simply -- but this ...
3
votes
1answer
54 views

Theorems are blue, Definitions are yellow, Examples are green,in latex

I am trying to type my notes. I found many lecture note which uses a different colour for a different environment. Like, theorems are blue, definitions are yellow, etc. Can anyone tell me how to do ...
1
vote
2answers
31 views

Change color of section heading and text until next section

For a bigger writing project of article type book, I would like to color the heading and the text of certain sections, subsections, and subsubsections in different colors. Normal text is as usual in ...
1
vote
2answers
46 views

Align with colors and vspace using commands

I'm trying to prepare notes for a class and am wanting to use an align environment in multiple areas but with a potential of two possibilities. Here's a mwe \documentclass{amsart} \usepackage{xcolor} ...
0
votes
0answers
16 views

Inline code with background color without use of escape characters [duplicate]

I need to include some inline code in a text with a background color. I use \lstinline for including code in a text and \colorbox for making a background color for it. \lstinline!$! produces s (...
1
vote
1answer
13 views

Beamer : Different colors for section in toc and section in head/foot / Empty line below headline with Ilmenau

I'm creating a Beamer presentation and I want to include section titles as links in the headline with hyperref. I also want the TOC to be displayed at the beginning of each section with the section ...
7
votes
1answer
60 views

Gradient colour based on citation frequency

I have an idea, and to be frank I don't have any kind of Start / MWE because I think this is actually quite a difficult problem, at least for me, but it might be an interesting kind of result if ...
2
votes
1answer
23 views

HTML color not working inside moredelim of \lstset

Here is my code: \documentclass{article} \usepackage{xcolor} \usepackage{listings} \begin{document} % Example 1 \lstset{ basicstyle=\color[HTML]{0000ff}\ttfamily, % blue moredelim=[s][\...
2
votes
2answers
50 views

Finetuning a pentagon network

I have created a primary version of a pentagon network with the following code: \documentclass{book} \usepackage{tikz} \usetikzlibrary{positioning} \usetikzlibrary{shapes.geometric} \begin{document} ...
2
votes
0answers
52 views

Improvment for colored wheels in TikZ

Here is my MWE: \documentclass[border=5pt,tikz]{standalone} \definecolor{forestgreen}{RGB}{34,139,34} \definecolor{limegreen}{RGB}{0,255,0} \begin{document} \begin{tikzpicture} %% \clip (5,-4) ...
1
vote
1answer
63 views

Color symbols individually in math mode (unicode-math clash)

The solution in the post https://tex.stackexchange.com/a/100625 is highly efficient. Unfortunately it can not be used with unicode-math, which erases the individualized symbol colors. While unicode-...
2
votes
2answers
65 views

Undesired background-foreground colour blending in Beamer Metropolis theme progress-bar

I'm having to modify the Beamer Metropolis theme for a rather dark set of slides. Following is a minimal working example (MWE). The problem I'm trying to overcome is that there seems to be an ...
2
votes
1answer
44 views

\textcolor{}{} behaves differently within an \href in a \node

Note: This question is similar to \textcolor{}{} behaves differently within a \node. The difference here is that The problem occurs inside an \href (within a \node) and The workaround hack solution ...
1
vote
1answer
25 views

Colouring tables - Option clash for package xcolor

I would like to colour some rows of my table. However when using \usepackage[table]{xcolor} I get the error "Option clash for package xcolor". I am using quite a lot of packages, but I do not know ...
0
votes
1answer
30 views

What do two consecutive \usecolortheme statements mean in a beamer theme?

I was taking a look at a Beamer theme code in: /usr/local/texlive/2017basic/texmf-dist/tex/latex/beamer/themes/theme/beamerthemeRochester.sty It contains code like this: \useoutertheme[width=0pt]{...
7
votes
1answer
86 views

Nested \foreach functioning unpredictably when drawing colored spheres in 3 dimensions

I'm visualising color systems with TikZ to my students, and here I'm creating a 3D set of axes which represent red, green, blue and their combinations as shaded spheres. For some reason, the result ...
2
votes
1answer
22 views

\color in a \cline-like macro causes extra line when after the last row

I have a macro, e.g., \clineThicknessColor{2-3}{1.5pt}{blue}, that is basically \cline plus a thickness and a color (thanks to Hood Chatham's answer to my earlier question). It's working fine, except ...
2
votes
1answer
29 views

difference in item colorization behavior between latex and beamer documents

Several posts describe the coloration of single items (text and item label); however, these solutions do not work in beamer documents. For instance, following this post, expected results are obtained ...
8
votes
1answer
66 views

\textcolor{}{} behaves differently within a \node

I would expect that using the \MyText macro defined as \newcommand{\MyText}{before \textcolor{red}{XX} after} should always yield the same color for the text "before" and "after". But it appears ...
5
votes
2answers
117 views

Coloring areas with TikZ

Consider the following MWE: \documentclass[border=5pt,tikz]{standalone} \usetikzlibrary{calc} \begin{document} \begin{tikzpicture} \foreach \x in {1,1.2,...,3} { \pgfmathsetmacro{\...
7
votes
3answers
162 views

Generate random color in way that works with both pdflatex and lualatex

Right now, I am generating a random color in pdftex using \definecolor{randomcolor}{RGB} { \pdfuniformdeviate 255, \pdfuniformdeviate 255, \pdfuniformdeviate 255 } Which works pretty ...
3
votes
1answer
42 views

Individual bar colors

I am trying to create a bar chart where all the bars are blue apart from one but, the last bar isn't being labeled. Below is my LaTeX code, any help would be appreciated. https://www.overleaf.com/...
1
vote
1answer
29 views

TOC chapter numbers with different color and background

I'm new to LaTex and need some help. I want to have a TOC where the chapter numbers have a background color and a different color than the chapter title. Another thing I want to do ist a border on the ...
2
votes
2answers
50 views

Row coloring problems in table (svmono class)

In the table below, when I set the row height, column width and the indentation as desired, the coloring of the rows breaks, leaving some "uncolored" areas (see example). How can I fix this (while ...
0
votes
0answers
32 views

incomplete cell color? [duplicate]

I have simple table \begin{adjustbox}{max width=1\textwidth} \small \begin{tabular}{|c|c|c|} \hline \cellcolor{NavyBlue!40}{\thead{}} & \cellcolor{NavyBlue!40}{\thead{IoT}} &\cellcolor{...
4
votes
2answers
106 views

How to change the default border color of fbox? [duplicate]

I have a lot of figures inside an fbox. Unfortunately the default black is too strong for my advisor and I need to change the default border color to something more soft. I've done my research and so ...
2
votes
1answer
31 views

Alignment of minipages and colorbox

I have this document which I try to reproduce in Latex. I am using the colorbox and minipage. But I got confused with an alignment. Can I get the expected results with current packages or should I try ...