# In xcolor, what is an easy way to experiment with color choices?

I want to check color choices in xcolor, for example for row coloring of a table. Is there a site for

1. code ⇒ color; as in you play with the code and see what color you get
2. color ⇒ code; you choose a color and the site provides you with a code.

I am looking for simple experimentation other than compiling a file every time to see how it looks.

Moreover, If I have hex code for a color how do I define the color?

-

For your second question, you can use \definecolor and the HTML color model (a 24-bit hexadecimal RGB variant):

\documentclass{article}
\usepackage{xcolor}

\definecolor{mycolor}{HTML}{AFFE90}

\begin{document}

{\color{mycolor}\rule{2cm}{2cm}}

\end{document}


For your first question, there are some on-line sites where you can test your colors; to obtain a matching palette for a given color, I use Color Blender: you select a color and you get matching schemes. For just one color tests, you can also use ColorPicker.

Another very useful tool I use, and that might also be of interest for you, is the chrome extension Eye Dropper which allows you to pick colors from web pages.

-

If you happen to use Emacs, you can try Julien D'Anjou's rainbow-mode, which colorizes color expressions with the color they define. This is how it looks for me with the example given by Gonzalo Medina:

-

If you use Linux, you may like Agave. It generates complements, split complements, triads, tetrads, and analogous and monochromatic schemes; it saves your favorite schemes; it allows you to experiment with the lightness or saturation of a scheme; and it generates random schemes when the well of inspiration has run completely dry.

-