Questions tagged [color]

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

Filter by
Sorted by
Tagged with
6
votes
2answers
205 views

How to color a tag in a math equation?

I have a math equation with a \tag operator. \documentclass{article} \usepackage{amsmath,amssymb} \usepackage{xcolor} \begin{document} This is my favorite equality: \begin{align*} \color{red}\...
1
vote
1answer
41 views

PGFPlots - Missing number, treated as zero error - when loading data from file

I am drawing a heatmap/scatter plot with the mark colour determined based on a score. I have mapped scores to Red, Green and Blue values, and trying to colour the marks based on the RGB values. The ...
2
votes
1answer
34 views

Colorize text using LuaLaTeX doesn't work

I need to colorize all occurences of certain symbols/words and so I followed the steps of this answer. This is a test code I have written in TeXstudio: % !TeX program = lualatex \documentclass[11pt]{...
0
votes
0answers
23 views

tabu+makecell+xcolor = Improper \prevdepth

The packages tabu, makecell and xcolor seems to interact in incompatible ways: MWE: \documentclass[10pt,a4paper]{article} \usepackage{tabu} \usepackage{makecell} \usepackage[usenames,dvipsnames]{...
3
votes
0answers
18 views

\pagecolor ignored when preview package used

When I use the standalone package's preview option, pagecolor is ignored. MWE: \documentclass[preview]{standalone} \usepackage{xcolor} \usepackage{lipsum} \pagecolor{red} \begin{document} \color{...
1
vote
0answers
22 views

How to get colormap color to use in a \textcolor?

I have a tabular with a few values, which I want to color-code with \textcolor. The color scheme is given by a colormap: \begin{figure}[h!] \centering \begin{tabular}{|c|c|c|c|c|} \hline A & \...
1
vote
2answers
33 views

Colormap drawing order in parametric 3D tube

Similar to this question, I am trying to draw a parametric tube in a PGFplots 3D-plot: \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=1.16} \begin{document} \begin{...
1
vote
1answer
31 views

Foreach and different color compilation error

if you execute this code there will be a compilation error, but if you replace red!\rnb!blue by red!20!blue it works fine. \documentclass[border=2pt]{standalone} \usepackage[utf8]{inputenc} ...
2
votes
1answer
47 views

Change cell color in matrix

I am trying to color the empty cells from the first matrix with grey (\definecolor{grey}{RGB}{220,250,250})but I don't know why it does not work. Any suggestions? \documentclass{standalone} %\...
2
votes
2answers
60 views

Bold and Colored Image Caption

How can I color and bold an image's caption in \documentclass[12pt]{report}?
2
votes
1answer
23 views

\NAME equivalent for ntheorem?

I am trying to color only the NUMBER part of my theorems and corollaries. After some fiddling I was able to produce the following image which I am almost happy with In the code below I have the line ...
3
votes
2answers
60 views

Color gradient in circle from center and keep transparency

So I am trying something: I want to have a loop reading out the position of circles from a dat file. The plotting already works very well. However now I want to implement a gradual shading from semi ...
2
votes
1answer
80 views

After implementing xcolor, simple table becomes buggy

When I am making a table with colored first raw using xcolor for my thesis, vertical line in first raw behaves differently in random (as visible in image "with color"). When I avoid coloring (just ...
9
votes
2answers
679 views

An elegant aspect for enumerate the equations of a book

I am trying to create this kind of enumeration for the various equations of my book, similar, as this image: My MWE is: \documentclass{book} \usepackage{mathtools} \usepackage{newtxtext} \usepackage{...
1
vote
1answer
26 views

How to color a column starting from a specific row

I want to color a column, but only starting from the row that starts with C1. I have this example output. I want to remove the yellow color from the row before C1. This is how it looks: This is the ...
0
votes
0answers
30 views

Complex table of contents with 3 columns and backgroundcolor — realizable with etoc package?

I am currently working on the conversion of the production workflow from Indesign to LaTeX for a scientific open access magazine. This journal has a rather complex table of contents with 3 columns (...
1
vote
2answers
38 views

Change Color of Font Once They Have Been Defined

I have defined the color of my fonts in the preamble. What I am trying to accomplish is to change the color of just one word within the document, but I am unable to do this. Usually, within the ...
1
vote
2answers
66 views

Combination of TikZ and special tables: difficulty

With reference to two previous questions A specific format for nice tables and Some adjustments of a nice table of mine to which I had an excellent answer from all users, I for example used a ...
1
vote
1answer
31 views

How to reduce space between a text line and differents \hline in a table - trying to use negative \vspace value

On the following figure, I try to make decrease the space betwen the line "Nombre de bins : (Y1) :5 ..." and the two \hlines above. More over, you can see that line "Nombre de bins : (Y1) :5 ..." is ...
6
votes
3answers
579 views

Making arrow with a gradual colour

I want to make an arrow that has gradual color as shown in the picture below: First I wanted to make that arrow in one stroke, but I do not know how to make shaded color in postaction, so in the end ...
4
votes
2answers
231 views

tikz: draw multicolor curve with smooth gradient

Yes, I know there are several topics about, but no one referred to my case. While colormap seems works only with plots, how can I draw a multicolor curve with smooth gradient? This is my attempt: \...
0
votes
1answer
31 views

How to globally change the color of tikz nodes?

I see here: How to specify a fill color in RGB format in a node in tikzpicture? It is possible to change the color of a node locally. However, I would like to add a background color globally to all ...
0
votes
1answer
52 views

Remove highlight in printed quoted line

In some journal, they required changes made to be highlighted in some striking color. Then, the revised paragraph also need to be reflected in the reply to reviewer section. The tex below should do ...
1
vote
2answers
91 views

Latex: Highlight areas in listing using different backgroundcolor

I'd like to highlight areas in a listing using different background colors. It should look something like this: This is a basic example with a background color for the whole listing: \documentclass{...
0
votes
0answers
29 views

\lstset colorize numbers in code [duplicate]

I defined a syntax highlighting for my code like so: \lstdefinelanguage{CSharp}{ sensitive = true, keywords={assembly, class, method, field}, keywords=[2]{public, private, family, ...
1
vote
0answers
21 views

Change bullet color in TOC for current section only

In my TOC I would like to highlight the current section using a different color. Following the answers to this question, I have managed to change the text color of the current section using \...
1
vote
1answer
30 views

Change background color, without a new paragraph and across environments

{\color } can do that, but only for the color of text. I would want the same for the background. I have looked across many solutions, but they either can not go across environments (e.g. colorbox) or ...
5
votes
1answer
76 views

How to color tikz mindmap nodes by y-coordinate

In a mindmap, I would like to color (most) nodes according to their y-coordinate, that is, their height on the page. For this, I am accessing the viridis colormap and sample its colors. Using code ...
4
votes
3answers
64 views

How to colour a table with opaque colour such that no text and no lines are visible?

I am iterating a latex file and want to colour all the tables green such that no text or no lines are visible. I tried using "transparent" but it fades the colour along with the text. I want the ...
1
vote
1answer
35 views

How to change color to black with \citep

Edited Version I am working on the template (MastersDoctoralThesis) downloaded from here I searched a lot here for a solution to my problem but couldn't find, please be patient with me. \...
1
vote
0answers
70 views

tikz - define color in hex format

I have a color hex string, e.g. ecd9ed, I know I can define it as below: \definecolor{color1bg}{RGB}{236,217,237} But I wish to skip the conversion from hex to decimal. Is it possible to define a ...
1
vote
0answers
54 views

Tikz color opacity spills over to page

for some reason, the use of the opacity option in my tikz diagram "spills over" to the rest of the page. Weirder still, this isn't visible from the preview window in texstudio, but it is when opened ...
1
vote
1answer
65 views

Tikzposter background color

I'm trying to modify the standard 'Desert' theme in tizkposter by changing the backgroud colour of the blocks to white and the poster background colour to the gray that is already set as a backgroud ...
0
votes
1answer
35 views

Coloured tables in ACM Master Article Template

I'm currently writing a text in the new ACM Master Article Template. I have a colour-coded table looking like this: \documentclass[a4paper,12pt]{article} \usepackage[table,xcdraw]{xcolor} \begin{...
1
vote
1answer
31 views

Edge Coloring in graph

I'm looking for a simple solution to do Graph edge coloring, even following the tkz-graph documentation, seems my graph edges aren't being colored (neither line width is being changed), probably I'm ...
1
vote
1answer
34 views

Color background of Confusion matrix

So I have found this wonderful confusion matrix on this thread. I was wondering how could I add color to the background of the different boxes. \documentclass{article} \usepackage{array} \usepackage{...
7
votes
1answer
149 views

Automatic cell coloring with per-column minimum and maximum values

I want to color each cell in a table based on its value. I know solutions exist, but you have to set the minimum and maximum values globally for the table. They can be found for example in Are there ...
1
vote
1answer
30 views

Changing the color of environments in beamer

I have just started lerning Latex. So, it is possible that the following doubt is very easy. I have to do a presentation with Beamer. I know that there exist specific comands to theorems, definitions,...
5
votes
6answers
799 views

Why there is a red color in right side?

I am using parallel package to write texts of different translation side by side, I found parallel package accomplished this side by side texts, here in Left column is in another language and the ...
1
vote
1answer
33 views

Clear xcolor color definition

I'm trying to create a command that creates colour palettes from a partially complete set of defined colours. In order to make sure the palette is complete I use lines like this to use a fallback ...
1
vote
1answer
58 views

Color table with data from csv file with colors from csv file

I am trying to create a table (which is from a csv file) which cells are colored (from another csv file (this way I can do preprocessing externally)). I have looked briefly at tools such as datatool, ...
2
votes
2answers
66 views

Latex table: text does not center on cell

I'm trying to create a table in Latex, but the text does not line up in the center of the cell, in some cells, and leaves out of the table. How can I solve the problem? \documentclass[a4paper,11pt]{...
1
vote
1answer
26 views

Set default colours for lines just as default width \arrayrulewidth?

In a table I want all the lines to be thick and in red color. I can change the width using \arrayrulewidth, but how to change the color to red?
0
votes
0answers
39 views

Latex colours not matching when seen using opencv

I am working on a project where I need to extract each cell in a table in a latex file. So I am coloring each of the cell with different color so that when I parse the png image of the file then I ...
3
votes
0answers
51 views

Including a greyscale PNG image gives wrong colorspace in resulting pdf file

I am preparing a large document that will be printed in one colour, and I tried including a few images in png-format that have been converted to a greyscale colorspace (DeviceGray). In the resulting ...
3
votes
0answers
37 views

tikz doesn't fill small figures

The usual command \draw[fill=<colour>] (<centre coordinate>) circle (<radius>); usually works just fine, however, when the radius is very small, for some reason it doesn't work ...
4
votes
2answers
73 views

Hatch with Shading

I would like to have a rectangle that has some hatch. Furthermore, the hatch should have some shading. But, I am only able to get a transition of the colors in the background. Does anyone know how to ...
3
votes
4answers
196 views

\noalign caused by multirow and colors

I am trying to create the following table However, I keep getting the following error message ! Misplaced \noalign. \rowcolor ->\noalign {\ifnum 0=`}\fi \global \let \CT@do@...
7
votes
1answer
79 views

Math cases align being colored as a table

My cases environment is being colored as a table. I do not want that. Seems tikz is causing this, because removing it from document fix, but I use tikz everywhere in my real document. Is there any ...
4
votes
2answers
100 views

color rows on table (Tabu package)

I am writing a table with colored rows using the tabupackage (2.10). For example \documentclass[12pt]{article} \usepackage{tabu} \usepackage[table]{xcolor} \begin{document} \begin{table} \...