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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
Stefan Kottwitz
Site Admin
Posts: 10348
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