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

learn more… | top users | synonyms (1)

1
vote
1answer
84 views

How do I change the link colour in the table of contents?

I am currently adapting my employer's PowerPoint slides to beamer. I am struggling with the font colour on the table of contents slide. Unfortunately, the colour does not show on the slide but ...
17
votes
2answers
587 views

Tikz: Draw a RGB cube

I am trying to draw a RGB cube using Tikz. Until now I managed to create this cube with color gradients: \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{3d} \usetikzlibrary{shadings} ...
1
vote
2answers
52 views

Table: colored row not aligned with toprule

I am creating a table with colored rows. The problem is that the colored strip is not aligned with the top rule, as shown in figure. How can I solve it? Thank you. ...
2
votes
1answer
68 views

CMKY code for xcolor package?

I have three mdframed environments in my document. \begin{mdframed}[backgroundcolor=blue!20] \begin{mdframed}[backgroundcolor=purple!20] \begin{mdframed}[backgroundcolor=brown!20] Using the ...
2
votes
2answers
58 views

How to produce theorems in which the color of heading and body of the theorem my differ?

I have tried the following code, \documentclass{article} \usepackage{amsthm,amssymb,xcolor} \theoremstyle{plain} \newtheorem{thm}{Theorem} \begin{document} ...
5
votes
1answer
197 views

How to achieve equal colors for a marker's filling and edge?

Consider the following example from the pgfplots manual p. 164: \documentclass{article} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[tiny] ...
2
votes
1answer
58 views

Using background color in AMSmath

I'm using \(\frac{\colorbox{yellow}{a-b}}{c-d}\) to highlight numerator only. But (as suggested in this post) how do we use \colorbox{<color>}{\(<math content>\)} format to achieve the ...
2
votes
0answers
28 views

Using Listings Package: the Colour of the Text After the Listing is the same as that of the Identifiers Inside the Listing

