Questions tagged [color]
{color} is about using color in (La)TeX documents. Popular packages are color and xcolor.
4,094
questions
2
votes
0
answers
33
views
Using Colored Underlines in Math Mode
I am trying to underline specific terms in math mode in color. Right now, I have defined a command:
\newcommand{\ula}[1]{{\setulcolor{red}\ul{#1}}}
While this command works on normal text, it doesn't ...
1
vote
1
answer
19
views
How to apply new foreground and background colors to verb?
I want to change style of verb environment of my latex.
Want a light gray background with red text.
I tried using newverbs package I'm able to change textcolor or backgroundcolor but it's failing to ...
4
votes
2
answers
72
views
Customizing circuitikz, thickness and colors
I am drawing a simple circuit with circuitikz package. I am struggling with colors and thickness.
\documentclass{report}
\usepackage{circuitikz}
\begin{document}
\begin{center}
\begin{...
3
votes
1
answer
29
views
Colored and opaque image background in Beamer with foilhead
My .tex is this
\documentclass[12pt,xcolor={usenames}]{beamer}
\setbeamercovered{transparent}
\setbeamertemplate{caption}[numbered]
\usepackage[spanish,es-tabla,es-nodecimaldot]{babel}
\usepackage[...
2
votes
0
answers
28
views
Colour-blind mode for xcolor?
I'm using xcolor quite extensively through my project. I've also used quite a lot of green and red in close proximity due to their connotations with good and bad.
Now, I realise that this isn't ideal ...
5
votes
1
answer
126
views
Unable to Disable `colr` Feature With HarfBuzz Renderer From the `fontspec` Package
I noticed that if you use the Renderer = HarfBuzz fontspec option, the colr OpenType feature automatically gets disabled. If you use the default renderer, the feature does not get enabled but you can ...
0
votes
1
answer
13
views
algorithmic + textcolor == something's wrong -- perhaps a missing item, and incorrect layout
I need to color part of an algorithm with \textcolor. I have the following code using the algorithmic package:
\usepackage{algorithmic}
\usepackage{xcolor}
...
\begin{algorithmic}
\FOR{$s = 1,...
4
votes
4
answers
466
views
Annoying color lines in table
I'm writing a manual, and a table I need to include looks awful when compiling. This is my code, loading xcolor in the preamble:
\begin{table}[h!]
\centering
\caption{Valores críticos de $F$ ...
0
votes
1
answer
32
views
Changing the page color for a float page
I'm looking for a way to change the page color of a float page. I'm using the [p] placement for the respective figure. Consider the following MWE:
\documentclass{scrbook}
\usepackage{afterpage}
\...
0
votes
1
answer
56
views
Expl3: Expansion of mappings over lists
The package xcolor can "prepare" color definitions in such a way that they're only loaded if they're actually needed, which may be indicated by a later call to e.g. \providecolors{<id-...
0
votes
1
answer
35
views
Citations in color, but only the citations, not other in-document references
This post shows how to color within-document links, and I am happy to have this in a document I am writing. My main motivation was to put long sequences of references in one color so my eyes know ...
5
votes
1
answer
77
views
Change color of a paragraph containing aligned equations
I would like to color a paragraph in blue. As my text contains some equations, I followed the advice given in this answer. However, I get extra vertical space when the paragraph ends with an align ...
0
votes
1
answer
34
views
How to resolve specifically the error "Option clash for package xcolor. \RequirePackage" between tikzposter and ProfCollege
I know that the error "Option clash for package xcolor. \RequirePackage" has been solved in numerous situations.
However I don't know how to do it with the combination tikzposter and ...
0
votes
1
answer
57
views
How to fill non-rectangle region below line in tikz latex beamer
I am working with beamer templates. I have set a template for usual slides with a purple line in its background, using this code:
%set purple line
\usepackage{tikz}
\usetikzlibrary{patterns}
\...
0
votes
1
answer
28
views
nameref doesn't show in main text when choosing textcolor = white for table caption
I have a table that has a red background and using white text for the caption comes up better than black. This is done by using:
\begin{tcolorbox}[colback=yellow!10!white,colframe=csuOrange,title= ...
1
vote
1
answer
28
views
Provide value-dependent color to \cellcolor command
I would like to create a table-based heatmap. The answer https://tex.stackexchange.com/a/175035/70170 looks like what I need, but instead of three fixed colors, I'd like to call \cellcolor{} with a ...
0
votes
0
answers
57
views
How should I create my PDF such that it looks good under color inversion/dark mode?
I'm writing a book using Texifier, which supports dark mode on my Mac. I thought it would be amazing to have the book show nicely in both dark and light modes. I have made no effort in trying to make ...
0
votes
1
answer
76
views
Generating color-neutral PDF with `xelatex`
(This is based on my workaround related to my answer to using emoticons with pdflatex — this workaround is discussed in another answer). The gist is: it turns out that in the years after I posted the ...
1
vote
1
answer
21
views
ifcase command that changes color does not work
I am creating a handout with a command that hides the answers for students and reveals the answers for instructors. I defined a new command invisible that takes a bool and text. If 0, the text should ...
4
votes
1
answer
135
views
What is the difference between "none" and "white" on package pagecolor?
The title pretty much says it all. pagecolor seems to treat the options white and none differently, in particular because none doesn't work with package crop. What would be the reasons to use none ...
1
vote
1
answer
62
views
Colored box from page limit to the end of chapter title in toc
I'd like to have colored boxes around the titles in my toc. The box should begin at the edge of the page and finish after the end of the chapter name.
I found many solutions for having a box going ...
3
votes
4
answers
437
views
Draw the x-y-plane with the four quadrants marked in four different colors
I am trying to draw a colored diagram in Latex/Tikz and need some help. I would like the to draw the usual x-y-plane with axes marked in black and the four quadrants marked in four different colors. ...
1
vote
0
answers
25
views
How to preserve vertical colour gradient in breakable tcolorbox
I am currently trying to write a document where I have breakable tcolorboxes with a vertical gradient, as in the code below. However, I am facing an issue where the color gradient resets each time ...
5
votes
1
answer
118
views
How to Change the Color of the Footnoteline and Footnotemark Beneath within a Tikzpicture
Consider the code
\documentclass[12pt]{book}
\textwidth=4in \textheight=6.40in
\usepackage[sfdefault]{cabin}
\usepackage{csquotes}
\usepackage{xcolor}
\definecolor{bblue}{RGB}{33,41,88}
\usepackage{...
0
votes
1
answer
39
views
Effect of textcolor is lost across page break occuring in footnote nested in tcolorbox
Here's the minimal example, verified on David Carlisle's TeXLive.net:
\documentclass{article}
\usepackage[most]{tcolorbox}
\usepackage{lipsum}
\usepackage{xcolor}
\newtcolorbox{workinprogress}[1][]{
...
4
votes
1
answer
43
views
Link with colour and underline
I am using the hyperref package to colour my urls in the text. I've tried adding an underline as well with the last two lines below for the hypersetup:
\documentclass{book}
\usepackage{xcolor}
\...
3
votes
1
answer
32
views
Command for colouring text bits and wrap them in single quotation marks
For inline quotes, I need UK English single quotation mark glyphs:
‘To be or not to be,’ Hamlet said.
Also, I need the text - but not the quotation marks - colored gray.
I have tried looking at the ...
0
votes
1
answer
93
views
How to make a math equation blue?
How can I make the whole math equation in blue color? Adding \textcolor{blue} will only change the first (x=) blue even though the whole equation is within the brackets. Is there any way to simply ...
4
votes
1
answer
215
views
Why 'yellow' isn't good for optional parameter of \fill, when it is the results of an \ifthenelse command?
Can anybody help me? Why are the 1st, 2nd and 5th code good but 3rd and 4th stop with warnings.
First code is OK
\documentclass{article}
\usepackage{ifthen}
\usepackage{tikz}
\begin{document}
\...
0
votes
1
answer
24
views
Use dvipscolours from xcolor with pgf-pie
So I've got a pie chart that I'm making (data has been shortened for brevity).
However, I want to use colors from the xcolor package with this.
\documentclass[a4paper]{article}
\usepackage[usenames,...
1
vote
0
answers
45
views
Set color for all elements in `feynman` environment when using `tikz-feynman`
I am trying to draw a set of Feynman diagrams which are color-coded. If I set the color on the entire tikzpicture environment, all is well. However, if I pass the color to the feynman environment, it ...
0
votes
2
answers
40
views
When adding color to paragraphs an extra line was added in one case. Is it the way I coded the environment?
I have a document where I am adding color to various parts using a \newenvironment which was adapted from this answer. While it appears to have worked fine in 430 places, it provided an unexpected ...
0
votes
0
answers
18
views
xcolor not working within rSection
this is the code (I'm a beginner, so perhaps there are better tutorials out there):
\begin{rSection} {\textcolor{yellow}{Education}}
1
vote
2
answers
67
views
My document is being created in black and white instead of using colors. Why?
I am setting a worksheet for math class using the "schule" package. In the teacher's "solutions" page, I want to color the solutions to make them stand out more.
I am using xcolor ...
0
votes
0
answers
20
views
How can I read an excell csv file with colored cells into a tabular or table and display the color formatting?
This is my code for reading the csv files into a tabular, but it does not keep the color formatting:
\csvreader[tabular={|c|c|r|c|c|c|c|c|c|},
before reading = \begin{adjustbox}{width=\columnwidth},
...
0
votes
0
answers
38
views
Package installation [duplicate]
Please help me install a package. I've tried and tried, but I don't know what the problem is.
I wanted to install the xcolor package, so I downloaded it from CTAN, unzipped it and opened the ins file ...
2
votes
0
answers
46
views
Mark audiences in document with multiaudience
I am using the package multiaudience to separate different levels of detail in a document. While within the LaTeX-Code I can clearly separate the content for the different audiences, there is no ...
0
votes
0
answers
25
views
Revtex 4-2: Changing color of hyperref links for three different types of items (equation, table and figure) and how to bold these references?
I am looking for suggestions if its possible to change in revtex 4-2 my hyperref. colors.
I prepared MWE with specific description how it should work - for example equation references with yellow, ...
0
votes
0
answers
27
views
xcolor apparently considers only "Base" colors: no svgnames nor x11names [duplicate]
I have two Linux mint boxes.
The old one with texlive2019, while the new one (fresh install) with texlive 2022
Please consider this beamer mwe
%\documentclass[final, 10pt, xcolor={x11names}]{beamer}
\...
0
votes
0
answers
33
views
Wick contraction with color
I am trying to Wick contract the expression below.
Provided that the fields for a given contraction have the same color. A generic piece of code is given below.
\documentclass{article}
\usepackage{...
-1
votes
1
answer
61
views
How can I make this type of section heading? (Section font is Montserrat)
I want to have this type of section heading for my book.... Any suggestions how it can be achieved....
0
votes
2
answers
54
views
cell color in a table -- add legend somewhere under the table to explain the meaning
\documentclass{article}
\usepackage[table]{xcolor}
\begin{document}
\begin{table}
\caption{a table}
\begin{tabular}{c c c c c c}
\cellcolor{blue!=10} 1 & 2 & 3 & 4 & 5 & 6 \\
...
1
vote
2
answers
44
views
tabular: cellcolor fills only part of cell if makecell is used
\documentclass{article}
\usepackage[table]{xcolor}
\usepackage{makecell}
\begin{document}
\begin{tabular}{c c }
\cellcolor{blue!=10} \makecell{ 1 \\ 2} \\
\cellcolor{blue!=10} 10000 \\
\end{...
0
votes
1
answer
35
views
How can I color the right side of a page?
I need some help, I would create a book and I need to color the right side of a page, but I don't know how can I do
I need to make a gray line like this
0
votes
1
answer
34
views
How to mark fields and write next to them in arrays, without making it a new field?
I want to do this (at the "S")
but I have no idea how to do it without making it a new field and thus making new borders, my code looks like this:
\documentclass[a4paper,12p]{scrartcl}
\...
1
vote
1
answer
50
views
Customize math font (serif, color, etc.) in an environment
I'd like to define a math environment that behaves exactly like flalign*, except (1) the font is all red, and (2) the math is all rendered as if it were wrapped in \mathsf
I've tried:
\documentclass{...
3
votes
1
answer
33
views
xlop: color remainder of opidiv
I want to color the remainder of \opidiv with xlop using the code below, but all intermediary remainders are colored with the same color :(
Is there a way to only color the last remainder ?
Thank you.
...
3
votes
4
answers
102
views
how to make cellcolor not fill the cell completely
\documentclass[]{article}
\usepackage[utf8x]{inputenc}
\usepackage[english]{babel}
\usepackage[T1]{fontenc}
\usepackage{amsmath,amsthm,amsfonts,amssymb}
\usepackage{graphicx}
\usepackage{floatrow}
\...
3
votes
2
answers
86
views
Shaded area remains black
I am working on a course. In the problem set creation, the code worked well and I have the shaded area in gray with the R code in it.
This is the code that worked there:
\documentclass[]{book}
...
0
votes
1
answer
53
views
Problem passing a table as an argument to my class using the environment NiceTabularX and tabularray
I'm very used to come here often to debug my code and find solutions to my problem. But it's the first time i cannot find a solution to my exact problem or something i could adapt for my case. So here ...