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

learn more… | top users | synonyms (1)

5
votes
1answer
196 views

Drawing a box with shading in pgfplots

As a follow-up to this question, or more precisely this answer, I'd like to know how to do the equivalent of \shadedraw [shading=axis,left color=green,right color=orange,color=blue,line width=2] ...
7
votes
1answer
200 views

How do I evenly fill the background color of a block of elements inside a TikZ matrix?

When I fill each element separately of the blocks that I want to highlight, the PDF output shows very small white spaces in between the backgrounds of the separate matrix elements inside the ...
2
votes
0answers
148 views

How to highlight words or sentences? [duplicate]

I would like to create something similar to . To begin with, I would like to create a rounded and background-colored highlight of a word (or a short series of words). What package should I use ? ...
7
votes
1answer
135 views

MetaPost: Randomly generated number, distinct from previously generated number

Overview Looking to create random page background colours where the same background colour never appears more than once in succession (i.e., red, green, blue, green, blue, red, etc. -- never red, ...
8
votes
1answer
233 views

How do I force tikz to use CMYK everywhere (also in shadings)?

I'm doing a poster with the baposter which uses tikz and at some point realized that some colors that should be identical are not. It turns out that tikz apparently resorts to RGB color space as soon ...
3
votes
0answers
115 views

tikzipicture have different arrow tip colors in pdf output and dvi output

i have the following mwe \documentclass[tikz,border=4pt]{standalone} \usetikzlibrary{arrows} \begin{document} \begin{tikzpicture}[->,>=angle 45,scale=3,ultra thick] \draw[help lines] ...
4
votes
1answer
3k views

Changing background color of text in Latex

How can I make change a text background in LaTeX? For example using Latex code \textsc{Extra Curricular Achievements}\\ I get However, I want the background of this heading to be changed so that ...
3
votes
1answer
408 views

Colour themes in beamer not working for lemma/theorem/definition environments

I'm currently trying to learn how to use beamer, and I have a presentation in a few days on red-black trees. For thematic reasons, I decided to go with the beaver colour scheme (as it gives me red and ...
8
votes
1answer
147 views

MetaPost: Adjust colour value (brightness/luminosity)

Background In MetaPost, colours can be lightened or darkened by calling the transparency function. However, this allows other colours to show through, which isn't necessarily desirable all the time. ...
5
votes
1answer
90 views

ConTeXt: Randomly lighten or darken a colour within a threshold

Overview Looking to randomize the colours of squares of a checkerboard so that some are slightly lighter and some are slightly darker, relative to another colour. Problem The following sets a base ...
1
vote
1answer
330 views

Beamer - Transparent footline?

I am using a picture as a background for beamer slides. I would like to have my name and page numbers at the bottom of the slide. I do not like the bottom bar to cover the background image. Is it ...
3
votes
1answer
117 views

How to give color and style to one table in lyx

I have been trying to do something like this in Lyx. As you can see is a very simple style that I been trying to reproduce but without any success. I know there are to many questions related to ...
2
votes
3answers
153 views

why my pictures in a beamer template are grey [closed]

I am using the theme in http://melmorabity.fedorapeople.org/latex/beamer/old/beamer-goddard/beamer-goddard-0.1.tar.bz2 My problem is when I insert a picture, my picture colors are all grey, I would ...
6
votes
1answer
122 views

Defining font color inside highlight fails

Since I wanted a better readability of highlights of a would be black & white-printed document, I needed to change both the highlighting color (gray) AND the font color (white). Depending which ...
8
votes
2answers
279 views

Drawing a square with colored hatched little subsquares

I would like to draw a as shown below. It is a square grid. Some regions are hatched in blue, others contain a red cross. Some edges are blue, others are red, but the red color don't reach the ...
5
votes
1answer
178 views

Add background pattern to tikzpicture vertical bars

How do I replace the blue backgrounds as indicated in the picture with a diagonal and grid pattern respectively? I currently can't find a neat solution for my kind of graph. Code ...
9
votes
1answer
237 views

PDF Colour Space and ConTeXt

Background Trying to create a PDF that includes a vectorized cover page having transparent colours. I would like the PDF to have the same appearance in Acrobat Reader, Firefox PDF Viewer, Foxit ...
11
votes
0answers
96 views

Text collage (word cloud) in LaTeX? [duplicate]

There are some automatic method (package, class, macro) in LaTeX to do a text collage similar to that showed in the image? If not, is would be possible without too much manual work?. The ...
3
votes
0answers
37 views

Pgfplots bar chart - One plot, different colors [duplicate]

Is there a possibility to color bars of one plot in different colors? \begin{tikzpicture} \begin{axis}[ xbar, xmin=0, width=12cm, height=3.5cm, enlarge y limits=0.5, xlabel={\#participants}, ...
3
votes
2answers
419 views

Underline and color URL in LuaLaTex

I was wondering how I can underline and color URL in LuaLaTex. I was able to add underline but could not change the URL and the underline to blue. Font is Calibri. Thanks! % code used in LuaLaTex ...
5
votes
2answers
210 views

How to color certain commands/environments?

My goal is to achieve colorings in the output document, that are similar to the syntax highlighting I use in my editor, so switching between the editing and viewing the document becomes easier on the ...
8
votes
1answer
125 views

How to change color of menukeys?

I cannot understand how to change the colors of the text in the menus typeset using menukeys. A minimal example (taken from the menukeys manual) follows: \documentclass[12pt]{article} ...
3
votes
2answers
108 views

newenviroment error: Extra }, or forgotten \endgroup \begin{gbox}

\noindent \colorbox{gray!25}{ \begin{minipage}{\textwidth} \vskip0.5cm \leftskip0.5cm \rightskip0.5cm Text Here! \\\end{minipage}} Code above works fine, but I don't ...
1
vote
1answer
810 views

Change line color and thickness and line spacing

I am new to LaTeX and I am creating a resume. I have added a black line. 1)However, I would like to know how to specify a color and line thickness for this line? 2) I would like to know how to ...
2
votes
1answer
130 views