So I have some LaTeX which looks like \usepackage{graphicx,bm,times, hyperref, amsmath, listings, xcolor, enumitem} \lstset{language = C++} \lstdefinestyle{customcpp}{ ...
10
votes
2answers
370 views

Watercolor like shadow in TikZ

How to create watercolor-like "shadow" to highlight some node on figure, like in image below? Note that I don't need for coloring to fill a shape, nor do I need for it to have variable intensity, nor ...
0
votes
1answer
41 views

Problem with lstlisting. Add color

if I do this: \lstdefinelanguage{VHDL}{ morekeywords={ library,use,all,entity,IN,is,port,in,out,end,architecture,of, begin,and,END,THEN,ELSEIF,WHEN,IF,ELSE,EVENT,IS }, ...
0
votes
1answer
83 views

Nice tables in beamer presentation

I liked the approach shown here. beautiful tables in latex. But when I use it in beamer class, tabularx conflicts with xcolor. What is the solution?
2
votes
1answer
58 views

Filling a color

I am having two problems with inserting an image into a mdframed environment. Both are documented in the attached picture. Firstly the lines of text preceding and immediately after the inserted ...
5
votes
2answers
174 views

rectangular zones with heat map

I am trying to generate a sort of heat map. I have a set of zones (rectangles) and each of these zones has a given density. I want to color now these zones according to a predefined heatmap and maybe ...
2
votes
1answer
115 views

different colors in xlabel (tikz latex pgfplot)

I would like to change the color of a part of my x label in my pgf plot. \begin{figure}[h!] \begin{tikzpicture} \begin{axis}[xtick pos=left,legend pos=south east, xlabel style={yshift=-0.5cm}, xlabel ...
5
votes
1answer
126 views

Using different colors for different keywords in lstlisting

I've looked through a few answers on here, and either they don't work or don't fully answer my question. I have to format some C++ code and I want it to have these colors for these specific keywords ...
3
votes
1answer
74 views

Is it possible to change the box rule thickness of algorithm2e

Is it possible to customize the boxing rule width and color of an algorithm2e float? \documentclass{article} \usepackage{algorithm2e} \begin{document} % \RestyleAlgo{boxed} \RestyleAlgo{boxruled} ...
2
votes
1answer
75 views

!LaTeX Error: Undefined color 'orange'

I have a problem with the following code: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[czech]{babel} \usepackage{listings} \usepackage{color} \begin{document} \uv{Tento text je v ...
0
votes
1answer
37 views

Changing color on advanced bar chart (pgfplotstable)

I have made a stacked and clustered diagram, based on this brilliant answer: http://tex.stackexchange.com/a/55559/93892. However, I would like to change the colors of the bars. The most important ...
5
votes
1answer
53 views

make soul highlight span lines

The \hl command from the soul package highlights spans of text with a backround color when color is loaded. When used on longer spans of text, some inter-line spacing remains uncolored, which is ...
0
votes
0answers
28 views

Change the color of a PART text of name in \section (\subsection or etc.) [duplicate]

In the example, I used \subsection[sub-section {\color{green}1.1}]{sub-section {\color{green}1.1}} to change the color of a part of text 1.1 to green, which didn't work. I used \color for ...
2
votes
1answer
91 views

is it possible to display color only in PDF viewer, not printed page?

The ocgcolorlinks option to hyperref will let you have colorful links on the screen that are black (or more generally, the textcolor) when printed. Is there a way to have coloured hyperref ...
3
votes
0answers
41 views

Color a subset of digits in SIUNITX

I am writing a presentation with Beamer, where I show the benchmarks of a program I wrote. This involve comparing a lot of number coming from different sources. These numbers can differ only in the ...
4
votes
1answer
45 views

Padding Issue when Coloring Cells of the Latex Table individually

I created the following latex table in booktabs style and colored each cell with a different colour. But in the end, I saw some padding which is not coloured because of the different size of the ...
3
votes
2answers
156 views

Changing color in mathmode in LyX

I know there are \color and \textcolor commands for changing colors in mathmode. However, these commands have two arguments, so when I enter them in LyX, the first argument "swallows" the command and ...
0
votes
2answers
45 views

How do I reference a template colour in beamer?

Say I want to draw a beamercolorbox and have it be coloured with the colour used for block body alerted.bg. How can I do this? I read this question, but it turned out to be unhelpful. I need to ...
1
vote
1answer
74 views

Colored box just around the text

I want to have a rounded box with black border lines and a backgroundcolor, f.e. yellow just around the text, not around the whole line, so the sentence should just continue on the same line. I found ...
2
votes
1answer
73 views

Two-color background

I am creating a poster using Latex and would like to split the background into two parts. Then I was wondering how we can create a background that is two-colored. For example, upper part is red and ...
0
votes
0answers
18 views

Beamer - Change section in head/foot text color [duplicate]

I'm trying to change the font color of the section (shaded and not shaded) using Berlin theme. As far as I know to do so the code should be something like: \setbeamercolor{section in head/foot ...
2
votes
1answer
40 views

\lstinline: color of “#pragma”

I am trying to use \lstinline but it does not work as expected: \documentclass{scrreprt} \usepackage{color, listings} \lstset { language=C, keywordstyle=\color{blue}, } ...
2
votes
1answer
60 views

Transparency inside empheq (color box)

I'm currently writing a formulary for dynamics and searched for a way to box important equations and have them coloured. The answer to my problem was the empheq package - for now. Now I'm facing the ...
1
vote
0answers
57 views

How to color numbers in certain parts of a lstlisting

So, I'm a student and my teacher posted this kind of "how to make XML look cool in LaTeX". We were using it in class but I noticed some errors. For example, when printing numbers inside the labels ...
5
votes
1answer
107 views

Simpler way to add color to equations in math mode?

I was looking for a simpler way to add color to math mode. Specifically, I wanted different parts of an equation to have different colors in order to better correlate with colors in a figure. The ...
0
votes
0answers
26 views

Beamer: cause text to behave as background?

I am creating a slide which starts off with some text; that text will be first in black, then in a light gray for background. Here is my MWE (well, it's a MNE: minumum non-working example): ...
2
votes
1answer
41 views

Alternating coloured rows in table - line width of colouring -

I'm creating a table with alternating coloured rows. However, the colour seems to extend the top- bottom rule of the table, which doesn't look quite right. Also, my header row probably should be a ...
3
votes
1answer
158 views

Draw a class diagramm in black and white

I want to draw a class diagramm (and later on other diagramms) in black and white using LaTeX and Tikz-uml as the default color is a kind of yellow. Is there an easy parameter to attach to the ...
0
votes
0answers
27 views

Beamer puts table borders in weird places with color

I have a table that I would like to alternate the colors on to make it look nicer. My code is as such... \begin{table}[!ht] \centering \adjustbox{max height=\dimexpr\textheight-5.5cm\relax, ...
4
votes
2answers
51 views

Get red green and blue channels of a defined color

In LaTeX one can define colors with the command: \definecolor{somecolor}{RGB}{0,42,14} I was wondering if it is possible to obtain the value for the red, green and blue channels for a given color, ...
2
votes
0answers
57 views

tabularnewline incompatible with rowcolors

I have a huge table I am editing with LyX I tried to use rowcolors to have alternate row colors but it does not work This looks like to depend on the use of \tabularnewline instead of \\ The ...
3
votes
2answers
89 views

Duplicating MS-built Table Formatting in LaTeX

I have a table made in MS Office and I'd like to recreate it using LaTeX. I've attempted a number of solutions using Table+Tabular (using this as a template); this has worked until I try to ...
4
votes
2answers
168 views

Tikz: How to indicate/display overlapping lines

I have the following simple picture: Is there a way to better illustrate the small overlapping interall of LS and LD? I know I could define this area by another line for example and use different ...
2
votes
1answer
124 views

How to fill gantt chart bar with arbitrary color

In the code below I would just like to manually decide to fill the second bar in the chart with a color or hash it! I want to be able to decide which bars to make these changes on a case by case ...
2
votes
1answer
39 views

PGFPlots cycle list skips first definition after every cycle

I got some problems with self-created cycle lists in PGFPlots. As you can see, the plots skip the first definition of my cycle list after every run through the cycle list. Are there any coding ...
4
votes
2answers
119 views

xcolor - What is the equivalent of default text color?

I would like the xcolor color that is equivalent to the default text color in LaTeX. Is this simply black? Or is it some (slightly lighter) shade of grey? Perhaps surprising, I'm having trouble ...
2
votes
2answers
63 views

Is there a possibility to colorize the pdf bookmarks in the sidebar of acrobat reader

I want to colorize my bookmarks in this way. Is there any chance to do this with the hyperref package? Thanks.
1
vote
1answer
144 views

Change cite color to blue in the Legrand Orange Book template

In the code below, that was derived from the Legrand Orange Book template, I wanted to be able to change the cite color. However, when I activated the colorlinks=true, the table of contents (TOC) got ...
1
vote
0answers
72 views

Change the color of the main title without redefining \maketitle

I'm looking for a way to change the color of the main title of a document without redefining the \maketitle. A google search only yields how to systematically change the section titles that does not ...
4
votes
2answers
260 views

plus-minus (\pm) in different colors

I'm trying to get the plus-minus sign (\pm) in different colors. I started with \newcommand{\rgpm}{~\overset{\mathbf{\displaystyle\color{green}+}} and probably could further adjust it with some ...
5
votes
1answer
104 views

Two problems with decimal alignment in tables: null entries and changing color

Output table from the MWE: Problems: 1) When the color of the numeric values are changed we also want the color of the decimal point to change. 2) We want the null entry (last entry in column 1) ...
1
vote
1answer
25 views

Decimal number coloring give unwanted space in lstlisting

I'm trying to set coloring for decimal numbers in lstlisting. Here is my code: \documentclass[border=2pt]{standalone} \usepackage{listings} \usepackage{color} \definecolor{codeblue}{rgb}{0,0,1} ...
2
votes
1answer
60 views

How to not override string style by literate in lstlisting?

I'm trying to do color code listing for java. I use this definition: \usepackage{listings} \usepackage{color} \definecolor{codeviolet}{rgb}{0.65,0.11,0.36} \definecolor{codeblue}{rgb}{0.1,0.21,0.57} ...