# 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.

-