xcolor in Scissor LaTeX
The xcolor package works partly in Scissor LaTeX: colours work in TikZ and pgfplots pictures (all base names, dvipsnames, mixes such as red!50!blue, \definecolor and \colorlet) and in formulas (17 basic names), but \textcolor, \color and \colorbox leave body text in black.
What the package does
xcolor names colours and mixes them. \textcolor{red}{...} colours some text, \color{blue} switches the colour until the end of the group, \colorbox{yellow}{...} puts a coloured background behind text, and \definecolor and \colorlet define your own colours. TikZ and pgfplots use the same names.
What works here
| Command | In body text | In a formula | In TikZ and pgfplots |
|---|---|---|---|
\textcolor{name}{...} | Text kept, no colour | Works with the 17 basic names | Works |
\color{name} | Ignored | Works with the 17 basic names | Works |
\colorbox{name}{...} | Text kept, no background | Works with the 17 basic names | Not applicable |
\definecolor{n}{HTML}{1F6FEB} | Not applicable | Ignored | Works: models HTML, RGB, rgb, gray, cmyk |
\colorlet{n}{blue!30} | Not applicable | Ignored | Works |
Mixes such as red!50!blue | Not applicable | Ignored | Works |
\usepackage[dvipsnames]{xcolor} | Not applicable | Ignored | Names such as ForestGreen work |
The 17 names that work in formulas are: red, green, blue, cyan, magenta, yellow, black, white, gray, lightgray, darkgray, brown, orange, pink, purple, teal and olive. Any other name in a formula is ignored, and the formula keeps the colour around it.
Examples
Colour in a formula, for example to highlight a term:
Colours in a formula
(a + b)^2 = a^2 + \textcolor{red}{2ab} + b^2,
\qquad
{\color{teal} x_{44}} + \colorbox{yellow}{$y$}Your own colours and mixes in a TikZ picture:
\definecolor, \colorlet and mixes in TikZ
\definecolor{brand}{HTML}{1F6FEB}
\colorlet{soft}{brand!30}
\begin{tikzpicture}
\fill[brand] (0,0) rectangle (1,1);
\fill[soft] (1.2,0) rectangle (2.2,1);
\fill[red!50!blue] (2.4,0) rectangle (3.4,1);
\fill[orange!80!black] (3.6,0) rectangle (4.6,1);
\node[below] at (2.3,0) {brand, soft, red!50!blue, orange!80!black};
\end{tikzpicture}In body text the colour is dropped and the text stays black:
Body text is not coloured
This is \textcolor{red}{important}, this is {\color{blue} blue},
and this has a \colorbox{yellow}{yellow background}.To make words stand out in text, use \textbf or \emph, which work.
Compatibility
- From a TeX installation to here: documents typeset; coloured text appears in black. Pictures and formulas keep their colours, apart from custom colours in formulas.
- From here to a TeX installation: documents compile there unchanged, and coloured text then shows its colour.
The full manual is on CTAN: ctan.org/pkg/xcolor. For a guide, see Colours, and for pictures Drawings with TikZ.
Questions and answers
Why is my coloured text black?
Scissor LaTeX does not colour body text yet. The text itself is kept, and the colour is applied in a TeX installation. In formulas and pictures colours work.
Which colour names can I use in TikZ?
All xcolor base names, the dvipsnames names when you load xcolor with that option, mixes such as blue!20 or red!50!blue, and colours you define with \definecolor or \colorlet.
Every example on this page is typeset by Scissor LaTeX when the site is built. Last updated 2026-11-06.