Text FormattingWhy definecolor failed?

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
ymwork
Posts: 1
Joined: Fri Jul 29, 2016 11:20 am

Why definecolor failed?

Post by ymwork »

I write below

Code: Select all

\definecolor {darkblue}{rgb}{0.3,0.5,0.8}
But get compilation information

Code: Select all

! Undefined control sequence.
l.57 \definecolor
{darkblue}{rgb}{0.3,0.5,0.8}
? 
Why?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Why definecolor failed?

Post by Stefan Kottwitz »

Hi,

welcome to the forum!

You need to load the color package, or even better, the xcolor package with extended color support:

Code: Select all

\usepackage{xcolor}
Stefan
LaTeX.org admin
Post Reply