Conflict between glossaries and siunitx (possibly via hyperref) when defining color

I'm in the process of writing my thesis which has a large glossary. The hyperref and glossaries package allow for linking and colouring the references, which is great. Unfortunately the large number ...
1
vote
1answer
131 views

Changing align environment tag styles and colors [duplicate]

I'm using amsmath and amsfonts to typeset my homework, and since it will be read on a screen, I would like to make \tag{comments inside equations} differently colored, and optimally downsize them by a ...
4
votes
1answer
75 views

Specify color of the first row in table (in “newenvironment”)

I am using an specific style for my tabulars and I am looking to specify automatically the color of the text in the first row. Currently I must specify manually the color of the text of each cell in ...
8
votes
1answer
263 views

Need some help getting started with TikZ, groupplots and color mapping of matrix

I used Python to make the plot shown below (saved as png). It should have a common colorbar and all data is read from a h5 file, but I thought saving it to a txt file or something using a Python ...
3
votes
0answers
37 views

Matching cmyk colors in plot to LaTeX [duplicate]

I'm plotting something using the Python package matplotlib and I'm using the matplotlib.cm.rainbow colormap. I need to match the same colors in my LaTeX document, but I'm having a difficult time ...
5
votes
1answer
2k views

Beamer how to change color of infolines and frame title

How could I change the color of color of infolines and frame title in beamer. I am using this now \documentclass[xcolor=dvipsnames]{beamer} \usetheme{CambridgeUS} \useinnertheme{rectangles} ...
5
votes
1answer
268 views

How to match cmyk colors between matplotlib and LaTeX

I'm plotting something using matplotlib and I'm using the matplotlib.cm.rainbow colormap. I need to match the same colors in my LaTeX document, but I'm having a difficult time making the colors match ...
5
votes
1answer
461 views

Change the color of background of code of Matlab

