Questions tagged [color]
{color} is about using color in (La)TeX documents. Popular packages are color and xcolor.
3,898
questions
3
votes
2
answers
103
views
Is there a (better) way to repeatedly toggle between two font colors within a paracol environment, and compiling with XeTeX?
\documentclass{article}
\usepackage{xeCJK}
\usepackage{xcolor}
\colorlet{color1}{blue!50!black}
\colorlet{color2}{green!50!black}
\usepackage{etoolbox}
\newtoggle{col}
\providecommand{\tog}%
{%...
0
votes
1
answer
22
views
Colormap list options in pgfplots
I'm trying to draw a room illuminated by a light, so I reached this far, but I don't know what are my options for the colormap
\documentclass[border=0.2cm]{standalone}
\usepackage{pgfplots}
\...
1
vote
0
answers
25
views
Coloring defined submolecule
What is the right way to color a submolecule defined by \definesubmol?
MWE
\documentclass[12pt]{article}
\usepackage{float}
\usepackage{chemfig}
\usepackage{chemmacros}
\chemsetup{
modules ...
-1
votes
1
answer
31
views
2 lines intersecting at the origin
How can I draw these colored pictures in Latex?
I am not caring about the thickness of the coloured lines in both pictures, ordinary thickness is fine. Also the letter below the first figure is $\...
0
votes
0
answers
16
views
lstlisting color formatting constructor of a class (C++ style code)
I'm trying to color format the constructor of a class, so that the color of the class name, which has the same name as the class function (constructor) is different to the color of the class function (...
1
vote
2
answers
53
views
Colorizing a Norman Window Image Embedded in a Pspicture
This post is an extension of How to Crop an Image Precisely in the Shape of a Norman Window
Consider the code which embeds an image of a Norman Window inside a pspicture:
\documentclass{book}
\...
6
votes
1
answer
96
views
How to Draw a Colorized Isoceles Trapezoid within a Pspicture
The pspicture
comes from the code
\documentclass[12pt]{book}
\textheight=8.75in
\usepackage{xcolor,pstricks}
\begin{document}
\thispagestyle{empty}
\begin{pspicture}(-4,-4)(4,8)%
\psframe[fillcolor=...
0
votes
1
answer
17
views
tcbset error with optional color arguments and `attach boxed title`
i'm having a issue with tcolorbox involving tcbset, newtcbtheorem, optional color arguments and attach boxed title to .... The error is the following :
Package xcolor Error: Undefined color `visible'.
...
0
votes
3
answers
101
views
How can I have two different background colors in one tcolorbox title?
Basically, I am defining a tcolorbox and I want the title of the box to be of the form "Example X.XX Name of the example", with "Example X.XX" having a colored background and "...
0
votes
0
answers
17
views
Suppress xcolor warning in ieee template with silence package
I was using todonotes package with ieeeaccess.cls, and kept getting weird errors. So, I followed this guide to fix this issue.
This answer works fine, but it leaves some warnings like this:
Package ...
2
votes
0
answers
64
views
What Causes These Two Different Shades of the Same Color?
Consider the code
\documentclass[a5paper,12pt,onecolumn,openany,final]{book}
\usepackage[hmargin=0.7in,vmargin=0.75in]{geometry}
\usepackage{xcolor}
\usepackage{pstricks,psvectorian}
\definecolor{...
0
votes
0
answers
58
views
hyperref error in case some class option is given at load time
In the MCE below, everything works as expected:
\begin{filecontents}[overwrite]{myclass.cls}
\ProvidesExplClass{myclass}{2022-06-15}{0.1}{Class of mine}
\NeedsTeXFormat{LaTeX2e}
\LoadClass { article } ...
1
vote
1
answer
21
views
Lyx change the color of Math panel
is there a way for me to change the color (the blue part of the img below) of the math panel? My lyx is in dark-mode which I like. The only my un-satisfaction is coming from the blue part. I would ...
0
votes
1
answer
85
views
How can I add a custom color to every page header
Here is a typical page from my notes
I would like to add a side coloring unique to every section. For example, for the 3rd section I want to have a blue colour as
Ideally I would also want to be ...
0
votes
1
answer
25
views
Why is some vertical space added around text in a tcolorbox while textcolor or itemize are active?
If I remove the textcolor specification (and the corresponding 2 curly braces), the useless space around "someItem" disappears.
If I replace the "\begin{itemize} ... \end{itemize}" ...
0
votes
1
answer
24
views
How to change the color of a single X axis value in a tikzpicture
I want the symbolic x axis value a4 in red. How do I do this?
Here is my MWE:
\documentclass{article}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\usepgfplotslibrary{fillbetween}
\usepackage{...
2
votes
1
answer
100
views
Changing the Color of the Letter in a Goudy Initialen Lettrine
MWE:
\documentclass{book}
\usepackage{lettrine}
\usepackage{xcolor}
\input GoudyIn.fd
\newcommand*\initfamily{\usefont{U}{GoudyIn}{xl}{n}}
\begin{document}
\thispagestyle{empty}
\LARGE
\lettrine[...
1
vote
2
answers
33
views
How to use colored text in HTML or RGB notation without defining a color? [duplicate]
To write a colored text the syntax is
\textcolor{cornflowerblue}{my cornflowerblue text}
where cornflowerblue is previously defined in the preamble as
\definecolor{cornflowerblue}{rgb}{0.39, 0.58, 0....
0
votes
1
answer
44
views
How to make the opening and closing quotation-marks look bigger in quotes?
I am currently writing a paper that includes quotes. But I am not satisfied with the obtained result; I want to make the quotes look more attractive. To do so, the idea is to make them appear bigger ...
1
vote
2
answers
45
views
Trouble aligning a Rightarrow in a forest environment
I am trying to draw two forest and I've been able to. What I'd like to add now is a Equivalence arrow (\Leftrightarrow) in the middle of those, but well aligned.
Currently I have the following code:
\...
3
votes
2
answers
268
views
Why is a page number lower if I specify a color on it?
In this MWE, if I replace the fancyfoot line with the next one (with color{black}), the page number goes lower (and is even cut).
Why is there a difference between the two versions?
I would expect ...
7
votes
1
answer
293
views
Making an Image into a Lettrine
In the MWE
\documentclass{book}
\usepackage{lettrine}
\usepackage{graphicx,lipsum}
\setlength{\textwidth}{12cm}
%\renewcommand{\LettrineTextFont}{\normalfont}
\begin{document}
\thispagestyle{empty}
\...
0
votes
1
answer
49
views
Setting text color dependent on the background color
I make handouts/slides for my students. I like to produce three different versions of these
Solutions mode - Contains my solutions (usually in blue).
Student mode - Solutions are hidden.
Darkmode - ...
4
votes
3
answers
255
views
How to Automatically Overlay a Title of a Different Color onto Itself
I would like to be able to overlay a title of one color onto the same title of a different color to achieve a different effect; and I would like, if possible, to do this automatically without creating ...
0
votes
1
answer
37
views
Keeping the Track of the AnnotatedEquation color
I'm following this question to give annotation in my equation. What my plan is to keep the track of the color of certain equation segment, so it can be understood easily.
If you see the two equation, ...
0
votes
0
answers
16
views
Color of highlighting of search result in Texshop
I am using the ogrekit find in Texshop on a mac.
When TeXShop finds a string, the string is highlighted in grey,
which is difficult to see in dark mode (with a background in black).
How can I change ...
0
votes
1
answer
27
views
Classicthesis color not showing
In the classicthesis package, when I change the color from Maroon to ForestGreen, I get the following error: package xcolor Error: Undefined color 'ForestGreen' and the text is black. I would like the ...
1
vote
1
answer
35
views
Colorcells and Rowcolor in spreadtab
I wonder how to add some colorcell, rowcolor and so on in this type of table
\documentclass[a4paper,14pt]{extreport}
\usepackage{spreadtab}
\begin{document}
\begin{spreadtab}{{tabular}{|c|c|c|...
0
votes
1
answer
28
views
Remove vertical space above list in cell with color
When a list is the first item in a cell, it has a big vertical space above. In order to remove this space, classical answers are based on inserting \@minipagetrue before the list.
Unfortunately, this ...
1
vote
0
answers
59
views
How to create an array of colors? [closed]
I am trying to pass an array of colors (of any length) into a macro command to then be used when filling the background of tikz shapes. I've been successful, however, I ran into an issue with the none ...
2
votes
2
answers
39
views
Changing only one property of font globally for all tikz pictures but keeping other locally set properties of font
I am writing a thesis with many plots. I would like to be able to change one property for all plots globally. In my example I try to change the size of the font of the ylabels of all plots, but I ...
0
votes
0
answers
59
views
Box diagram with latex
Any idea of how can I create something like this?
1
vote
1
answer
27
views
Test if Current Color is Black (with line breaks)
This is a question that arose from this post, where the original poster defined the macro \TypsetInBlueOnlyIfCurrentColorIsBlack; it changes the color of text to blue only if the current color is ...
0
votes
1
answer
51
views
Can't colour the right rows table
I have made a table with a table generator. I want the two first rows to be white, the following row to be grey and white intermittently.
This is the code I generated:
Preamble:
(long since this is a ...
0
votes
1
answer
35
views
How to change the text colour in Latex within the environment \copyrightbox?
I would like to use the same text colour in my document. For some reason, the text within the \copyrightbox environment has a light grey text color and is not just black as in the text and table. How ...
0
votes
1
answer
77
views
Smooth curve with tikz
This graph shows the effect of catalysts on activation energy
\documentclass[12pt]{article}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[full]{textcomp}
\usepackage[greek,italian]{babel}
\...
1
vote
2
answers
54
views
Colored and inclined boxes
I would like to get the following colored boxes so that they are also slightly inclined. Here is a picture of what it should look like
Can someone tell me how to do this with latex? Which packages do ...
0
votes
0
answers
25
views
Colorbox Text Format
I have been using LaTeX Overleaf (overleaf.com) for nearly one year now. I need to highlight some things, so I used the xcolor package. But then, my text became a bit weirdly formatted, so I had to ...
1
vote
0
answers
35
views
Strange behaviour with alert in mathmode
I got this unexpected behaviour when I change colour to alerted text in mathmode. In particular, alerted text.fg seems to change only when \alert is called again. Changing with \colorlet affect only ...
2
votes
1
answer
64
views
Drawing a color swatch/palette for CMYK
Background
I wish to create a LaTeX version of a color palette similar to the one found here: https://codepen.io/devi8/pen/nJMGZR. It looks like this:
I have managed to find code to build on, but I ...
0
votes
0
answers
30
views
CMYK values of default colors
In my document, I tried to make everything in cmyk color. The problem is the red, I defined it using CMYK (0,1,1,0) which is supposed to be the true red. Turn out that I actually like the default red. ...
0
votes
0
answers
36
views
LaTeX table cell coloring based on values in the cell (3 color scale formatting)
I wanted to imitate the functionality in excel of 3-Scale grading formatting, which changes the background of a table cell based on its value.
I wanted each cell to have a percentage value, and each ...
1
vote
1
answer
62
views
Conflict between \pagestyle{fancy} and xcolor package
\documentclass{article}
\usepackage{xcolor,fancyhdr}
\pagestyle{fancy}
% This line causes error message "Package xcolor Error: Undefined color `RED'".
% If this line is removed, or replaced ...
0
votes
2
answers
34
views
How can I change the color of an adforn ornament?
How can I change the color of an adforn ornament ?
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{adforn}
\begin{document}
\adforn{21}
\end{document}
0
votes
1
answer
41
views
How to change color of searched text in TexStudio
Currently, the searched texts in the Windowed viewer (pdf file) in TexStudio are displayed in light yellow which is hard to see. I wonder how to change the color (to darker color) for searched texts ...
1
vote
1
answer
85
views
How to customize plot color using xcolor?
I am trying to plot multiple data sources on the same plot and differentiate between them with color. Here is a minimal environment for replicating the errors I am getting.
\documentclass[a4paper,12pt,...
1
vote
1
answer
49
views
How to Eliminate an Unseemly Seam in a Psvectorian bi-Colored Pspicture
In the following code, I am trying to color the LHS of a psipicture blue and the RHS yellow; however, an "unseemly" seam appears down the middle of the picture.
\documentclass[12pt]{book}
\...
1
vote
0
answers
48
views
Ideas for color blind friendly presentation
I'm creating a beamer presentation and would like to highlight some concepts using color, but still be friendly to all color blindness flavors. I do not want to be restricted to colors that are ...
2
votes
0
answers
32
views
Changing the color of numbers and special words in listings for a Python snippet
I'm using the listings package to write a report where I report some code in Python that I used. I am not very familiar with listings and am having several problems. Specifically:
I would like to ...
0
votes
2
answers
73
views
PGFPlot scatter plot with random color and legend
I want to draw a PGFplot where every point has a separate legend entry and a random color. So far I have just one legend entry and everything is black:
\begin{tikzpicture}
\pgfplotsset{
scale ...