Questions tagged [color]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
12 views

How to add a code in `\tcolorboxenvironment{definition}` to change the color of "Definition" black to red?

I want to change the color of "Definition" from black to red. For example, the "Definition 8.2.8 (stochastic processes)" is black. But I want to replace it by red color. My code ...
2
votes
0answers
31 views

Color an Example Image but Leave the Default Drab

This post asks for an extension of Werner's answer given in Color an example-image. Consider the following code: \documentclass{article} \usepackage{xcolor,graphicx} \usepackage{caption} % % % % % % %...
1
vote
2answers
17 views

Autocolor for italic and bold fonts in pandoc-template

I have started using pandoc to auto-generate PDFs from my .md-notes. This is working out so far, I succeeded to customize the font, background etc. For readability, I want all the italic parts as well ...
2
votes
1answer
32 views

How to use a Beamer Color as any other Named Color?

How can I use a Beamer Color, lets say the one given by \usebeamercolor[bg]{palette primary} as color name in order to be used in a \rowcolors command for example. In the following MWE I would like to ...
0
votes
0answers
35 views

Decolorizing an \Includegraphics Image -- Is This Possible with LaTex?

I am working on typesetting a book that has recently entered the public domain. It contains several pictures, all of which are in black and white. I have obtained all of them in B&W except two, ...
1
vote
0answers
45 views

Specifying Ahead of Time Both the Color of All Drop Caps and That Their Associated Text be Bold

