summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/opencolor/demo-opencolor.tex
blob: a8bc47018be673dc24555dd3ca49a5d0a1acfcb1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
% opencolor-latex v1.0.0
% Author: Michele Piazzai
% Contact: michele.piazzai@uc3m.es
% License: MIT

\documentclass{standalone}

\usepackage{tikz}
\usetikzlibrary{calc}

\usepackage{etoolbox}
\usepackage{opencolor}

\newcommand\w{9em}
\newcommand\h{4.5em}

\begin{document}
\begin{tikzpicture}
	\foreach \c [count=\x] in {gray,red,pink,grape,violet,indigo,blue,cyan,teal,green,lime,yellow,orange} {%
			\foreach \b in {0,...,9} {%
					\draw[\ifnumgreater{\x}{1}{black}{\ifnumgreater{\b}{6}{white}{black}}] (\b*\w,-\x*\h) node [draw=black,fill=oc-\c-\b,minimum width=\w,minimum height=\h] {\ttfamily\large oc-\c-\b};
				}
		}
\end{tikzpicture}

\end{document}