Questions tagged [color]
{color} is about using color in (La)TeX documents. Popular packages are color and xcolor.
4,407 questions
2
votes
2
answers
43
views
Colored prebreak in listings fails specifically with beamer
I would like to colorize the symbol showing line breaks in code listings (prebreak option of the listings package). I am using pdflatex.
The following code, taken from Colorful prebreak and postbreak ...
7
votes
1
answer
657
views
Can one produce Pantone Metallics with LaTeX?
The queston is: Can one produce Pantone Metallics with LaTeX? And how?
We have been looking at the three packages: colorspace, spotcolor and xespotcolor and they all seem to define the Pantone colors ...
3
votes
2
answers
56
views
\addfontfeature ignored in polyglossia macros?
Here is my MWE:
\documentclass[varwidth,border=0.2in]{standalone}
\usepackage{fontspec}
\usepackage{polyglossia}
\setmainlanguage{english}
\setotherlanguages{spanish}
\setmainfont{TeX Gyre Pagella}
...
2
votes
1
answer
64
views
\mathcal combined with \mathbb and colors
This answer proposes a nice way to combine \mathcal and \mathbb. My question is how to make it work within a color group.
Currently, the following code:
{\color{red} Some text before. $\mathcalbb{A}$. ...
0
votes
0
answers
26
views
Help with colorbox and formating in articles [duplicate]
Solution:
We take each paragraph and the text within it. This text consists of at least one string with attributes.
For example:
textcolor[HTML]{FF0000}{\fcolorbox[HTML]{FFFF00}{FFFF00}{\parbox{\...
0
votes
0
answers
30
views
How to change the color of text in all a document?, including footnotes, figures captions, table captions, [duplicate]
How to change the color of all the text in a document?, including footnotes, captions, line separating text-footnotes.
\documentclass[12pt]{article}
\usepackage{xcolor}
\begin{document}
\color{cyan}
...
1
vote
1
answer
53
views
Coloured headings in margins, volume 2 (spacing issues)
Let us use this excellent, award-winning answer by Jasper Habicht and put some strange constructions into it. That is when some weird spacing issues around the headings will start to appear:
\...
3
votes
2
answers
190
views
Coloured headings in margins
In my CV design, I like to put some sections in the margins in order to make better use of the space. Currently, I’m using a solution based on tcolorbox, but I would like to get rid of the reliance on ...
1
vote
1
answer
16
views
Reset beamer original block colors when using a structure theme
Is there a way to rest the color for definitions, examples, theorems and other blocks to their default – blue, green, etc. – when using a theme with a structure color presentation-wise? Below the code ...
3
votes
2
answers
140
views
Problem with highlighting first row and column of a table
I try to create the following table.
After a lot of trial and error I thought that I succeeded.
\documentclass[a4paper, 11pt]{article}
\usepackage{xcolor}
\usepackage{colortbl}
\definecolor{...
0
votes
2
answers
25
views
Beamer Color Issue Inside \colorbox with \setbeamercolor{math text}
When I set a default color for math in Beamer using \setbeamercolor{math text}{fg=green}, the surrounding color of math inside \colorbox{} is no longer respected; it reverts to the default Beamer ...
0
votes
1
answer
30
views
How to color an aligned item in align environment?
I have a beamer document:
\documentclass{beamer}
\begin{document}
\begin{frame}{}
We have
\begin{align}
A & < B , \\
C & < D .
%\textcolor{magenta}{C & < D} .
%\textcolor{...
3
votes
1
answer
72
views
Failed to fill the white area
I once asked the the question, and Qrrbrbirlbel suggested I use the library spath3. Now I want to draw a new graph. I plan to mimic it, but it seems to have failed. There must be an issue with my code,...
4
votes
1
answer
148
views
How to improve the achievement of gradient colormap path?
I follow the link here and here to achieve the gradient colormap of path[pattern like ColorA -- ColorB -- ColorA] in a loop shape of ellipse as below, but it raise the following:
Missing character: ...
1
vote
1
answer
52
views
Is it possible to create a background color for the different parts of a struktogramm?
I wanted to know if anyone had an elegant solution for having a background color for each type of command: if blocks and the "yes" "no" options are red, while blocks are blue etc.. ...
4
votes
1
answer
95
views
Why the global default@color settings doen't work with xcoffins?
As the link globally-set-the-text-color, showing the following method to change the color globally:
\usepackage{xcolor}
\makeatletter
\newcommand{\globalcolor}[1]{%
\color{#1}\global\let\default@...
2
votes
1
answer
30
views
Color figure number in list of figures but not in figure caption
I'm making a tex document that is required to have a certain color scheme for the table of contents. I would like to make it so that within the List of Figures, the figure number is colored, but the ...
1
vote
1
answer
31
views
Remove/reduce the intensity of the fade of the Desert Tikzposter theme
Is there a way to remove or reduce the fade in tikzposter's Desert theme (block and main title)? It gets visually uncomfortable to read when the text approaches the end of the fade.
MWE :
\...
0
votes
1
answer
41
views
Keywords in lstlisting are not highlighted sometimes
As a follow up of lstlistings package: Replacing a character I don't understand why sometimes the keywords are highlighted and sometimes not
\documentclass{article}
\usepackage[T1]{fontenc}
% Use ...
0
votes
0
answers
36
views
printing colored hyperlinks in solid black
I have written the following.
\documentclass{amsbook}
\usepackage{lipsum}
\usepackage[ocgcolorlinks]{hyperref}
\begin{document}
\label{firstLabel}
\lipsum
\label{secondLabel}
\lipsum
\par See page~\...
0
votes
1
answer
36
views
Temporarily delete keywords from lstlistings: Some keywords are not deleted [duplicate]
As a follow up of a previous question Temporarily delete keywords from lstlistings, I am not able to use the same recipe for removing the keywords "TIME" or "DATE". Any idea what ...
0
votes
0
answers
48
views
Cell color in table does not fill whole cell [duplicate]
I have a table like this:
\documentclass[aps,prc,twocolumn,superscriptaddress]{revtex4-2}
\usepackage{graphicx}
\usepackage{dcolumn}
\usepackage{bm}
\usepackage{xcolor, colortbl, multirow}
\begin{...
3
votes
1
answer
99
views
Temporarily delete keywords from lstlistings [duplicate]
As a follow-up of the previous question lstlistings more keywords I would like to delete some keywords for a particular snippet of code
\documentclass{article}
% Use utf8 input encoding
\usepackage[...
2
votes
1
answer
80
views
Color highlighting in lstlistings
I use the lstlistings package for SQL code and I when I add additional keywords they do not appear in color. A minimal working example is as follows
\documentclass[A4paper]{article}
% Use utf8 input ...
3
votes
1
answer
70
views
How to define gradient frametitle text in the preamble of a beamer file
I am sharing the dummy latex file below, in which I am trying to use gradient text in the frame title using the gradient-text package.
When I use
\begin{frame}{\gradientRGB{This is my frame}{255,0,244}...
3
votes
2
answers
190
views
Problems adjusting color in tikzpicture
I have the following code.
\documentclass[border=10pt]{standalone}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{pgfplots}
\usepackage{tikz}
\usetikzlibrary{intersections}
\...
7
votes
3
answers
260
views
Coloring column with merged cells [duplicate]
I have a small table with a merged cell. So long as I don't fill the background with some color, the text appears fine. But when I do supply a color, the visible text is truncated with a thin line ...
2
votes
2
answers
108
views
No color in moderncv
A few months ago my moderncv yielded colors as I defined them, but when I tried it recently, there is no color (only black an gray). How can I fix it so that the color is shown?
\documentclass[11pt,...
0
votes
0
answers
17
views
kile windows default settings
I have accidentally lost the default settings of kile on windows
I searched on the web with nos success
I tried with Tools --> Modes Tools --> Highlighting
without success
thanks for help
3
votes
1
answer
114
views
How to color the specific region?
I am drawing the graph below, and I would like to color a specific region. It's somewhat similar to what I asked last time How to color a specific internal region?, but with some differences. I'm ...
1
vote
1
answer
61
views
Coloring a word in underlined sentence (with \ul from soul package)
In the following code, I am trying to coloring a select word/letter in a underlined phrase.
\documentclass{article}
\usepackage{soul}
\usepackage{color}
\usepackage{amssymb}
\newcommand{\calert}[1]{\...
4
votes
1
answer
139
views
Automatically color all words starting with defined letters
I would like a way to specify a group of initial letters of words. Words beginning with that letter get automatically coloured red. I am aware of this but am not capable of adapting it to my need...
\...
2
votes
0
answers
47
views
Why don't the colors match in this tikzpicture?
Consider the following picture:
\documentclass{article}
\usepackage{tikz}
\definecolor{tu-red}{cmyk/HTML}{0.20,1.00,1.00,0/c40d1e}
\definecolor{tu-violet}{cmyk/HTML}{.75,.80,0,0/9013fe}
%\...
3
votes
3
answers
102
views
Double sided arrows between cells of a table
Here's a MWE
\documentclass{article}
\usepackage{float}
\usepackage{amsmath}
\usepackage{array}
\begin{document}
\begin{table}[H]
\def\arraystretch{1.5}
\begin{tabular}{|c | c | c l} \cline{1-...
1
vote
1
answer
26
views
Use captionsetup to change font colour but keep other font properties
I have my own environment that changes the colour of all text (along with some other stuff):
\newenvironment{revision}[1][1]{%
\color{\revcolour}%
\hypersetup{citecolor=\revcolour,linkcolor=\...
2
votes
1
answer
42
views
Reduce the width of the columns of the table where the text color has been changed
I applied the text color to the 3rd and 4th columns. Now I have a problem with the fact that in these columns I cannot adjust the column width.
I need all the cells of the same width, but now columns ...
0
votes
1
answer
76
views
TikZ or Parser Having Memory of a Previous Diagram?
This is a follow-up to this extremely thorough answer by @StevenB.Segletes, in which he completed an SGF Parser saga I had been working on (SGFs are the text files for the board game of Go). ...
1
vote
3
answers
87
views
Table problem overleaf
This is driving me crazy. Any suggestion?
The cell is just partially colored.
\begin{table}[H]
\centering
\scriptsize % Reduced font size
\begin{tabularx}{\textwidth}{|c|c|c|c|c|c|c|c|X|}
\hline
...
1
vote
0
answers
33
views
Nest textquote of csquotes inside ul of soul and have line-breaks
I would like to nest a call to the macro \textquote inside a call to \ul. The problem is that I need to put the \textquote in a call to \mbox. This is necessary because otherwise the \ul command will ...
1
vote
1
answer
69
views
how to add a personal color to usecolortheme structure
I recently discovered how to use the structure color theme in beamer where I can change the overall color palette based on different xcolor variables. However, these are limited to:
dvipsnames
...
2
votes
1
answer
71
views
How to make the title "Chapter 1" in class memoir sans-serif and `light_blue`?
I have a tex file
\documentclass{memoir}
\usepackage{xcolor,hyperref}
\hypersetup{
colorlinks=true,
linkcolor=blue,
filecolor=blue,
urlcolor=red,
citecolor=magenta,
bookmarksopen=true,
...
0
votes
0
answers
25
views
Changing color of section
I am completely new to LaTeX. I want to change the format of my sections, subsections, etc: I simply want to change each of their colours using the titlesec package. Can someone provide me with a ...
0
votes
2
answers
113
views
Colorizing spherical cap
I've drawn the following sphere in tikz.
\draw (4,4) circle (2cm);
\draw [dashed] (2.34,5.1) arc (180:0:1.66cm and 0.2cm);
\draw (2.34,5.1) arc (180:360:1.66cm and 0.2cm);
\draw [dashed] (4,4) -- + (-...
0
votes
1
answer
28
views
Removing the colour of links in contents (& lists)
After using \hypersetup{colorlinks=true} to remove the boxes and colour the links in my document, is there an option to remove the coloring for the contents (& other lists)? I don't particularly ...
0
votes
0
answers
35
views
Colored chapters in memoir cause page breaks before lists
Imagine that I try to make my chapter titles red in memoir. Then by inserting appropriate skips, I can get a page break between the heading and a list environment coming after (see example below). By ...
0
votes
3
answers
112
views
How to replace the argument of the command that is already defined?
I use \textcolor in the color package to add some colors (red, blue, orange. etc) to the string.
For example, like this
This is \textcolor{red}{test}.
This is \textcolor{blue}{test}.
I would like ...
2
votes
2
answers
118
views
Enumitem + color labels + multiline = bug?
In enumitem, suppose that I do style=multiline and use custom labels and then set font to be some color specification. Then the custom labels appear below the baseline. As you see, it does not happen ...
1
vote
1
answer
34
views
How to align a Colorbar with a specific Range of Y-Values to the plot?
I'm currently working on my thesis and analyzing both measured and calculated voltage data. To highlight the difference between the calculated and maximum measured voltages, I would like to include a ...
2
votes
1
answer
60
views
How to color a specific internal region?
I am trying to color the region in the left diagram like in the right diagram. Currently, my TikZ code can achieve the left diagram, but I'm not quite sure how to do the right one.
\documentclass{...
0
votes
1
answer
48
views
How to use "color of colormap" to pick a color from a defined colormap for pgfplots \addplot color in a foreach loop?
This is my example:
\documentclass[tikz, border=1cm]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.18}
pgfplotsset{
colormap={palette}{
color={red}
color={green}
color={blue}
}}
\begin{...