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

learn more… | top users | synonyms (1)

9
votes
2answers
10k views

Setting text color in TikZ without changing line color; conflict with double

I have a certain TikZ style that I would like to use over and over again (so I'd like to use it as a scope). Namely, I want the color of the curves to be red, with white borders (to give a "crossing ...
9
votes
2answers
3k views

How can I change the colour of my document's section numbering?

I know how to change the colour of a section name using for example \section{\color{Red} Foobar} but that still leaves the section number in black. Is there any way to change the colour of the ...
9
votes
2answers
181 views

Randomly color paragraphs in LaTeX document

I usually type up my notes for school in LaTeX, and I find it easier to focus on text where the color changes between paragraphs, which is easy to do with old fashioned pen and paper. On LaTeX, ...
9
votes
3answers
1k views

Enumerated text and formula with background color

I want to have an enumeration with text and formulas with a background color, but \colorbox does not work, here's my code: \documentclass{book} \usepackage{xcolor} \usepackage{shadethm} ...
9
votes
2answers
336 views

Colorful Logic Gates using Circuitikz

I have to draw following circuit the LaTeX source of which is \documentclass{beamer} \usepackage{circuitikz} \begin{document} \begin{frame} \begin{figure} \centering \begin{circuitikz} \draw (0,0) ...
9
votes
1answer
7k views

How do I replace Warsaw black to someting else, like color theme beaver does?

The Warsaw theme uses black for the left half of top and bottom bars, and blue for the right half. Theme color beaver replaces these two colors with two shades of gray. How can I do the same within my ...
9
votes
2answers
1k views

How to change color of some particular environment for entire document

I want to change color of particular environment in document. For example wherever I found verbatim environment or equation environment appears in my tex file. With some global settings, I want to ...
9
votes
4answers
6k views

Colored box in new environment

I have a problem, I'm fairly new to LaTeX but I think I got the basics. My problem is that wants to create a environment that can create a minipage with a background color and some text in it. I can ...
9
votes
2answers
122 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 ...
9
votes
3answers
320 views

How to “bubble in”/color fill an item counter ((A),(B),(C),…) in an enumerated list

I'm trying to make an answer explanation guide for a test where the correct answer is "bubbled in". I've tried using the enumitem package and tikz as shown in this post (Enumerated list with blue ...
9
votes
1answer
248 views

Convert color name to pdfliteral code

How can I convert a color name (such as used with the xcolor package) to a pdfliteral code, like q 1 0 0 rg (for red)?
9
votes
2answers
1k views

How do I backcolor in verbatim?

I have some code I want to typeset as verbatim (lstlisting would be ok as well) - but I want to highlight some parts of it via a different background color, i.e. something like this: \begin{verbatim} ...
9
votes
2answers
4k views

\hhline adds white line where no line is intended

In a table, containing colored cells, i want to have a \hline dividing only some cells, similar to \cline but compatible with coloring single cells with \cellcolor, which is possible by using \hhline ...
9
votes
1answer
415 views

How to adapt the color of a label using pgfplots

I created this style that shifts the labels and put them on the bottom of the ybars. However, I have a problem with the bars that have too short length (for example, see the 8.7 and 5.1 in the ...
9
votes
1answer
429 views

Filling the arrow tip and not the path using two different colors

I have a small problem with some arrows but I can't seem to find a solution. Please note that this question is different from Setting fill color for TikZ arrow tips only (and not the path itself), ...
9
votes
1answer
784 views

Beamer - Undefined Color: “local structure”

I have some question concerning the \setbeamercolor{<element>}{local structure} in beamer: In presentations I use to give full bibliographic references directly on the concerning slide via the ...
9
votes
1answer
10k views

How do I add syntax coloring to my C++ source code in beamer

I have just learned how to insert source code into beamer with the listings package. However I dont know how to go about adding any syntax coloring on the C++ source code. How do I do that? Here ...
9
votes
1answer
1k views

Change colour of boxes surrounding links in hyperref

How can I achieve in the following MWE that the box surrounding the link gets coloured in blue? \documentclass{article} \usepackage{color} \usepackage[linkcolor=blue]{hyperref} \begin{document} ...
9
votes
1answer
2k views

How to change the color of the hyperlink to mail address in moderncv class?

I am beginner in LaTeX, and experimenting with moderncv. I find that the hyperkink of the email is of the same light blue color as the surrounding info, failing to make clear that it is an hyperlink. ...
9
votes
1answer
1k views

Is it possible to have multiple paragraphs inside a multicolumn using xcolor or a replacement?

I am getting information written by users in many lines, paragraphs, and I have to put those inside a table, I would like to know if it is possible to instruct LaTeX to accept paragraphs inside a ...
9
votes
2answers
3k views

Changing Enumerate Colors using Beamer Theme Berlin

I am trying to figure out how to change the coloring of enumerations in Beamer using the Theme 'Berlin'. I was able to change the color of the Itemize environment by: \setbeamercolor{itemize ...
9
votes
1answer
209 views

Coloring Arab suffix without losing connection

How can I change the color of Arab word endings without losing the connections? It's just ugly and loses readability. I'm using Tex Live 2012: arabxetex with xelatex but any package and/or engine is ...
9
votes
1answer
1k views

How to use CMYK-Colors in the whole document

I found out, that my color laser printer prints graphics with gray color in RGB-Representation instead of using black (they are more red then gray). So it seems, that PDFLaTeX is creating ...
9
votes
1answer
138 views

Using Color Commands for Math Operators

I was wanting to know how is it possible to create a math symbol in color to position correctly. I have used the following but the top limit does not center properly. Sorry for the verbage as I don't ...
9
votes
1answer
8k views

How to define macro for colored text?

I know that it is possible to obtain colored text in Latex by including the color package and writing like \textcolor{red}{This is red text} How could I define a macro which would produce text of a ...
9
votes
1answer
15k views

Changing color and bullets in Beamer's table of contents

Does anyone know how to change the color scheme and/or bullets used in Beamer's table of contents (without changing the overall structure color or theme)? Unfortunately, the following doesn't work: ...
9
votes
1answer
204 views

Why does color cause a vertical shift?

this TeX-source \documentclass[a4paper,12pt]{book} \usepackage[usenames,dvipsnames,svgnames,table,x11names]{xcolor} \usepackage{fancyhdr} \pagestyle{fancy} \fancyhead[LO,RE]{} ...
9
votes
1answer
575 views

Heatmap of a triangular matrix (or a sparse matrix)

So let me first of all shamelessly steal heatmap code from this answer to Drawing heatmaps using TikZ \documentclass{standalone} \usepackage{colortbl} \usepackage{pgfplots} \usepackage{pgfplotstable} ...
9
votes
1answer
1k views

Fancy Theorem Environment and Colors

I'm trying to make a boxed theorem environment with colors. I thought I had done it, but I was mistaken--lists were the wrong colors. In the picture above, I would like the "list" to be the same ...
9
votes
2answers
286 views

3D font in LaTeX

This is an unusual question regarding rendering of a font with a specific 3D-esque style in LaTeX, XeLaTex, or any other TeX flavor. I was looking at some fonts the other day and I came across one of ...
9
votes
1answer
4k views

Creating colorful plot using latex terminal of gnuplot?

Most output terminals of gnuplot draw different lines in a plot in different colors. I'm trying to create a plot inside my pdf document using gnuplot's latex terminal and the lines are only ...
9
votes
1answer
2k views

Remove keywords from code 'listings'

I tried to customize a code listing to support some pseudo-code format that suited me best. It was easy to add keywords using otherkeywords or morekeywords, but the opposite, the deletekeywords did ...
9
votes
1answer
7k views

Change text background within paragraph (with automatic linebreaks)

How do I change the text color as well as the text background color for e.g. a sentence within a paragraph? I know \textcolor for coloring the font and \colorbox for background coloring ...
9
votes
1answer
719 views

Alpha channel in colortbl

I'm using the colortbl package to color table cells. I've combined this w/ the xcolor package to define my own colors. However, it appears that xcolor does not support transparency. I saw the ...
9
votes
1answer
167 views

Is there a package to differently color nested expressions in the output?

Say I have an expressions like $(\sin(x-3(z^{(x-2)^2}))+1)^2$ with many nested expressions. To better visualize this in the output (and to help finding missing delimiters when proof-reading) I'd like ...
9
votes
1answer
279 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 ...
9
votes
2answers
1k views

Creating pdf with inverted colors using pdflatex (like white on black etc)

Is there a simple way of a creating PDF with inverted colours? A partial solution would be just changing font to white and making the background black. Is there simple "full" solution of inverting ...
9
votes
1answer
457 views

Writing Biblical Hebrew texts with different coloring for consonants, vowel and accent signs

I have got the following problem: I am using Biblical Hebrew texts written in XeTeX but I would like to color consonants as well as vowel and accent signs differently. I have read Coloring combining ...
8
votes
4answers
232 views

Make enumerate numbering different colours

Is there a way to make the different numbers within the enumerate environment different colors. \begin{enumerate} \item First \item Second \item Third \end{enumerate} I wish to make the 1. green, ...
8
votes
2answers
348 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 ...
8
votes
2answers
2k views

What are alternatives to block?

I use \begin{block} ... \end{block} to describe formalization of some notions, and I want to write some examples under it. I still would like to stick to the structure of a block (one part for title ...
8
votes
3answers
349 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 ...
8
votes
2answers
1k views

LaTeX color setting for math mode

I'm wondering if it's possible to do something like this in LaTeX: For all numbers (0, 1, ..., 9) in math mode, color it red. For alphabets (a, b, ..., z, A, B, ..., Z) in math mode, color it green. ...
8
votes
2answers
4k views

Change background colour for entire document

I would like to change total document background colour; for example to Yellow: I have used two packages: \usepackage{colour} \usepackage{xcolour} But I am unable to get my output, is there any ...
8
votes
5answers
2k views

Set \strut height

I'm using quite a few \colorbox and \colorfbox in a document but they weren't sitting at the same heights (because some words contained g and this seemed to push the box down. The solution I found ...
8
votes
3answers
227 views

Two backgrounds in a graph

How can I set two different backgrounds in a graph using pgfplots? In my case, I need a colored background for x<5 and a different background for x>5.
8
votes
2answers
3k views

How do I make sure that \pageref{LastPage} doesn't get colored like the other links identified by hyperref?

I am using hyperref together with lastpage. My problem is that \pageref{LastPage} gets the same color as the links identified with hyperref. I want it to be just the ordinary color (e.g. black) Allow ...
8
votes
3answers
281 views

How to use a large number of arbitrary rgb colors in a TikZ image?

I have a document with some TikZ images in it, which are automatically generated from a program I have written. All images are fairly similar, and each of them contains of a large number of squares ...
8
votes
2answers
285 views

How can I use color in a mathematical expression without losing horizontal spacing?

How can I use color in a mathematical expression without losing horizontal spacing? \documentclass{article} \usepackage{xcolor} \definecolor{red}{HTML}{dd0000} \begin{document} \[3+(-5)-2+3\] ...
8
votes
2answers
2k views

How to set the color of page number

I am using white colored font on black page and somehow I am losing my page numbers. I suppose the page number is still in black color. So How do we set the color of page number? And while on the ...