I use the following code in LaTeX to input the code Matlab there but I want to change the color of the background: \usepackage{textcomp} \usepackage{listings} \lstdefinestyle{customc}{ ...
7
votes
1answer
977 views

Beamer: changing background color leaves white lines above and below title

It must be simple but I don't find the last missing bit. I'm making a beamer presentation where I want single slides with a different background color. However, when I set the background color using ...
2
votes
2answers
107 views

Variable parameters in xcolor package

This doesn't work and I'm having trouble thinking of a minimum working example, but I'd like to do something like this where I have a parameter to a command as a variable: \usepackage{xcolor} ...
8
votes
3answers
317 views

How do I create unadorned color bars without a plot?

I want to create color bars of the type used by Kenneth Moreland in his excellent paper, "Diverging Color Maps for Scientific Visualization". They are unadorned and look like this: Any idea how he ...
6
votes
1answer
77 views

Color package interferes with sections

I would like to use the color package to define custom color for listings background but when I include it it creates nasty side effect on my numbered section headers (only section, not lower levels). ...
9
votes
2answers
114 views

How to use \pdfcolorstack?

Consider this code: \chardef\Color=\pdfcolorstackinit page direct{0 g} \pdfcolorstack \Color push {1 0 0 rg 1 0 0 RG} red \pdfcolorstack \Color pop {} black \hrule height 1pt width 50pt \bye I try ...
8
votes
1answer
265 views

Specific colour in equation links

In hyperref package, is it possible to specify a specific color for equation links different than other link colors ? Following are present color specifications that I am using for hyperref package ...
4
votes
1answer
83 views

Strange color in PSTricks

I draw a figure in pstricks, the code is here: \documentclass{minimal} \usepackage[dvipsnames]{pstricks} \definecolor{bg}{cmyk}{0,0,0.1,0} \begin{document} ...
1
vote
1answer
640 views

Cell color partially overriding cell border

I am using \cellcolor to give a background to some cells. The cell color is partially coming over the border of the cell as you can see in the screenshot. This is my LaTeX code for the table. ...
6
votes
1answer
174 views

Color transition from title to main body

I've been scouring the internet for an answer to this question, unsuccessfully. I couldn't find it here. If there is an answer already, sorry and please direct me to it. I'm trying to customize my ...
5
votes
2answers
153 views

Color legend in Y axis

I have the following multiple y-axis plot that results in the image on the top image. However, I want to add a sort of legend in each of the Y axis, similar to what I manually drew in the bottom ...
1
vote
0answers
219 views

Packages multirow and columncolor give ugly stripes

I have two problems on one slide. This is an example: \documentclass{beamer} \usepackage{graphicx} \usepackage{tabulary} \usepackage{colortbl} \usepackage{multirow} \usepackage{xcolor} ...
5
votes
1answer
251 views

Color of bar plot depending on the bar height (pgfplot)

Does there exist any command to make the bar color depend on the bar size ? For example, the color of a bar of size x (between 0 and 100) should be filled of x percent of black, as displayed below. ...
2
votes
0answers
24 views

Why does the subtitled Ck, keep overwriting on the line number of the algorithm? [closed]

\documentclass[dvipsnames,svgnames]{beamer} \usepackage{algpseudocode} \usepackage{eulervm} \usepackage[most]{tcolorbox} \setbeamercovered{transparent=40} \usefonttheme[onlymath]{serif} ...
5
votes
1answer
103 views

How do I cause a faded out version of certain lines of code and highlight a few. (See example)

I need to know how the first 4 lines of code, are faded, the and how the Ck and Ck' are made with different colors. It'd be of great help if I could get the code for just saw the first 4-5 lines. ...
6
votes
1answer
214 views

pgfplots: changing dashed line dash locations

Is it possible to have one set of dashed lines fill the gap of another set? The black is just barely sticks out from the purple. I would like the black to fill the gap in the purple. ...
4
votes
1answer
361 views

Set math fonts to predefined color

I am trying to define math text is some predefined color as in my preamble: \setbeamercolor{math text}{pmsGreen} \everymath{\color{pmsGreen}} \everydisplay{\relax \ifx \\\@eqncr \else ...
4
votes
1answer
103 views

Color part of text and captions

is it possible to color in red part of a text and/or of a caption (let's say, just some words)? I tried to create the environment: \newenvironment{redtext}{\color{red}}{\ignorespacesafterend} ...
6
votes
1answer
165 views

Setting the color of a draw command inside foreach

I am trying to draw colored lines with a foreach loop. The command I use to draw the line creates a colored line if I use it standalone. Once I put it inside the foreach loop, I only get a black line. ...