-1

What package do I use to call these three commands ?

\definecolor{pistonTigerOrange}{RGB}{249,104,21}
\definecolor{pistonTigerOrange1}{rgb}{0.98,41.0,0.08}
\definecolor{pistontiger}{rgb/cmyk}{0.98,41.0,0.08/0.0,0.58,92.0,0.02}
Veak
  • 1
  • 1
    May I ask where you're getting these isolated snippets of code? On their own, they don't make much sense. If you found these in an example or document, there would often be a fairly obvious candidate in the preamble. (Often, but by no means always. \usepackage{tikz} or \usepackage{forest} are certainly not obvious.) – cfr Oct 06 '23 at 03:32
  • 1
    ⁸this question shows complete lack of effort, you copied those commands from somewhere so could have seen the definition, or you could have read any latex tutorial as \definecolor is part of the core latex release colour package – David Carlisle Oct 06 '23 at 06:23
  • 2
    You could have consulted the answers to your own question about these same colors https://tex.stackexchange.com/q/659029/1090 – David Carlisle Oct 06 '23 at 08:00

2 Answers2

5

xcolor is required if you wish to use those commands in LaTeX.

\documentclass{standalone}
\usepackage{xcolor}
\begin{document}
\definecolor{pistonTigerOrange}{RGB}{249,104,21}
\definecolor{pistonTigerOrange1}{rgb}{0.98,41.0,0.08}
\definecolor{pistontiger}{rgb/cmyk}{0.98,41.0,0.08/0.0,0.58,92.0,0.02}
\color{pistontiger} pistontiger \color{pistonTigerOrange} pistonTigerOrange \color{pistonTigerOrange1} pistonTigerOrange1
\end{document}

output in colours

For some uses, color is sufficient, but the syntax you're using requires xcolor.

cfr
  • 198,882
3

In the preamble write:

\usepackage[dvipsnames]{xcolor}

if You want to use also the names of a lot of predefined colors.

Or simply

\usepackage{xcolor}

if You want only to use Yours defined colors (and others predefined without the option dvipsnames).

In any case look here.

@cfr From the link above we can read:

The package allows you to use the names of 19 base colors (black, white, blue, green, yellow, red etc.); these names are always available. Besides, the package has some options to get more predefined colors, which should be added globally. dvipsnames allows you to access more than 60 colors, and svgnames allows access to about 150 colors. If you need more color names, then you may also want to look at the x11names option that offers more than 300 colors.

  • 1
    Why dvipsnames in particular? There's nothing wrong with it, but it's only one of several possible options of this kind. – cfr Oct 06 '23 at 03:29
  • When using \RequirePackage{xcolor}, are dvipsnames, svgnames, x11names not loaded, not made available ? Some have mentioned that the names take quite some memory - is this so ? – Veak Oct 06 '23 at 11:38
  • @Veak Not by default, no. If you want those sets of names, you have to specify the relevant option(s) e.g. \RequirePackage[dvipsnames,svgnames,x11names,rgb,table]{xcolor} or whatever you want. – cfr Oct 06 '23 at 16:37