Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
add comment

3 Answers

up vote 10 down vote accepted

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}

enter image description here

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.

share|improve this answer
add comment

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:

This

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.