| 1 |
% \iffalse meta-comment |
| 2 |
% |
| 3 |
% Copyright (C) 2016 by Jerick Órdenes Sepúlveda <os.jerick+xcolormaterial at gmail.com> |
| 4 |
% ------------------------------------------------------- |
| 5 |
% |
| 6 |
% This file may be distributed and/or modified under the |
| 7 |
% conditions of the LaTeX Project Public License, either version 1.3 |
| 8 |
% of this license or (at your option) any later version. |
| 9 |
% The latest version of this license is in: |
| 10 |
% |
| 11 |
% http://www.latex-project.org/lppl.txt |
| 12 |
% |
| 13 |
% and version 1.3 or later is part of all distributions of LaTeX |
| 14 |
% version 2005/12/01 or later. |
| 15 |
% |
| 16 |
% \fi |
| 17 |
% |
| 18 |
% \iffalse |
| 19 |
%<*driver> |
| 20 |
\ProvidesFile{xcolor-material.dtx} |
| 21 |
%</driver> |
| 22 |
%<package>\NeedsTeXFormat{LaTeX2e}[2005/12/01] |
| 23 |
%<package>\ProvidesPackage{xcolor-material} |
| 24 |
%<package>[2016/10/11 v0.1 A package for accessing Google Material colors using the xcolor package] |
| 25 |
% |
| 26 |
%<*driver> |
| 27 |
\PassOptionsToClass{a4paper}{article} |
| 28 |
\documentclass{ltxdoc} |
| 29 |
\EnableCrossrefs |
| 30 |
\CodelineIndex |
| 31 |
\RecordChanges |
| 32 |
|
| 33 |
\usepackage{lmodern} |
| 34 |
\usepackage[utf8]{inputenc} |
| 35 |
\usepackage[T1]{fontenc} |
| 36 |
\PassOptionsToPackage{table}{xcolor} |
| 37 |
\usepackage{xcolor-material}[2016/10/11] |
| 38 |
\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}} |
| 39 |
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}} |
| 40 |
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}} |
| 41 |
\usepackage{tikz} |
| 42 |
\usepackage[stretch=10]{microtype} |
| 43 |
\usepackage{lstdoc} |
| 44 |
\makeatletter |
| 45 |
\def\@part[#1]#2{\ifhyper\phantomsection\fi |
| 46 |
\addcontentsline{toc}{part}{\sffamily #1}% |
| 47 |
{\parindent\z@ \raggedright \interlinepenalty\@M |
| 48 |
\sffamily \huge \bfseries \color{MaterialBlue700} #2\markboth{}{}\par}% |
| 49 |
\nobreak\vskip 3ex\@afterheading} |
| 50 |
\makeatother |
| 51 |
\hypersetup{linkcolor=MaterialRed600, urlcolor=MaterialPink600} |
| 52 |
\usepackage{cleveref} |
| 53 |
|
| 54 |
\newcommand*{\pkg}[1]{\textsf{#1}} |
| 55 |
\newcommand*{\opt}[1]{\texttt{#1}} |
| 56 |
\newcommand\xcolorpkg{\pkg{xcolor}} |
| 57 |
\newcommand\kvopkg{\pkg{kvoptions}} |
| 58 |
\newcommand\xmpkg{\pkg{xcolor-material}} |
| 59 |
\newcommand\google{{\sffamily{\color{GoogleBlue}G}{\color{GoogleRed}o}% |
| 60 |
{\color{GoogleYellow}o}{\color{GoogleBlue}g}{\color{GoogleGreen}l}{\color{GoogleRed}e}}} |
| 61 |
\newcommand\tikzpkg{PGF/Ti\textit{k}Z} |
| 62 |
|
| 63 |
\makeindex |
| 64 |
\begin{document} |
| 65 |
\DocInput{xcolor-material.dtx} |
| 66 |
\PrintChanges |
| 67 |
\PrintIndex |
| 68 |
\end{document} |
| 69 |
%</driver> |
| 70 |
% \fi |
| 71 |
% |
| 72 |
% \CheckSum{567} |
| 73 |
% |
| 74 |
% \CharacterTable |
| 75 |
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z |
| 76 |
% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z |
| 77 |
% Digits \0\1\2\3\4\5\6\7\8\9 |
| 78 |
% Exclamation \! Double quote \" Hash (number) \# |
| 79 |
% Dollar \$ Percent \% Ampersand \& |
| 80 |
% Acute accent \' Left paren \( Right paren \) |
| 81 |
% Asterisk \* Plus \+ Comma \, |
| 82 |
% Minus \- Point \. Solidus \/ |
| 83 |
% Colon \: Semicolon \; Less than \< |
| 84 |
% Equals \= Greater than \> Question mark \? |
| 85 |
% Commercial at \@ Left bracket \[ Backslash \\ |
| 86 |
% Right bracket \] Circumflex \^ Underscore \_ |
| 87 |
% Grave accent \` Left brace \{ Vertical bar \| |
| 88 |
% Right brace \} Tilde \~} |
| 89 |
% |
| 90 |
% |
| 91 |
% \changes{v0.1}{2016/10/11}{Initial package version} |
| 92 |
% |
| 93 |
% \GetFileInfo{xcolor-material.sty} |
| 94 |
% |
| 95 |
% \DoNotIndex{\newcommand,\begin,\end,\bfseries,\sffamily,\ttfamily,\texttt, |
| 96 |
% \textbf,\emph,\auxcolor,\baselineskip,\color,\XCM@CMYKModel,\color,\colorval, |
| 97 |
% \colorbox,\parbox,\CurrentOption,\convertcolorspec,\DeclareDefaultOption, |
| 98 |
% \DeclareStringOption,\def,\edef,\definecolor,\else,\fi,\empty,\expandafter, |
| 99 |
% \#,\@ifpackageloaded,\extractcolorspecs,\extractedcolor,\first,\footnotesize, |
| 100 |
% \foreach,\gdef,\hspace,\i,\ifx,\model,\node,\OptionNotUsed,\PackageError, |
| 101 |
% \pgfkeys,\printcolorvalue,\ProcessKeyvalOptions,\raggedright, |
| 102 |
% \selectcolormodel,\textwidth,\tikzset,\usetikzlibrary,\variant,\vfill, |
| 103 |
% \vspace,\@ifnextchar} |
| 104 |
% |
| 105 |
% |
| 106 |
%\newbox\abstractbox |
| 107 |
%\setbox\abstractbox=\vbox{ |
| 108 |
% \begin{abstract} |
| 109 |
% The \xmpkg\ package is built on top of the great \xcolorpkg\ package. It |
| 110 |
% provides a useful definition of the beautiful \google\ Material |
| 111 |
% Color Palette, available at |
| 112 |
% \url{https://material.google.com/style/color.html}, for its use in document |
| 113 |
% writing with \LaTeX\ and Friends. |
| 114 |
% \end{abstract}} |
| 115 |
% \title{The \xmpkg\ package} |
| 116 |
% \author{Jerick Órdenes Sepúlveda \\ |
| 117 |
% <\href{mailto:[email protected]}% |
| 118 |
% {os.jerick+xcolormaterial(at)gmail.com}>} |
| 119 |
% \date{\filedate~~ Version \fileversion\ \box\abstractbox} |
| 120 |
% |
| 121 |
% \csname @twocolumntrue\endcsname |
| 122 |
% \maketitle\thispagestyle{empty} |
| 123 |
% \csname @starttoc\endcsname{toc} |
| 124 |
% \onecolumn |
| 125 |
% |
| 126 |
% \part{Usage} |
| 127 |
% |
| 128 |
% \section{Installation} |
| 129 |
% |
| 130 |
% \subsection{Required Packages} |
| 131 |
% The \xmpkg\ package requires relatively updated packages. These packages are |
| 132 |
% \kvopkg\footnote{The \kvopkg\ package is available at |
| 133 |
% \url{https://www.ctan.org/pkg/kvoptions}} and \xcolorpkg\footnote{The |
| 134 |
% \xcolorpkg\ package is available at \url{https://www.ctan.org/pkg/xcolor}}, |
| 135 |
% which are included in any popular \TeX\ distribution. Both are loaded without |
| 136 |
% options. |
| 137 |
% |
| 138 |
% \subsection{Installing \xmpkg} |
| 139 |
% Once the \xmpkg\ package is released in \href{http://www.ctan.org}{CTAN}, |
| 140 |
% users should be able to install it from the \TeX\ distribution package manager |
| 141 |
% available in their PC. However, if you need to install this package |
| 142 |
% manually, you should run: |
| 143 |
% ^^A |
| 144 |
% \begin{verbatim} |
| 145 |
% latex xcolor-material.ins\end{verbatim} |
| 146 |
% ^^A |
| 147 |
% and copy the generated file |xcolor-material.sty| to a path where \LaTeX\ can |
| 148 |
% find it. To generate the documentation run the following |
| 149 |
% command twice. |
| 150 |
% ^^A |
| 151 |
% \begin{verbatim} |
| 152 |
% pdflatex xcolor-material.dtx\end{verbatim} |
| 153 |
% |
| 154 |
% \section{Loading \xmpkg} |
| 155 |
% Simply add the package declaration somewhere in the document preamble. |
| 156 |
% ^^A |
| 157 |
% \begin{verbatim} |
| 158 |
% \usepackage{xcolor-material}\end{verbatim} |
| 159 |
% |
| 160 |
% If you want to load the \kvopkg\ and \xcolorpkg\ packages with some |
| 161 |
% options, you can specify those options using the |\PassOptionsToPackage| |
| 162 |
% command \emph{before} loading \xmpkg, or by loading those packages with their |
| 163 |
% options \emph{before} loading the \xmpkg\ package. |
| 164 |
% |
| 165 |
% \subsection{Package Options} |
| 166 |
% The \xmpkg\ currently offers only one option, |
| 167 |
% \begin{description} |
| 168 |
% \item[\opt{prefix}|=|\meta{prefix}] Defines the prefix for all color names |
| 169 |
% defined in the Google Material Color Palette; this is used for namespacing |
| 170 |
% purposes. The default prefix is ``|Material|''. |
| 171 |
% \end{description} |
| 172 |
% The main purpose of this option is to avoid conflicts with other existent |
| 173 |
% color definitions. The |prefix| option allows custom prefix definition, e.g., |
| 174 |
% if you want to use the word `|myprefix|' as the color prefix, |
| 175 |
% then you must load the \xmpkg\ package with |
| 176 |
% ^^A |
| 177 |
% \begin{verbatim} |
| 178 |
% \usepackage[prefix=myprefix]{xcolor-material}\end{verbatim} |
| 179 |
% |
| 180 |
% \section{Using \xmpkg} |
| 181 |
% The \xmpkg\ provides all colors specified in the Google Material Color |
| 182 |
% Palette, available at \url{https://material.google.com/style/color.html}, in |
| 183 |
% the global scope of the document. This package relies on the \xcolorpkg\ |
| 184 |
% package, and you should refer to its documentation for more details |
| 185 |
% about using colors inside the document. |
| 186 |
% |
| 187 |
% \subsection{Color Names} |
| 188 |
% The Google Material Color Palette consists of 19 color palettes (each |
| 189 |
% for one base color) and two colors not included in any palette (|White| and |
| 190 |
% |Black|), together forming a list of 256 colors. Each individual palette |
| 191 |
% consists of 14 color variations of the base color, except for |Brown|, |
| 192 |
% |Grey|, and |Blue Grey| with 10. Every color variation has a number from the |
| 193 |
% list \texttt{\{50, 100, 200, 300, 400, 500, 600, 700, 800, 900\}} for the |
| 194 |
% first ten colors or \emph{primary palette}, and from the list \texttt{\{A100, |
| 195 |
% A200, A300, A400\}} for the last four or \emph{secondary palette}. The names |
| 196 |
% of the base colors and their variations are listed in table |
| 197 |
% \ref{tab:colornames}. For a complete list of these palettes go to the section |
| 198 |
% \ref{sec:colorpalettes}. |
| 199 |
% |
| 200 |
% \begin{table}[b!] |
| 201 |
% \centering |
| 202 |
% \caption{Color names from the Google Material Color Palette and their |
| 203 |
% variation palettes.} \label{tab:colornames} |
| 204 |
% \begin{tabular}{lc} |
| 205 |
% \hline |
| 206 |
% \textbf{Base Color} & \textbf{Palettes}\\ |
| 207 |
% \hline |
| 208 |
% \textcolor{MaterialRed}{|Red|} & primary, secondary\\ |
| 209 |
% \textcolor{MaterialPink}{|Pink|} & primary, secondary\\ |
| 210 |
% \textcolor{MaterialPurple}{|Purple|} & primary, secondary\\ |
| 211 |
% \textcolor{MaterialDeepPurple}{|Deep Purple|} & primary, secondary\\ |
| 212 |
% \textcolor{MaterialIndigo}{|Indigo|} & primary, secondary\\ |
| 213 |
% \textcolor{MaterialBlue}{|Blue|} & primary, secondary\\ |
| 214 |
% \textcolor{MaterialLightBlue}{|Light Blue|} & primary, secondary\\ |
| 215 |
% \textcolor{MaterialCyan}{|Cyan|} & primary, secondary\\ |
| 216 |
% \textcolor{MaterialTeal}{|Teal|} & primary, secondary\\ |
| 217 |
% \textcolor{MaterialGreen}{|Green|} & primary, secondary\\ |
| 218 |
% \textcolor{MaterialLightGreen}{|Light Green|} & primary, secondary\\ |
| 219 |
% \textcolor{MaterialLime}{|Lime|} & primary, secondary\\ |
| 220 |
% \textcolor{MaterialYellow}{|Yellow|} & primary, secondary\\ |
| 221 |
% \textcolor{MaterialAmber}{|Amber|} & primary, secondary\\ |
| 222 |
% \textcolor{MaterialOrange}{|Orange|} & primary, secondary\\ |
| 223 |
% \textcolor{MaterialDeepOrange}{|Deep Orange|} & primary, secondary\\ |
| 224 |
% \textcolor{MaterialBrown}{|Brown|} & secondary\\ |
| 225 |
% \textcolor{MaterialGrey}{|Grey|} & secondary\\ |
| 226 |
% \textcolor{MaterialBlueGrey}{|Blue Grey|} & secondary\\ |
| 227 |
% \textcolor{MaterialBlack}{|Black|} & ---\\ |
| 228 |
% \rowcolor{MaterialBlack}\textcolor{MaterialWhite}{|White|} & |
| 229 |
% \textcolor{MaterialWhite}{---}\\ |
| 230 |
% \hline |
| 231 |
% \end{tabular} |
| 232 |
%\end{table} |
| 233 |
% |
| 234 |
% The name under which the \xmpkg\ package defines each Google Material color |
| 235 |
% has the form `\meta{prefix}\meta{base name}\meta{variation}', where |
| 236 |
% \begin{itemize} |
| 237 |
% \item \meta{prefix} corresponds to the prefix set via the package option |
| 238 |
% |prefix|, |
| 239 |
% \item \meta{base name} is the official name of the base color (see table |
| 240 |
% \ref{tab:colornames}), and |
| 241 |
% \item \meta{variation} is the id number of the color variation, e.g., |50| |
| 242 |
% or |A100|. |
| 243 |
% \end{itemize} |
| 244 |
% For instance, by default (if a custom prefix is not defined), the |Blue 600| |
| 245 |
% color of the palette will be available in the document global scope as |
| 246 |
% ``|MaterialBlue600|''. Also, all base colors are representative of the |
| 247 |
% palettes' primary color and are available at the |500| variation or using |
| 248 |
% their color names, e.g., |MaterialBlue| or |MaterialBlue500| are the primary |
| 249 |
% color of the ``Material Blue Palette''. |
| 250 |
% |
| 251 |
% \subsection[Google Colors]{\google{} Colors} |
| 252 |
% The \xmpkg\ package provides the Google Identity colors, which definitions |
| 253 |
% are available in the Google Design Blog at |
| 254 |
% \url{https://design.google.com/articles/evolving-the-google-identity}. |
| 255 |
% The name under which these colors are defined has the form |
| 256 |
% `Google\meta{name}', where \meta{name} is a color name among |
| 257 |
% \textcolor{GoogleBlue}{|Blue|}, \textcolor{GoogleGreen}{|Green|}, |
| 258 |
% \textcolor{GoogleYellow}{|Yellow|}, and \textcolor{GoogleRed}{|Red|}. For |
| 259 |
% instance, if you want to use the Google Blue color you have to call for it |
| 260 |
% by using `|GoogleBlue|'.\\ |
| 261 |
% |
| 262 |
% \noindent |
| 263 |
% \colorsample{GoogleBlue} |
| 264 |
% \colorsample{GoogleGreen} |
| 265 |
% \colorsample{GoogleYellow} |
| 266 |
% \colorsample{GoogleRed}\\ |
| 267 |
% |
| 268 |
% \subsection{Useful macros} |
| 269 |
% The \xmpkg\ provides some useful macros for printing color values, samples, |
| 270 |
% and palettes. Some of them maybe rely on other LaTeX packages that are |
| 271 |
% not loaded by default. |
| 272 |
% |
| 273 |
% \noindent |
| 274 |
% \DescribeMacro{\printcolorvalue} |
| 275 |
% \oarg{color model}\marg{color name} |
| 276 |
% |
| 277 |
% This macro can be used to print any color value. It has one mandatory |
| 278 |
% argument \meta{color name}, which specifies the color name which you want |
| 279 |
% to know its value. And one optional argument, \meta{color model} that |
| 280 |
% corresponds to the color model in which the value will be presented: |HTML|, |
| 281 |
% |RGB| and |cmyk| (|HTML| by default). |
| 282 |
% \begin{table}[h!] |
| 283 |
% \centering |
| 284 |
% \begin{tabular}{lll} |
| 285 |
% |\printcolorvalue{MaterialBlue}| & & \textcolor{MaterialIndigo}{\printcolorvalue{MaterialBlue}}\\ |
| 286 |
% |\printcolorvalue[RGB]{MaterialGrey}| & & \textcolor{MaterialIndigo}{\printcolorvalue[RGB]{MaterialGrey}}\\ |
| 287 |
% |\printcolorvalue[cmyk]{orange}| & & \textcolor{MaterialIndigo}{\printcolorvalue[cmyk]{orange}}\\ |
| 288 |
% \end{tabular} |
| 289 |
%\end{table} |
| 290 |
% |
| 291 |
% \noindent |
| 292 |
% \DescribeMacro{\colorsample} |
| 293 |
% \oarg{color model}\oarg{text color}\oarg{box width}\marg{color name}\oarg{title} |
| 294 |
% |
| 295 |
% This macro allows you to draw color samples using a simple colorbox with |
| 296 |
% text. It has one mandatory argument |
| 297 |
% \begin{itemize} |
| 298 |
% \item \meta{color name} which is the name of the color to be drawn, |
| 299 |
% \end{itemize} |
| 300 |
% and four optional arguments: |
| 301 |
% \begin{itemize} |
| 302 |
% \item \meta{color model} represents the color model in which the color will |
| 303 |
% be presented (by default |HTML|), |
| 304 |
% \item \meta{text color} which specifies the color used for printing the |
| 305 |
% text (by default |white|), |
| 306 |
% \item \meta{box width} specifies the box width (by default is |6.5em|), if |
| 307 |
% it is \emph{empty} the default is passed, \item and \meta{title} which is |
| 308 |
% the title of the color sample, if this argument is not passed the color |
| 309 |
% name is taken. |
| 310 |
% \end{itemize} |
| 311 |
% |
| 312 |
% To generate samples of the \google\ Colors showed above we can type |
| 313 |
% \begin{verbatim} |
| 314 |
% \colorsample{GoogleBlue} \colorsample{GoogleGreen} |
| 315 |
% \colorsample{GoogleYellow} \colorsample{GoogleRed}\end{verbatim} |
| 316 |
% |
| 317 |
% Other samples: |
| 318 |
% ^^A |
| 319 |
% \begin{verbatim} |
| 320 |
% \colorsample[HTML][][black]{MaterialAmber50} |
| 321 |
% \colorsample{MaterialAmber} |
| 322 |
% \colorsample[RGB]{MaterialAmber600} |
| 323 |
% \colorsample{MaterialAmberA700}[Amber\\A700]\end{verbatim} |
| 324 |
% |
| 325 |
% \noindent |
| 326 |
% \colorsample[HTML][][black]{MaterialAmber50} |
| 327 |
% \colorsample{MaterialAmber} |
| 328 |
% \colorsample[RGB]{MaterialAmber600} |
| 329 |
% \colorsample{MaterialAmberA700}[Amber\\A700] |
| 330 |
% |
| 331 |
% \begin{verbatim} |
| 332 |
% \colorsample[cmyk][13em]{MaterialBlueGrey500} |
| 333 |
% \colorsample{purple}[\texttt{xcolor}\\ Purple] |
| 334 |
% \colorsample[RGB]{teal}[] |
| 335 |
% \end{verbatim} |
| 336 |
% |
| 337 |
% \noindent |
| 338 |
% \colorsample[cmyk][13em]{MaterialBlueGrey500} |
| 339 |
% \colorsample{purple}[\texttt{xcolor}\\ Purple] |
| 340 |
% \colorsample[RGB]{teal}[]\\ |
| 341 |
% |
| 342 |
% \noindent |
| 343 |
% \DescribeMacro{\colorpalette} |
| 344 |
% \oarg{key-value arguments}\marg{color name} |
| 345 |
% |
| 346 |
% This macro is available only if the \tikzpkg\ package is loaded. It provides |
| 347 |
% a simple way to draw the Google Material Color Palettes in the same way as we |
| 348 |
% can find them into the \href{https://material.google.com/style/color.html}{Google |
| 349 |
% Style Blog}. It has one mandatory argument \meta{color name}, which specifies |
| 350 |
% the palette base color that will be used to draw its variation palette. |
| 351 |
% Optional arguments are provided in the form of key-value arguments and key |
| 352 |
% styles. A complete list of key-value arguments and styles is available at |
| 353 |
% table \ref{tab:keyvalue} and \ref{tab:styles} respectively. The \xmpkg\ |
| 354 |
% package relies on the \textsf{pgfkeys} package to provide key-value |
| 355 |
% arguments, for deeper knowledge about how to use key-value arguments look at |
| 356 |
% package documentation\footnote{The \textsf{pgfkeys} package is available at |
| 357 |
% \url{https://www.ctan.org/pkg/pgfkeys}.}. |
| 358 |
% |
| 359 |
% \begin{table}[t!] |
| 360 |
% \centering\small |
| 361 |
% \caption{Key-value arguments for the \texttt{\textbackslash colorpalette} |
| 362 |
% macro.} \label{tab:keyvalue} |
| 363 |
% \rowcolors{2}{lightgray!20}{white} |
| 364 |
% \begin{tabular}{L{.3\textwidth}C{.25\textwidth}L{.35\textwidth}} |
| 365 |
% \hline |
| 366 |
% \multicolumn{1}{c}{\textbf{Key}} & \multicolumn{1}{c}{\textbf{Default}} |
| 367 |
% & \multicolumn{1}{c}{\textbf{Description}}\\ |
| 368 |
% \hline |
| 369 |
% |width| & .45 $\times$ |\textwidth| & Palette width\\ |
| 370 |
% |height| & 2 $\times$ |\baselineskip| & Variation colorbox height\\ |
| 371 |
% |shape| & rectangle & Variation colorbox shape\\ |
| 372 |
% |title| & \meta{color name} & Palette title\\ |
| 373 |
% |title text color| & white & Title colorbox text color\\ |
| 374 |
% |init text color| & black & Initial variation text color\\ |
| 375 |
% |altern text color| & white & Alternative variation text color\\ |
| 376 |
% |variation font| & sffamily & Variation title font\\ |
| 377 |
% |value font| & ttfamily & Variation value font\\ |
| 378 |
% |title font| & sffamily and bfseries & Palette title font\\ |
| 379 |
% |colorbox sep| & 0pt & Separation between |
| 380 |
% variation colorboxes\\ |
| 381 |
% |first colorbox sep| & .2 $\times$ |\baselineskip| & Separation between |
| 382 |
% title colorbox and first palette colorbox\\ |
| 383 |
% |title colorbox height| & 6 $\times$ |\baselineskip| & Height of the |
| 384 |
% title colorbox\\ |
| 385 |
% |primary palette| & \{50,100,200,\ldots,900\} & List of primary palette |
| 386 |
% variations \\ |
| 387 |
% |secondary palette| & \{A100,A200,A400,A700\} & List of secondary palette |
| 388 |
% variations\\ |
| 389 |
% |percent char| & \{\} & Character for color mixtures (usually |!|), this % is useful when the |basic| style is selected\\ |
| 390 |
% |primary variation| & 500 & Primary variation or palette's base color\\ |
| 391 |
% |primary toggle at| & 1000 & Color variation at which alternates between |
| 392 |
% |init text color| and |altern text color| for the primary palette\\ |
| 393 |
% |secondary toggle at| & 1000 & Color variation at which alternates |
| 394 |
% between |init text color| and |altern text color| for the secondary palette\\ |
| 395 |
% |color model| & HTML & Color Model to be used for printing the palette\\ |
| 396 |
% \hline |
| 397 |
% \end{tabular} |
| 398 |
% \end{table} |
| 399 |
% |
| 400 |
% \begin{table}[t!] |
| 401 |
% \centering\small |
| 402 |
% \caption{Style arguments for the \texttt{\textbackslash colorpalette} |
| 403 |
% macro.} \label{tab:styles} |
| 404 |
% \rowcolors{2}{lightgray!20}{white} |
| 405 |
% \begin{tabular}{C{.2\textwidth}L{.5\textwidth}} |
| 406 |
% \hline |
| 407 |
% \multicolumn{1}{c}{\textbf{Style}} & |
| 408 |
% \multicolumn{1}{c}{\textbf{Description}}\\ |
| 409 |
% \hline |
| 410 |
% |both| & Settings for printing both primary and secondary palettes |
| 411 |
% (Default)\\ |
| 412 |
% |primary| & For printing primary palette only \\ |
| 413 |
% |basic| & For printing variations from 10\,\% to 100\,\% of a base color\\ |
| 414 |
% \hline |
| 415 |
% \end{tabular} |
| 416 |
% \end{table} |
| 417 |
% |
| 418 |
% A printed palette is a stack of colorboxes that comprises three main |
| 419 |
% sections, one on top or |title colorbox| that is used for introducing the |
| 420 |
% palette with its primary variation, a |primary palette| in the middle and a |
| 421 |
% |secondary palette| at the bottom. With this macro, you can print out |
| 422 |
% all the palettes of the Google Material Colors, and with some configurations |
| 423 |
% you can print any color palette that you want in a fancy way as the Material |
| 424 |
% Palettes. |
| 425 |
% |
| 426 |
% For instance, the following commands produce a color palette for the |
| 427 |
% variations of the \xcolorpkg\ predefined |yellow| color between 10\,\% and |
| 428 |
% 100\,\%, and a custom palette by tricking the |\colorpalette| macro. |
| 429 |
% \begin{verbatim} |
| 430 |
% \colorpalette[basic, title text color=black]{yellow} |
| 431 |
% \colorpalette[primary palette={yellow,blue,red,gray,black,purple}, |
| 432 |
% secondary palette={yellow!20,blue!30,red!20,gray!40}, primary |
| 433 |
% variation=orange, primary toggle at=blue]{} |
| 434 |
%\end{verbatim} |
| 435 |
% |
| 436 |
% \noindent |
| 437 |
% \colorpalette[basic, title text color=black]{yellow}\hfill |
| 438 |
% \colorpalette[primary palette={yellow,blue,red,gray,black,purple}, |
| 439 |
% secondary palette={yellow!20,blue!30,red!20,gray!40}, primary |
| 440 |
% variation=orange, primary toggle at=blue, title=Predefined Orange]{} |
| 441 |
% |
| 442 |
% \subsection{Color Palettes}\label{sec:colorpalettes} |
| 443 |
% Here all Google Material Palettes are presented in the same way as they |
| 444 |
% appear at the Google Design blog using the |\colorpalette| command described |
| 445 |
% above. |
| 446 |
% |
| 447 |
% \begin{verbatim} |
| 448 |
% \colorpalette[primary toggle at=400, secondary toggle at=A200, secondary |
| 449 |
% palette={A100,A200,A400,A700}]{MaterialRed} |
| 450 |
% \colorpalette[primary toggle at=400, secondary toggle at=A200, secondary |
| 451 |
% palette={A100,A200,A400,A700}]{MaterialPink} |
| 452 |
% \end{verbatim} |
| 453 |
% |
| 454 |
% \noindent |
| 455 |
% \colorpalette[primary toggle at=400, secondary toggle at=A200, secondary |
| 456 |
% palette={A100,A200,A400,A700}]{MaterialRed}\hfill |
| 457 |
% \colorpalette[primary toggle at=400, secondary toggle at=A200, secondary |
| 458 |
% palette={A100,A200,A400,A700}]{MaterialPink} |
| 459 |
% \clearpage |
| 460 |
% |
| 461 |
% \begin{verbatim} |
| 462 |
% \colorpalette[primary toggle at=300, secondary toggle at=A200, secondary |
| 463 |
% palette={A100,A200,A400,A700}]{MaterialPurple} |
| 464 |
% \colorpalette[primary toggle at=300, secondary toggle at=A200, secondary |
| 465 |
% palette={A100,A200,A400,A700}]{MaterialDeepPurple} |
| 466 |
% \end{verbatim} |
| 467 |
% |
| 468 |
% \noindent |
| 469 |
% \colorpalette[primary toggle at=300, secondary toggle at=A200, secondary |
| 470 |
% palette={A100,A200,A400,A700}]{MaterialPurple}\hfill |
| 471 |
% \colorpalette[primary toggle at=300, secondary toggle at=A200, secondary |
| 472 |
% palette={A100,A200,A400,A700}]{MaterialDeepOrange} |
| 473 |
% \clearpage |
| 474 |
% |
| 475 |
% \begin{verbatim} |
| 476 |
% \colorpalette[primary toggle at=500, secondary toggle at=A200, secondary |
| 477 |
% palette={A100,A200,A400,A700}]{MaterialBlue} |
| 478 |
% \colorpalette[primary toggle at=300, secondary toggle at=A200, secondary |
| 479 |
% palette={A100,A200,A400,A700}]{MaterialIndigo} |
| 480 |
% \end{verbatim} |
| 481 |
% |
| 482 |
% \noindent |
| 483 |
% \colorpalette[primary toggle at=500, secondary toggle at=A200, secondary |
| 484 |
% palette={A100,A200,A400,A700}]{MaterialBlue}\hfill |
| 485 |
% \colorpalette[primary toggle at=300, secondary toggle at=A200, secondary |
| 486 |
% palette={A100,A200,A400,A700}]{MaterialIndigo} |
| 487 |
% \clearpage |
| 488 |
% |
| 489 |
% \begin{verbatim} |
| 490 |
% \colorpalette[primary toggle at=600, secondary toggle at=A700, title text |
| 491 |
% color=black]{MaterialLightBlue} |
| 492 |
% \colorpalette[primary toggle at=700, title text color=black]{MaterialCyan} |
| 493 |
% \end{verbatim} |
| 494 |
% |
| 495 |
% \noindent |
| 496 |
% \colorpalette[primary toggle at=600, secondary toggle at=A700, title text |
| 497 |
% color=black]{MaterialLightBlue}\hfill |
| 498 |
% \colorpalette[primary toggle at=700, title text color=black]{MaterialCyan} |
| 499 |
% \clearpage |
| 500 |
% |
| 501 |
% \begin{verbatim} |
| 502 |
% \colorpalette[primary toggle at=500, secondary |
| 503 |
% palette={A100,A200,A400,A700}]{MaterialTeal} |
| 504 |
% \colorpalette[primary toggle at=600, title text color=black]{MaterialGreen} |
| 505 |
% \end{verbatim} |
| 506 |
% |
| 507 |
% \noindent |
| 508 |
% \colorpalette[primary toggle at=500, secondary |
| 509 |
% palette={A100,A200,A400,A700}]{MaterialTeal}\hfill |
| 510 |
% \colorpalette[primary toggle at=600, title text color=black]{MaterialGreen} |
| 511 |
% \clearpage |
| 512 |
% |
| 513 |
% \begin{verbatim} |
| 514 |
% \colorpalette[primary toggle at=700, title text |
| 515 |
% color=black]{MaterialLightGreen} |
| 516 |
% \colorpalette[primary toggle at=900, title text color=black]{MaterialLime} |
| 517 |
% \end{verbatim} |
| 518 |
% |
| 519 |
% \noindent |
| 520 |
% \colorpalette[primary toggle at=700, title text |
| 521 |
% color=black]{MaterialLightGreen}\hfill |
| 522 |
% \colorpalette[primary toggle at=900, title text color=black]{MaterialLime} |
| 523 |
% \clearpage |
| 524 |
% |
| 525 |
% \begin{verbatim} |
| 526 |
% \colorpalette[title text color=black]{MaterialYellow} |
| 527 |
% \colorpalette[title text color=black]{MaterialAmber} |
| 528 |
% \end{verbatim} |
| 529 |
% |
| 530 |
% \noindent |
| 531 |
% \colorpalette[title text color=black]{MaterialYellow}\hfill |
| 532 |
% \colorpalette[title text color=black]{MaterialAmber} |
| 533 |
% \clearpage |
| 534 |
% |
| 535 |
% \begin{verbatim} |
| 536 |
% \colorpalette[primary toggle at=800, title text color=black]{MaterialOrange} |
| 537 |
% \colorpalette[primary toggle at=500, secondary toggle |
| 538 |
% at=A400]{MaterialDeepOrange} |
| 539 |
% \end{verbatim} |
| 540 |
% |
| 541 |
% \noindent |
| 542 |
% \colorpalette[primary toggle at=800, title text |
| 543 |
% color=black]{MaterialOrange}\hfill |
| 544 |
% \colorpalette[primary toggle at=500, secondary toggle |
| 545 |
% at=A400]{MaterialDeepOrange} |
| 546 |
% \clearpage |
| 547 |
% |
| 548 |
% \begin{verbatim} |
| 549 |
% \colorpalette[primary, primary toggle at=300]{MaterialBrown} |
| 550 |
% \colorpalette[primary, primary toggle at=600]{MaterialGrey} |
| 551 |
% \end{verbatim} |
| 552 |
% |
| 553 |
% \noindent |
| 554 |
% \colorpalette[primary, primary toggle at=300]{MaterialBrown}\hfill |
| 555 |
% \colorpalette[primary, primary toggle at=600]{MaterialGrey} |
| 556 |
% \clearpage |
| 557 |
% |
| 558 |
% \begin{verbatim} |
| 559 |
% \colorpalette[primary, primary toggle at=400]{MaterialBlueGrey} |
| 560 |
% \end{verbatim} |
| 561 |
% |
| 562 |
% \noindent |
| 563 |
% \colorpalette[primary, primary toggle at=400]{MaterialBlueGrey} |
| 564 |
% |
| 565 |
% \section{Bug reports} |
| 566 |
% The development version of this package is available at |
| 567 |
% \url{https://github.com/OSjerick/xcolor-material}. If you find bugs, have |
| 568 |
% feature suggestions or think of ways in which the \xmpkg\ package and its |
| 569 |
% documentation could be improved, please open a ticket in the GitHub |
| 570 |
% repository's issue tracker. |
| 571 |
% |
| 572 |
% \section{Acknowledgements} |
| 573 |
% This package was inspired by the \textsf{xcolor-solarized} package, available |
| 574 |
% at \url{https://www.ctan.org/pkg/xcolor-solarized}, then I have to thank |
| 575 |
% Julien Cretel its creator. Also, thanks to \google\ for such amazing color |
| 576 |
% palette. |
| 577 |
% |
| 578 |
% \StopEventually{That's all!} |
| 579 |
% \clearpage |
| 580 |
% \part{Implementation} |
| 581 |
% |
| 582 |
% I have used the word `|XCM|' followed by an `|@|' character for namespacing |
| 583 |
% purposes into the \xmpkg\ package source. |
| 584 |
% |
| 585 |
% \section{Required Packages} |
| 586 |
% The \xmpkg\ requires the \xcolorpkg\ and \kvopkg\ packages, both are |
| 587 |
% loaded without any option. |
| 588 |
% |
| 589 |
% \begin{macrocode} |
| 590 |
\RequirePackage{xcolor}[2007/01/21] |
| 591 |
\RequirePackage{kvoptions}[2011/06/30] |
| 592 |
% \end{macrocode} |
| 593 |
% |
| 594 |
% The \xcolorpkg\ package is used to define and provide every single color in |
| 595 |
% the \google\ Material Color Palette. The \kvopkg\ package supports package |
| 596 |
% options in a key-value format. |
| 597 |
% |
| 598 |
% \section{Package Options} |
| 599 |
% Setting up \kvopkg\ configuration. |
| 600 |
% |
| 601 |
% \begin{macrocode} |
| 602 |
\SetupKeyvalOptions{ |
| 603 |
family=XCM, |
| 604 |
prefix=XCM@ |
| 605 |
} |
| 606 |
% \end{macrocode} |
| 607 |
% |
| 608 |
% Declaring string option key `|prefix|': |
| 609 |
% |
| 610 |
% \begin{macrocode} |
| 611 |
\DeclareStringOption[Material]{prefix}[Material] |
| 612 |
\DeclareDefaultOption{ |
| 613 |
\OptionNotUsed |
| 614 |
\PackageError{xcolor-material}{Unknown `\CurrentOption' option.} |
| 615 |
} |
| 616 |
\ProcessKeyvalOptions* |
| 617 |
% \end{macrocode} |
| 618 |
% |
| 619 |
% Note that the default value for this key is `|Material|'. Note also that this |
| 620 |
% package checks for valid options, if an invalid option is passed, a |
| 621 |
% PackageError will be thrown. |
| 622 |
% |
| 623 |
% \section{Color Definitions} |
| 624 |
% |
| 625 |
% \begin{macro}{\XCM@definecolor} |
| 626 |
% I have taken the idea from the \textsf{xcolor-solarized} package of having a |
| 627 |
% convenient internal macro for color definitions. |
| 628 |
% \begin{macrocode} |
| 629 |
\newcommand{\XCM@definecolor}[2] |
| 630 |
{\expandafter\definecolor\expandafter{\XCM@prefix #1}{HTML}{#2}} |
| 631 |
% \end{macrocode} |
| 632 |
% \end{macro} |
| 633 |
% |
| 634 |
% Using this macro definition we can define all the \google\ Material colors |
| 635 |
% as follows. Note that for every color in the palette, the |500| |
| 636 |
% variation is the base color default as \google\ recommends for primary colors. |
| 637 |
% |
| 638 |
% \subsection{Red} |
| 639 |
% \begin{macrocode} |
| 640 |
\XCM@definecolor{Red50} {FFEBEE} |
| 641 |
\XCM@definecolor{Red100} {FFCDD2} |
| 642 |
\XCM@definecolor{Red200} {EF9A9A} |
| 643 |
\XCM@definecolor{Red300} {E57373} |
| 644 |
\XCM@definecolor{Red400} {EF5350} |
| 645 |
\XCM@definecolor{Red500} {F44336} |
| 646 |
\XCM@definecolor{Red600} {E53935} |
| 647 |
\XCM@definecolor{Red700} {D32F2F} |
| 648 |
\XCM@definecolor{Red800} {C62828} |
| 649 |
\XCM@definecolor{Red900} {B71C1C} |
| 650 |
\XCM@definecolor{RedA100}{FF8A80} |
| 651 |
\XCM@definecolor{RedA200}{FF5252} |
| 652 |
\XCM@definecolor{RedA400}{FF1744} |
| 653 |
\XCM@definecolor{RedA700}{D50000} |
| 654 |
\definecolor{\XCM@prefix Red}{named}{\XCM@prefix Red500} |
| 655 |
% \end{macrocode} |
| 656 |
% |
| 657 |
% \subsection{Pink} |
| 658 |
% \begin{macrocode} |
| 659 |
\XCM@definecolor{Pink50} {FCE4EC} |
| 660 |
\XCM@definecolor{Pink100} {F8BBD0} |
| 661 |
\XCM@definecolor{Pink200} {F48FB1} |
| 662 |
\XCM@definecolor{Pink300} {F06292} |
| 663 |
\XCM@definecolor{Pink400} {EC407A} |
| 664 |
\XCM@definecolor{Pink500} {E91E63} |
| 665 |
\XCM@definecolor{Pink600} {D81B60} |
| 666 |
\XCM@definecolor{Pink700} {C2185B} |
| 667 |
\XCM@definecolor{Pink800} {AD1457} |
| 668 |
\XCM@definecolor{Pink900} {880E4F} |
| 669 |
\XCM@definecolor{PinkA100}{FF80AB} |
| 670 |
\XCM@definecolor{PinkA200}{FF4081} |
| 671 |
\XCM@definecolor{PinkA400}{F50057} |
| 672 |
\XCM@definecolor{PinkA700}{C51162} |
| 673 |
\definecolor{\XCM@prefix Pink}{named}{\XCM@prefix Pink500} |
| 674 |
% \end{macrocode} |
| 675 |
% |
| 676 |
% \subsection{Purple} |
| 677 |
% \begin{macrocode} |
| 678 |
\XCM@definecolor{Purple50} {F3E5F5} |
| 679 |
\XCM@definecolor{Purple100} {E1BEE7} |
| 680 |
\XCM@definecolor{Purple200} {CE93D8} |
| 681 |
\XCM@definecolor{Purple300} {BA68C8} |
| 682 |
\XCM@definecolor{Purple400} {AB47BC} |
| 683 |
\XCM@definecolor{Purple500} {9C27B0} |
| 684 |
\XCM@definecolor{Purple600} {8E24AA} |
| 685 |
\XCM@definecolor{Purple700} {7B1FA2} |
| 686 |
\XCM@definecolor{Purple800} {6A1B9A} |
| 687 |
\XCM@definecolor{Purple900} {4A148C} |
| 688 |
\XCM@definecolor{PurpleA100}{EA80FC} |
| 689 |
\XCM@definecolor{PurpleA200}{E040FB} |
| 690 |
\XCM@definecolor{PurpleA400}{D500F9} |
| 691 |
\XCM@definecolor{PurpleA700}{AA00FF} |
| 692 |
\definecolor{\XCM@prefix Purple}{named}{\XCM@prefix Purple500} |
| 693 |
% \end{macrocode} |
| 694 |
% |
| 695 |
% \subsection{Deep Purple} |
| 696 |
% \begin{macrocode} |
| 697 |
\XCM@definecolor{DeepPurple50} {EDE7F6} |
| 698 |
\XCM@definecolor{DeepPurple100} {D1C4E9} |
| 699 |
\XCM@definecolor{DeepPurple200} {B39DDB} |
| 700 |
\XCM@definecolor{DeepPurple300} {9575CD} |
| 701 |
\XCM@definecolor{DeepPurple400} {7E57C2} |
| 702 |
\XCM@definecolor{DeepPurple500} {673AB7} |
| 703 |
\XCM@definecolor{DeepPurple600} {5E35B1} |
| 704 |
\XCM@definecolor{DeepPurple700} {512DA8} |
| 705 |
\XCM@definecolor{DeepPurple800} {4527A0} |
| 706 |
\XCM@definecolor{DeepPurple900} {311B92} |
| 707 |
\XCM@definecolor{DeepPurpleA100}{B388FF} |
| 708 |
\XCM@definecolor{DeepPurpleA200}{7C4DFF} |
| 709 |
\XCM@definecolor{DeepPurpleA400}{651FFF} |
| 710 |
\XCM@definecolor{DeepPurpleA700}{6200EA} |
| 711 |
\definecolor{\XCM@prefix DeepPurple}{named}{\XCM@prefix DeepPurple500} |
| 712 |
% \end{macrocode} |
| 713 |
% |
| 714 |
% \subsection{Indigo} |
| 715 |
% \begin{macrocode} |
| 716 |
\XCM@definecolor{Indigo50} {E8EAF6} |
| 717 |
\XCM@definecolor{Indigo100} {C5CAE9} |
| 718 |
\XCM@definecolor{Indigo200} {9FA8DA} |
| 719 |
\XCM@definecolor{Indigo300} {7986CB} |
| 720 |
\XCM@definecolor{Indigo400} {5C6BC0} |
| 721 |
\XCM@definecolor{Indigo500} {3F51B5} |
| 722 |
\XCM@definecolor{Indigo600} {3949AB} |
| 723 |
\XCM@definecolor{Indigo700} {303F9F} |
| 724 |
\XCM@definecolor{Indigo800} {283593} |
| 725 |
\XCM@definecolor{Indigo900} {1A237E} |
| 726 |
\XCM@definecolor{IndigoA100}{8C9EFF} |
| 727 |
\XCM@definecolor{IndigoA200}{536DFE} |
| 728 |
\XCM@definecolor{IndigoA400}{3D5AFE} |
| 729 |
\XCM@definecolor{IndigoA700}{304FFE} |
| 730 |
\definecolor{\XCM@prefix Indigo}{named}{\XCM@prefix Indigo500} |
| 731 |
% \end{macrocode} |
| 732 |
% |
| 733 |
% \subsection{Blue} |
| 734 |
% \begin{macrocode} |
| 735 |
\XCM@definecolor{Blue50} {E3F2FD} |
| 736 |
\XCM@definecolor{Blue100} {BBDEFB} |
| 737 |
\XCM@definecolor{Blue200} {90CAF9} |
| 738 |
\XCM@definecolor{Blue300} {64B5F6} |
| 739 |
\XCM@definecolor{Blue400} {42A5F5} |
| 740 |
\XCM@definecolor{Blue500} {2196F3} |
| 741 |
\XCM@definecolor{Blue600} {1E88E5} |
| 742 |
\XCM@definecolor{Blue700} {1976D2} |
| 743 |
\XCM@definecolor{Blue800} {1565C0} |
| 744 |
\XCM@definecolor{Blue900} {0D47A1} |
| 745 |
\XCM@definecolor{BlueA100}{82B1FF} |
| 746 |
\XCM@definecolor{BlueA200}{448AFF} |
| 747 |
\XCM@definecolor{BlueA400}{2979FF} |
| 748 |
\XCM@definecolor{BlueA700}{2962FF} |
| 749 |
\definecolor{\XCM@prefix Blue}{named}{\XCM@prefix Blue500} |
| 750 |
% \end{macrocode} |
| 751 |
% |
| 752 |
% \subsection{Light Blue} |
| 753 |
% \begin{macrocode} |
| 754 |
\XCM@definecolor{LightBlue50} {E1F5FE} |
| 755 |
\XCM@definecolor{LightBlue100} {B3E5FC} |
| 756 |
\XCM@definecolor{LightBlue200} {81D4FA} |
| 757 |
\XCM@definecolor{LightBlue300} {4FC3F7} |
| 758 |
\XCM@definecolor{LightBlue400} {29B6F6} |
| 759 |
\XCM@definecolor{LightBlue500} {03A9F4} |
| 760 |
\XCM@definecolor{LightBlue600} {039BE5} |
| 761 |
\XCM@definecolor{LightBlue700} {0288D1} |
| 762 |
\XCM@definecolor{LightBlue800} {0277BD} |
| 763 |
\XCM@definecolor{LightBlue900} {01579B} |
| 764 |
\XCM@definecolor{LightBlueA100}{80D8FF} |
| 765 |
\XCM@definecolor{LightBlueA200}{40C4FF} |
| 766 |
\XCM@definecolor{LightBlueA400}{00B0FF} |
| 767 |
\XCM@definecolor{LightBlueA700}{0091EA} |
| 768 |
\definecolor{\XCM@prefix LightBlue}{named}{\XCM@prefix LightBlue500} |
| 769 |
% \end{macrocode} |
| 770 |
% |
| 771 |
% \subsection{Cyan} |
| 772 |
% \begin{macrocode} |
| 773 |
\XCM@definecolor{Cyan50} {E0F7FA} |
| 774 |
\XCM@definecolor{Cyan100} {B2EBF2} |
| 775 |
\XCM@definecolor{Cyan200} {80DEEA} |
| 776 |
\XCM@definecolor{Cyan300} {4DD0E1} |
| 777 |
\XCM@definecolor{Cyan400} {26C6DA} |
| 778 |
\XCM@definecolor{Cyan500} {00BCD4} |
| 779 |
\XCM@definecolor{Cyan600} {00ACC1} |
| 780 |
\XCM@definecolor{Cyan700} {0097A7} |
| 781 |
\XCM@definecolor{Cyan800} {00838F} |
| 782 |
\XCM@definecolor{Cyan900} {006064} |
| 783 |
\XCM@definecolor{CyanA100}{84FFFF} |
| 784 |
\XCM@definecolor{CyanA200}{18FFFF} |
| 785 |
\XCM@definecolor{CyanA400}{00E5FF} |
| 786 |
\XCM@definecolor{CyanA700}{00B8D4} |
| 787 |
\definecolor{\XCM@prefix Cyan}{named}{\XCM@prefix Cyan500} |
| 788 |
% \end{macrocode} |
| 789 |
% |
| 790 |
% \subsection{Teal} |
| 791 |
% \begin{macrocode} |
| 792 |
\XCM@definecolor{Teal50} {E0F2F1} |
| 793 |
\XCM@definecolor{Teal100} {B2DFDB} |
| 794 |
\XCM@definecolor{Teal200} {80CBC4} |
| 795 |
\XCM@definecolor{Teal300} {4DB6AC} |
| 796 |
\XCM@definecolor{Teal400} {26A69A} |
| 797 |
\XCM@definecolor{Teal500} {009688} |
| 798 |
\XCM@definecolor{Teal600} {00897B} |
| 799 |
\XCM@definecolor{Teal700} {00796B} |
| 800 |
\XCM@definecolor{Teal800} {00695C} |
| 801 |
\XCM@definecolor{Teal900} {004D40} |
| 802 |
\XCM@definecolor{TealA100}{A7FFEB} |
| 803 |
\XCM@definecolor{TealA200}{64FFDA} |
| 804 |
\XCM@definecolor{TealA400}{1DE9B6} |
| 805 |
\XCM@definecolor{TealA700}{00BFA5} |
| 806 |
\definecolor{\XCM@prefix Teal}{named}{\XCM@prefix Teal500} |
| 807 |
% \end{macrocode} |
| 808 |
% |
| 809 |
% \subsection{Green} |
| 810 |
% \begin{macrocode} |
| 811 |
\XCM@definecolor{Green50} {E8F5E9} |
| 812 |
\XCM@definecolor{Green100} {C8E6C9} |
| 813 |
\XCM@definecolor{Green200} {A5D6A7} |
| 814 |
\XCM@definecolor{Green300} {81C784} |
| 815 |
\XCM@definecolor{Green400} {66BB6A} |
| 816 |
\XCM@definecolor{Green500} {4CAF50} |
| 817 |
\XCM@definecolor{Green600} {43A047} |
| 818 |
\XCM@definecolor{Green700} {388E3C} |
| 819 |
\XCM@definecolor{Green800} {2E7D32} |
| 820 |
\XCM@definecolor{Green900} {1B5E20} |
| 821 |
\XCM@definecolor{GreenA100}{B9F6CA} |
| 822 |
\XCM@definecolor{GreenA200}{69F0AE} |
| 823 |
\XCM@definecolor{GreenA400}{00E676} |
| 824 |
\XCM@definecolor{GreenA700}{00C853} |
| 825 |
\definecolor{\XCM@prefix Green}{named}{\XCM@prefix Green500} |
| 826 |
% \end{macrocode} |
| 827 |
% |
| 828 |
% \subsection{Light Green} |
| 829 |
% \begin{macrocode} |
| 830 |
\XCM@definecolor{LightGreen50} {F1F8E9} |
| 831 |
\XCM@definecolor{LightGreen100} {DCEDC8} |
| 832 |
\XCM@definecolor{LightGreen200} {C5E1A5} |
| 833 |
\XCM@definecolor{LightGreen300} {AED581} |
| 834 |
\XCM@definecolor{LightGreen400} {9CCC65} |
| 835 |
\XCM@definecolor{LightGreen500} {8BC34A} |
| 836 |
\XCM@definecolor{LightGreen600} {7CB342} |
| 837 |
\XCM@definecolor{LightGreen700} {689F38} |
| 838 |
\XCM@definecolor{LightGreen800} {558B2F} |
| 839 |
\XCM@definecolor{LightGreen900} {33691E} |
| 840 |
\XCM@definecolor{LightGreenA100}{CCFF90} |
| 841 |
\XCM@definecolor{LightGreenA200}{B2FF59} |
| 842 |
\XCM@definecolor{LightGreenA400}{76FF03} |
| 843 |
\XCM@definecolor{LightGreenA700}{64DD17} |
| 844 |
\definecolor{\XCM@prefix LightGreen}{named}{\XCM@prefix LightGreen500} |
| 845 |
% \end{macrocode} |
| 846 |
% |
| 847 |
% \subsection{Lime} |
| 848 |
% \begin{macrocode} |
| 849 |
\XCM@definecolor{Lime50} {F9FBE7} |
| 850 |
\XCM@definecolor{Lime100} {F0F4C3} |
| 851 |
\XCM@definecolor{Lime200} {E6EE9C} |
| 852 |
\XCM@definecolor{Lime300} {DCE775} |
| 853 |
\XCM@definecolor{Lime400} {D4E157} |
| 854 |
\XCM@definecolor{Lime500} {CDDC39} |
| 855 |
\XCM@definecolor{Lime600} {C0CA33} |
| 856 |
\XCM@definecolor{Lime700} {AFB42B} |
| 857 |
\XCM@definecolor{Lime800} {9E9D24} |
| 858 |
\XCM@definecolor{Lime900} {827717} |
| 859 |
\XCM@definecolor{LimeA100}{F4FF81} |
| 860 |
\XCM@definecolor{LimeA200}{EEFF41} |
| 861 |
\XCM@definecolor{LimeA400}{C6FF00} |
| 862 |
\XCM@definecolor{LimeA700}{AEEA00} |
| 863 |
\definecolor{\XCM@prefix Lime}{named}{\XCM@prefix Lime500} |
| 864 |
% \end{macrocode} |
| 865 |
% |
| 866 |
% \subsection{Yellow} |
| 867 |
% \begin{macrocode} |
| 868 |
\XCM@definecolor{Yellow50} {FFFDE7} |
| 869 |
\XCM@definecolor{Yellow100} {FFF9C4} |
| 870 |
\XCM@definecolor{Yellow200} {FFF59D} |
| 871 |
\XCM@definecolor{Yellow300} {FFF176} |
| 872 |
\XCM@definecolor{Yellow400} {FFEE58} |
| 873 |
\XCM@definecolor{Yellow500} {FFEB3B} |
| 874 |
\XCM@definecolor{Yellow600} {FDD835} |
| 875 |
\XCM@definecolor{Yellow700} {FBC02D} |
| 876 |
\XCM@definecolor{Yellow800} {F9A825} |
| 877 |
\XCM@definecolor{Yellow900} {F57F17} |
| 878 |
\XCM@definecolor{YellowA100}{FFFF8D} |
| 879 |
\XCM@definecolor{YellowA200}{FFFF00} |
| 880 |
\XCM@definecolor{YellowA400}{FFEA00} |
| 881 |
\XCM@definecolor{YellowA700}{FFD600} |
| 882 |
\definecolor{\XCM@prefix Yellow}{named}{\XCM@prefix Yellow500} |
| 883 |
% \end{macrocode} |
| 884 |
% |
| 885 |
% \subsection{Amber} |
| 886 |
% \begin{macrocode} |
| 887 |
\XCM@definecolor{Amber50} {FFF8E1} |
| 888 |
\XCM@definecolor{Amber100} {FFECB3} |
| 889 |
\XCM@definecolor{Amber200} {FFE082} |
| 890 |
\XCM@definecolor{Amber300} {FFD54F} |
| 891 |
\XCM@definecolor{Amber400} {FFCA28} |
| 892 |
\XCM@definecolor{Amber500} {FFC107} |
| 893 |
\XCM@definecolor{Amber600} {FFB300} |
| 894 |
\XCM@definecolor{Amber700} {FFA000} |
| 895 |
\XCM@definecolor{Amber800} {FF8F00} |
| 896 |
\XCM@definecolor{Amber900} {FF6F00} |
| 897 |
\XCM@definecolor{AmberA100}{FFE57F} |
| 898 |
\XCM@definecolor{AmberA200}{FFD740} |
| 899 |
\XCM@definecolor{AmberA400}{FFC400} |
| 900 |
\XCM@definecolor{AmberA700}{FFAB00} |
| 901 |
\definecolor{\XCM@prefix Amber}{named}{\XCM@prefix Amber500} |
| 902 |
% \end{macrocode} |
| 903 |
% |
| 904 |
% \subsection{Orange} |
| 905 |
% \begin{macrocode} |
| 906 |
\XCM@definecolor{Orange50} {FFF3E0} |
| 907 |
\XCM@definecolor{Orange100} {FFE0B2} |
| 908 |
\XCM@definecolor{Orange200} {FFCC80} |
| 909 |
\XCM@definecolor{Orange300} {FFB74D} |
| 910 |
\XCM@definecolor{Orange400} {FFA726} |
| 911 |
\XCM@definecolor{Orange500} {FF9800} |
| 912 |
\XCM@definecolor{Orange600} {FB8C00} |
| 913 |
\XCM@definecolor{Orange700} {F57C00} |
| 914 |
\XCM@definecolor{Orange800} {EF6C00} |
| 915 |
\XCM@definecolor{Orange900} {E65100} |
| 916 |
\XCM@definecolor{OrangeA100}{FFD180} |
| 917 |
\XCM@definecolor{OrangeA200}{FFAB40} |
| 918 |
\XCM@definecolor{OrangeA400}{FF9100} |
| 919 |
\XCM@definecolor{OrangeA700}{FF6D00} |
| 920 |
\definecolor{\XCM@prefix Orange}{named}{\XCM@prefix Orange500} |
| 921 |
% \end{macrocode} |
| 922 |
% |
| 923 |
% \subsection{Deep Orange} |
| 924 |
% \begin{macrocode} |
| 925 |
\XCM@definecolor{DeepOrange50} {FBE9E7} |
| 926 |
\XCM@definecolor{DeepOrange100} {FFCCBC} |
| 927 |
\XCM@definecolor{DeepOrange200} {FFAB91} |
| 928 |
\XCM@definecolor{DeepOrange300} {FF8A65} |
| 929 |
\XCM@definecolor{DeepOrange400} {FF7043} |
| 930 |
\XCM@definecolor{DeepOrange500} {FF5722} |
| 931 |
\XCM@definecolor{DeepOrange600} {F4511E} |
| 932 |
\XCM@definecolor{DeepOrange700} {E64A19} |
| 933 |
\XCM@definecolor{DeepOrange800} {D84315} |
| 934 |
\XCM@definecolor{DeepOrange900} {BF360C} |
| 935 |
\XCM@definecolor{DeepOrangeA100}{FF9E80} |
| 936 |
\XCM@definecolor{DeepOrangeA200}{FF6E40} |
| 937 |
\XCM@definecolor{DeepOrangeA400}{FF3D00} |
| 938 |
\XCM@definecolor{DeepOrangeA700}{DD2C00} |
| 939 |
\definecolor{\XCM@prefix DeepOrange}{named}{\XCM@prefix DeepOrange500} |
| 940 |
% \end{macrocode} |
| 941 |
% |
| 942 |
% \subsection{Brown} |
| 943 |
% \begin{macrocode} |
| 944 |
\XCM@definecolor{Brown50} {EFEBE9} |
| 945 |
\XCM@definecolor{Brown100}{D7CCC8} |
| 946 |
\XCM@definecolor{Brown200}{BCAAA4} |
| 947 |
\XCM@definecolor{Brown300}{A1887F} |
| 948 |
\XCM@definecolor{Brown400}{8D6E63} |
| 949 |
\XCM@definecolor{Brown500}{795548} |
| 950 |
\XCM@definecolor{Brown600}{6D4C41} |
| 951 |
\XCM@definecolor{Brown700}{5D4037} |
| 952 |
\XCM@definecolor{Brown800}{4E342E} |
| 953 |
\XCM@definecolor{Brown900}{3E2723} |
| 954 |
\definecolor{\XCM@prefix Brown}{named}{\XCM@prefix Brown500} |
| 955 |
% \end{macrocode} |
| 956 |
% |
| 957 |
% \subsection{Grey} |
| 958 |
% \begin{macrocode} |
| 959 |
\XCM@definecolor{Grey50} {FAFAFA} |
| 960 |
\XCM@definecolor{Grey100}{F5F5F5} |
| 961 |
\XCM@definecolor{Grey200}{EEEEEE} |
| 962 |
\XCM@definecolor{Grey300}{E0E0E0} |
| 963 |
\XCM@definecolor{Grey400}{BDBDBD} |
| 964 |
\XCM@definecolor{Grey500}{9E9E9E} |
| 965 |
\XCM@definecolor{Grey600}{757575} |
| 966 |
\XCM@definecolor{Grey700}{616161} |
| 967 |
\XCM@definecolor{Grey800}{424242} |
| 968 |
\XCM@definecolor{Grey900}{212121} |
| 969 |
\definecolor{\XCM@prefix Grey}{named}{\XCM@prefix Grey500} |
| 970 |
% \end{macrocode} |
| 971 |
% |
| 972 |
% \subsection{Blue Grey} |
| 973 |
% \begin{macrocode} |
| 974 |
\XCM@definecolor{BlueGrey50} {ECEFF1} |
| 975 |
\XCM@definecolor{BlueGrey100}{CFD8DC} |
| 976 |
\XCM@definecolor{BlueGrey200}{B0BEC5} |
| 977 |
\XCM@definecolor{BlueGrey300}{90A4AE} |
| 978 |
\XCM@definecolor{BlueGrey400}{78909C} |
| 979 |
\XCM@definecolor{BlueGrey500}{607D8B} |
| 980 |
\XCM@definecolor{BlueGrey600}{546E7A} |
| 981 |
\XCM@definecolor{BlueGrey700}{455A64} |
| 982 |
\XCM@definecolor{BlueGrey800}{37474F} |
| 983 |
\XCM@definecolor{BlueGrey900}{263238} |
| 984 |
\definecolor{\XCM@prefix BlueGrey}{named}{\XCM@prefix BlueGrey500} |
| 985 |
% \end{macrocode} |
| 986 |
% |
| 987 |
% \subsection{Black \& White} |
| 988 |
% \begin{macrocode} |
| 989 |
\XCM@definecolor{Black}{000000} |
| 990 |
\XCM@definecolor{White}{FFFFFF} |
| 991 |
% \end{macrocode} |
| 992 |
% |
| 993 |
% \subsection[Google colors]{\google\ colors} |
| 994 |
% The \google\ Indentity colors are available at |
| 995 |
% \url{https://design.google.com/articles/evolving-the-google-identity}. |
| 996 |
% \begin{macrocode} |
| 997 |
\definecolor{GoogleBlue} {HTML}{4285F4} |
| 998 |
\definecolor{GoogleGreen} {HTML}{34A853} |
| 999 |
\definecolor{GoogleYellow}{HTML}{FBBC05} |
| 1000 |
\definecolor{GoogleRed} {HTML}{EA4335} |
| 1001 |
% \end{macrocode} |
| 1002 |
% |
| 1003 |
% \section{User-level macros} |
| 1004 |
% |
| 1005 |
% \begin{macro}{\XCM@extractcolor} |
| 1006 |
% An internal macro to extract and convert color values. |
| 1007 |
% \begin{macrocode} |
| 1008 |
\newcommand{\XCM@extractcolor}[2]{% |
| 1009 |
\extractcolorspecs{#1}{\model}{\colorval}% |
| 1010 |
\convertcolorspec{\model}{\colorval}{#2}\extractedcolor |
| 1011 |
\extractedcolor |
| 1012 |
} |
| 1013 |
% \end{macrocode} |
| 1014 |
% \end{macro} |
| 1015 |
% \begin{macro}{\printcolorvalue} |
| 1016 |
% A user level macro to provide color values formatted in three different color |
| 1017 |
% models: \textbf{HTML}, \textbf{RGB}, and \textbf{CMYK}. The default value for |
| 1018 |
% the color model is |HTML|, that provides color values in hexadecimal format. |
| 1019 |
% \begin{macrocode} |
| 1020 |
\newcommand*{\printcolorvalue}[2][HTML]{% |
| 1021 |
\edef\XCM@requiredModel{#1}% |
| 1022 |
\def\XCM@HTMLModel{HTML}% |
| 1023 |
\def\XCM@RGBModel{RGB}% |
| 1024 |
\def\XCM@CMYKModel{cmyk}% |
| 1025 |
\ifx\XCM@requiredModel\XCM@HTMLModel |
| 1026 |
\#\XCM@extractcolor{#2}{#1}% |
| 1027 |
\else\ifx\XCM@requiredModel\XCM@RGBModel |
| 1028 |
rgb(\XCM@extractcolor{#2}{#1})% |
| 1029 |
\else\ifx\XCM@requiredModel\XCM@CMYKModel |
| 1030 |
cmyk(\XCM@extractcolor{#2}{#1})% |
| 1031 |
\else\fi\fi\fi |
| 1032 |
} |
| 1033 |
% \end{macrocode} |
| 1034 |
% \end{macro} |
| 1035 |
% \begin{macro}{\colorsample} |
| 1036 |
% A user level macro for drawing color samples. It draws a |colorbox| with |
| 1037 |
% the specified color and value. By default the color model is |HTML|, |
| 1038 |
% the text color is |white|, and the colorbox width is |6.5em|. |
| 1039 |
% \begin{macrocode} |
| 1040 |
\def\colorsample{% |
| 1041 |
\@ifnextchar[% |
| 1042 |
{\XCM@colorsample@i} |
| 1043 |
{\XCM@colorsample@i[HTML]}% |
| 1044 |
} |
| 1045 |
\def\XCM@colorsample@i[#1]{% |
| 1046 |
\@ifnextchar[% |
| 1047 |
{\XCM@colorsample@ii{#1}} |
| 1048 |
{\XCM@colorsample@ii{#1}[6.5em]}% |
| 1049 |
} |
| 1050 |
\def\XCM@colorsample@ii#1[#2]{% |
| 1051 |
\@ifnextchar[% |
| 1052 |
{\XCM@colorsample@iii{#1}{#2}} |
| 1053 |
{\XCM@colorsample@iii{#1}{#2}[white]}% |
| 1054 |
} |
| 1055 |
\def\XCM@colorsample@iii#1#2[#3]#4{% |
| 1056 |
\@ifnextchar[% |
| 1057 |
{\XCM@colorsample@iv{#1}{#2}{#3}{#4}} |
| 1058 |
{\XCM@colorsample@iv{#1}{#2}{#3}{#4}[#4]}% |
| 1059 |
} |
| 1060 |
\def\XCM@colorsample@iv#1#2#3#4[#5]{% |
| 1061 |
\def\XCM@temp{#2}\ifx\XCM@temp\empty |
| 1062 |
\def\XCM@boxwidth{6.5em}% |
| 1063 |
\else |
| 1064 |
\def\XCM@boxwidth{#2}% |
| 1065 |
\fi |
| 1066 |
\selectcolormodel{#1} |
| 1067 |
\colorbox{#4}{% |
| 1068 |
\hspace*{.3em} |
| 1069 |
\parbox[b][9\baselineskip]{\XCM@boxwidth}{% |
| 1070 |
\footnotesize\bfseries\sffamily\color{#3} |
| 1071 |
\vspace*{.7em} |
| 1072 |
\raggedright#5% |
| 1073 |
\vfill |
| 1074 |
\raggedright\texttt{\printcolorvalue[#1]{#4}} |
| 1075 |
\vspace*{.7em} |
| 1076 |
} |
| 1077 |
\hspace*{.3em} |
| 1078 |
} |
| 1079 |
} |
| 1080 |
% \end{macrocode} |
| 1081 |
% \end{macro} |
| 1082 |
% \xmpkg\ provides some macro definitions at begin document. |
| 1083 |
% \begin{macrocode} |
| 1084 |
\AtBeginDocument{ |
| 1085 |
% \end{macrocode} |
| 1086 |
% There is a macro definition that is built on top of the \tikzpkg\ package. |
| 1087 |
% This definition works if such package is loaded in the main document. |
| 1088 |
% \begin{macrocode} |
| 1089 |
\@ifpackageloaded{tikz}{% |
| 1090 |
% \end{macrocode} |
| 1091 |
% When \tikzpkg\ is loaded, a macro with key-value options is provided using |
| 1092 |
% the |\pgfkeys| tools. Those key-value macro arguments are optional, the |
| 1093 |
% default value of each one is defined by the |/palette/both| style. |
| 1094 |
% \begin{macrocode} |
| 1095 |
\pgfkeys{/palette/.is family, /palette, |
| 1096 |
width/.estore in = \XCM@pltWidth, |
| 1097 |
height/.estore in = \XCM@pltHeight, |
| 1098 |
shape/.estore in = \XCM@pltShape, |
| 1099 |
title/.estore in = \XCM@pltTitle, |
| 1100 |
title text color/.estore in = \XCM@pltTTextColor, |
| 1101 |
init text color/.estore in = \XCM@pltITextColor, |
| 1102 |
altern text color/.estore in = \XCM@pltATextColor, |
| 1103 |
variation font/.store in = \XCM@pltVFont, |
| 1104 |
value font/.store in = \XCM@pltNFont, |
| 1105 |
title font/.store in = \XCM@pltTFont, |
| 1106 |
colorbox sep/.estore in = \XCM@pltColorboxSep, |
| 1107 |
first colorbox sep/.estore in = \XCM@pltFirstCSep, |
| 1108 |
title colorbox height/.estore in = \XCM@pltTitleHeight, |
| 1109 |
primary palette/.estore in = \XCM@pltPrimary, |
| 1110 |
secondary palette/.estore in = \XCM@pltSecondary, |
| 1111 |
percent char/.estore in = \XCM@pltPercentSep, |
| 1112 |
primary variation/.estore in = \XCM@pltPrimaryBase, |
| 1113 |
primary toggle at/.estore in = \XCM@pltPToggle, |
| 1114 |
secondary toggle at/.estore in = \XCM@pltSToggle, |
| 1115 |
color model/.estore in = \XCM@ColorModel, |
| 1116 |
both/.style = {width = .45\textwidth, |
| 1117 |
height = 2\baselineskip, |
| 1118 |
shape = rectangle, |
| 1119 |
title text color = white, |
| 1120 |
init text color = black, |
| 1121 |
altern text color = white, |
| 1122 |
colorbox sep = 0pt, |
| 1123 |
first colorbox sep = .2\baselineskip, |
| 1124 |
title colorbox height = 6\baselineskip, |
| 1125 |
variation font = \sffamily, |
| 1126 |
value font = \ttfamily, |
| 1127 |
title font = \sffamily\bfseries, |
| 1128 |
primary palette = {50,100,200,...,900}, |
| 1129 |
secondary palette = {A100,A200,A400,A700}, |
| 1130 |
percent char = {}, |
| 1131 |
primary variation = 500, |
| 1132 |
primary toggle at = 1000, |
| 1133 |
secondary toggle at = 1000, |
| 1134 |
color model = HTML}, |
| 1135 |
primary/.style = {primary palette = {50,100,200,...,900}, |
| 1136 |
secondary palette={}, |
| 1137 |
primary variation = 500, |
| 1138 |
percent char={}}, |
| 1139 |
basic/.style = {primary palette = {10,20,...,100}, |
| 1140 |
secondary palette={}, |
| 1141 |
primary variation = 100, |
| 1142 |
percent char=!} |
| 1143 |
} |
| 1144 |
% \end{macrocode} |
| 1145 |
% The |positioning| library of \tikzpkg\ is loaded to provide convenient node |
| 1146 |
% placement. |
| 1147 |
% \begin{macrocode} |
| 1148 |
\usetikzlibrary{positioning} |
| 1149 |
% \end{macrocode} |
| 1150 |
% \begin{macro}{\colorpalette} |
| 1151 |
% A macro for drawing color palettes using \tikzpkg\. It takes one mandatory |
| 1152 |
% argument (\emph{base color name}) and optional key-value arguments. |
| 1153 |
% \begin{macrocode} |
| 1154 |
\newcommand*{\colorpalette}[2][]{% |
| 1155 |
\def\XCM@pltTitle{#2}% |
| 1156 |
\def\XCM@colorname{#2}% |
| 1157 |
\pgfkeys{/palette, both, #1}% |
| 1158 |
\begin{tikzpicture} |
| 1159 |
\selectcolormodel{\XCM@ColorModel} |
| 1160 |
\tikzset{colorbox/.style={\XCM@pltShape, minimum width=\XCM@pltWidth, |
| 1161 |
minimum height=\XCM@pltHeight, node distance=\XCM@pltColorboxSep, |
| 1162 |
outer sep=0pt}} |
| 1163 |
\tikzset{title/.style = {font=\XCM@pltTFont, color=\XCM@pltTTextColor, |
| 1164 |
inner sep=1em}} |
| 1165 |
\tikzset{variant/.style = {font=\XCM@pltVFont, inner sep=1em}} |
| 1166 |
\tikzset{value/.style = {font=\XCM@pltNFont, inner sep=1em}} |
| 1167 |
\node[colorbox, fill=\XCM@colorname\XCM@pltPercentSep\XCM@pltPrimaryBase, |
| 1168 |
minimum height=\XCM@pltTitleHeight, alias=last] {}; |
| 1169 |
\node[title, anchor=north west, align=left] at (last.north west) |
| 1170 |
{\XCM@pltTitle}; |
| 1171 |
\node[title, anchor=south west] at (last.south west) {\XCM@pltPrimaryBase}; |
| 1172 |
\node[title, anchor=south east, align=right] at (last.south east) |
| 1173 |
{\texttt{\printcolorvalue[\XCM@ColorModel]{\XCM@colorname% |
| 1174 |
\XCM@pltPercentSep\XCM@pltPrimaryBase}}}; |
| 1175 |
\def\auxcolor{\XCM@pltITextColor}% |
| 1176 |
\def\first{1}% |
| 1177 |
\foreach \variant [count=\i] in \XCM@pltPrimary { |
| 1178 |
\ifx\i\first |
| 1179 |
\node[node distance=\XCM@pltFirstCSep, inner sep=0pt, below=of last, |
| 1180 |
alias=last] {}; |
| 1181 |
\else\fi |
| 1182 |
\ifx\variant\XCM@pltPToggle |
| 1183 |
\gdef\auxcolor{\XCM@pltATextColor}% |
| 1184 |
\else\fi |
| 1185 |
\node[colorbox, fill=\XCM@colorname\XCM@pltPercentSep\variant, |
| 1186 |
below=of last, alias=last] {}; |
| 1187 |
\node[variant, anchor=west, color=\auxcolor] at (last.west) {\variant}; |
| 1188 |
\node[value, anchor=east, color=\auxcolor, align=right] at (last.east) |
| 1189 |
{\printcolorvalue[\XCM@ColorModel]{\XCM@colorname% |
| 1190 |
\XCM@pltPercentSep\variant}}; |
| 1191 |
}% |
| 1192 |
\def\auxcolor{\XCM@pltITextColor}% |
| 1193 |
\foreach \variant [count=\i] in \XCM@pltSecondary { |
| 1194 |
\ifx\i\first |
| 1195 |
\node[node distance=\XCM@pltFirstCSep, inner sep=0pt, below=of last, |
| 1196 |
alias=last] {}; |
| 1197 |
\else\fi |
| 1198 |
\ifx\variant\XCM@pltSToggle |
| 1199 |
\gdef\auxcolor{\XCM@pltATextColor}% |
| 1200 |
\else\fi |
| 1201 |
\node[colorbox, fill=\XCM@colorname\XCM@pltPercentSep\variant, |
| 1202 |
below=of last, alias=last] {}; |
| 1203 |
\node[variant, anchor=west, color=\auxcolor] at (last.west) {\variant}; |
| 1204 |
\node[value, anchor=east, color=\auxcolor, align=right] at (last.east) |
| 1205 |
{\printcolorvalue[\XCM@ColorModel]{\XCM@colorname% |
| 1206 |
\XCM@pltPercentSep\variant}}; |
| 1207 |
}% |
| 1208 |
\end{tikzpicture}% |
| 1209 |
} |
| 1210 |
% \end{macrocode} |
| 1211 |
% \end{macro} |
| 1212 |
% \begin{macrocode} |
| 1213 |
}{} |
| 1214 |
} |
| 1215 |
% \end{macrocode} |
| 1216 |
% \Finale |
| 1217 |
\endinput |