Consider the code \documentclass{book} \usepackage{lettrine} \usepackage{xcolor} \setcounter{DefaultLines}{3} \setlength{\DefaultFindent}{0em} \setlength{\DefaultNindent}{.17em} \renewcommand{\...
2
votes
1answer
61 views

Modifying a Tex function definition to accept optional argument

So, I'm currently trying to modify a function someone else has made, but the function is written TeX, which I don't know the first thing about. I can't contact the original creator of the function to ...
0
votes
1answer
17 views

A problem with \convertdirectly and xcolor

I have been working with How do I get the hue, saturation and brightness values from a color? and have run across a problem. The very useful function \convertdirectly is defined (copied from https://...
1
vote
1answer
41 views

Color all \cref cleveref

I am unable to get this to work, I am trying to use, \creflabelformat{*}{\textcolor{darkred}{#1}} to color all labels or links with the same color however, this does not appear to work. \documentclass[...
0
votes
2answers
43 views

Latex hyperref: get colours AND small capitals

In \hypersetup, one can turn on/off the colours specified by linkcolor and citecolor with the help of the colorlinks option. One can also get small capitals style references by setting frenchlinks=...
-2
votes
2answers
61 views

Drawing 3D perpendicular rectangles in latex

Here is the picture I want to draw: I want to be able to change the yellow color also. also, not that the arrows are reversed on the grey rectangle Could someone help me in doing so please?
2
votes
1answer
39 views

Conflict between fancyhdr, truncate and xcolor packages

With this code: \documentclass[12pt,letterpaper,twoside,openright]{report} \usepackage{xcolor} \usepackage{fourier} \usepackage[fit, breakwords]{truncate} \usepackage{fancyhdr} \pagestyle{fancy} \...
0
votes
0answers
27 views

Chapter and section numbering style

I am writing a document in LaTeX and I would like to use exactly the numbering style as shown in the image attached to my message. Can anyone help me? Thank you.
1
vote
1answer
18 views

underline a specific hyper link

I would be happy if anyone can help me to color differently only one specific hyperlink, (preferably, without setting \hypersetup{}. Many thanks in advance. \documentclass{article} \usepackage{soul} ...
0
votes
0answers
15 views

How can I get this colored header? [duplicate]

I'm trying to get this kind of custom header (please see the screencast). The code I am using for my document is: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{times} \usepackage{...
1
vote
0answers
46 views

Package xcolor Error with classicthesis

I am writing my thesis using classicthesis but i've been getting the same error over and over. Package xcolor Error: Undefined color `CTtitle'. ... of the thermal conductivity}}{11}{part.2} Here's the ...
5
votes
3answers
172 views

Latex: use color without defining a new color

Is it possible to use a new color without defining a new color like \definecolor{mycolor}{HTML}{a65dbd}? It is indeed cumbersome to use when the color is used only once, and can easily lead to ...
1
vote
0answers
45 views

Question about coloring in latex

Hello from the following code \documentclass{article} \usepackage{xcolor} \usepackage{listings} \usepackage{float} \usepackage[a4paper,margin=1in,footskip=0.25in]{geometry} \colorlet{mygray}{black!30} ...
0
votes
0answers
45 views

Can somebody help me to make below tree diagram vertical?

\documentclass[12pt,border=10pt,multi,tikz,dvipsnames,svgnames,rgb]{article} \usepackage[edges]{forest} \usetikzlibrary{arrows.meta,shadows.blur} \usepackage[margin=1in]{geometry} \usepackage{amssymb, ...
3
votes
1answer
78 views

Increase thickness of a 'line' in text environment

I am using the following code to generate color line to use a legend of a graph: \documentclass{article} \usepackage{MnSymbol} \usepackage{graphicx} \usepackage{color,soul} \begin{document} \...
1
vote
1answer
74 views

Background color for all existing floats

I'm using this code to add background color to all floating elements: \makeatletter \def\foo#1\normalcolor\vbox\bgroup#2!!{% \def\@xfloat ##1[##2]{#1% \normalcolor \hbox\bgroup{\color{yellow}\...
0
votes
0answers
21 views

Color every line when hovering over multiline links

When using hyperref, I sometimes get long links split over several lines. The links work as expected no matter what line I choose to click, but the link background color changes for the current line ...
3
votes
1answer
67 views

tikz node color resets

I am having trouble with node colors resetting after specifying a color for a single word. I have the following MWE where I have the string 3\\ 4\\ 5\\ 6 in which I have specified that 4 be \red{} ...
0
votes
1answer
9 views

unwanted misalignment by setting own color for url with moderncv

I'm trying to build a cv with moderncv where everything is black except the urls. Therefore, after having tried other option (see commented lines), I want to manually set the color of the url locally. ...
1
vote
2answers
60 views

Background color for tikzpicture

I learned from this answer to put a background color behind existing floats without having to change the content of these existing floats. \documentclass{article} \makeatletter \def\foo#1\...
1
vote
1answer
42 views

change title color

I use this code to batch modify the title color of a large number of latex files \renewcommand{\title}[1]{\renewcommand{\@title}{\color{\@titlecolor}#1}} \newcommand{\@titlecolor}{black} \newcommand{\...
3
votes
3answers
50 views

Changing Part headings (color and font size)

I would like to change the color of my part headings to match the other headings (cyan); however, if I just add a line \setkomafont{part}{\color{cyan} The color of the title is modified but also the ...
1
vote
0answers
32 views

reledmac/reledpar does not work well with colors

I'm setting two texts beside each other in columns using reledmac/reledpar, the right column being a translation (that I'm correcting) of the left column. I'm using the changes package to annotate any ...
1
vote
1answer
52 views

How to modify the author's color through \renewcommand

I retrieved the method \renewcommand MakeTitle to set the color of the title. \makeatletter \renewcommand{\title}[1]{\renewcommand{\@title}{\color{\@titlecolor}#1}} \newcommand{\@titlecolor}{red} \...
3
votes
1answer
23 views

Border on subset of pages

I want a gray border on the outside edges of pages of specific chapters in a textbook to obtain the visual effect that looking at the closed text pages you can spot the relevant special chapters. ...
0
votes
2answers
77 views

Tcolorbox with different background color and table

everyone! I'm new to tcolorbox and I want to achieve something that I didn't think would take so much time without any results. Usually, documentation and googling gets me there. But, for this one I ...
0
votes
0answers
41 views

Generate ink texture effects in infill of characters in LaTeX

So I'm not really familiar with how the colours are rendered in LaTeX text, but I was wondering whether it might be feasible (or readily available, although I've looked for it unsuccessfully) to ...
0
votes
0answers
22 views

“Use of ... doesn't match its definition” error when trying to use the hyperref package (with xelatex)

I am getting the following error: ! Use of \HyColor@WithModel doesn't match its definition. \@ifnextchar ... \reserved@d =#1\def \reserved@a { #2}\def ...
1
vote
0answers
14 views

In beamer: how to change the color of itemiized bullet points inside alertblocks without changing the color of alerted text?

Consider the following LaTeX code for a simple beamer presentation. The code is saved in a file called presentation.tex. \documentclass{beamer} \begin{document} \begin{frame} \begin{...
3
votes
1answer
126 views

Changing a color of a link

\documentclass[a4paper,10pt]{article} \usepackage[T1]{fontenc} \usepackage{geometry} \geometry{left=2cm,right=2cm,top=1.5cm,bottom=1.5cm} \usepackage{pifont} \usepackage{sectsty} \usepackage{...
3
votes
2answers
113 views

How is this colored background text achieved? [duplicate]

I saw the following beautifully colored text for definitions, theorems, examples... in someone's notes. How do we achieve this in latex?
1
vote
0answers
75 views

How to make an array of colors?

\documentclass{book} \usepackage{xcolor} \usepackage[space]{ctex} \begin{document} \definecolorseries{mycolors}{rgb}{last}{red}{yellow} \resetcolorseries[5]{mycolors} \newcommand{\M}{\rule{6mm}{0mm}\...
0
votes
1answer
41 views

Error when using defining colour

Currently I am using beamer slides how ever I found the template where I am understanding how we can write fonts with different colour but to define colour I have used the codes like this \newcommand\...
2
votes
3answers
70 views

Define Another Command Like Aboxed but with a Different Colorbox

The following commands define Aboxed but with a yellow coloured box. \def\@Aboxed#1&#2&#3\ENDDNE{% \ifnum0=`{}\fi \setbox \z@ \hbox{$\displaystyle#1{}\m@th$\kern\fboxsep \kern\fboxrule }%...
1
vote
0answers
24 views

How can you add borders to internal links whilst having urls and citation numbers coloured?

I'm using the hyperref package to colour my labels, citations and urls. Initially I had borders around the urls but I started used hypersetup because I wanted to remove the boxes and give the urls ...
1
vote
1answer
31 views

Enumitem: next line to be colored using macro or command

Consider the following code: \documentclass[a4paper,10pt]{memoir} \usepackage{enumitem} \usepackage{lipsum} \usepackage{xcolor} \begin{document} \chapter{Chapter1} \section{Section1.1} \lipsum[1] \...
3
votes
1answer
272 views

How to reset alternating row colors using xcolor and longtable?

I am attempting to automate alternating row colors in a longtable environment. My rows alternate between gray and white, and the alternating persists across pagebreaks. My issue is that I would like ...
1
vote
1answer
21 views

weird placement of sub-index when color is used [duplicate]

Could anyone explain why the sub-indexes were placed not at their correct positions when color is used? With some further experiments I found that the problem can be fixed by surrounding the sub-...
0
votes
0answers
24 views

Modify output of contour polar plot from input data

I have used @BambOo's answer to this question to generate a contour polar plot in tikz. I have updated the data file. The example code works for my data and generates the following output: I have the ...
1
vote
1answer
66 views

How to avoid color gradient in table cell that is split in 2 colors?

I adapted a solution from post Multi-colored cell background using Overleaf. The code I use is the following: %%% This code comes from https://tex.stackexchange.com/questions/348933/multi-colored-cell-...
1
vote
1answer
39 views

Is there LaTeX code to convert % based rgb to 0-255 based RGB color codes?

I have hundreds of mixed color definitions in my project that use three different color coding styles, e.g. (% based) rgb, (0-255 based) RGB, and (FFFFFF) HTML : \definecolor{lemon}{rgb}{1.0, 0.97, 0....
4
votes
1answer
67 views

Simple question about drawing the real line using tikz

I have never drawn anything of LateX before, and I would like to represent intervals of the form [x,x'], with both x,x' real numbers, as I show below. I have 0 experience with tikz and altough I've ...
0
votes
0answers
58 views

How to color cell in overleaf?

I'm using this table generator and I generated this table: Generator gave me code: % Please add the following required packages to your document preamble: % \usepackage[table,xcdraw]{xcolor} % If you ...
0
votes
2answers
33 views

How to define an environment with appointed color background?

I want to define an environment with appointed color, that is to say the whole environment from the \begin{env} to \end{env} will be drawed by the color. Just like a code block. Roughly, this is waht ...
1
vote
1answer
16 views

Customize Color1 in moderncv

I tried to look at some suggested solutions from previous answers to redefine color1 with the command: \definecolor{color1}{rgb}{0.67, 0.76, 0.152}% Dark Blue The color I want is (Hex: #434C98 , RGB: ...

1
2 3 4 5
76