texlive[68831] Master/texmf-dist: xcolor (13nov23)

commits+karl at tug.org commits+karl at tug.org
Mon Nov 13 21:35:10 CET 2023


Revision: 68831
          https://tug.org/svn/texlive?view=revision&revision=68831
Author:   karl
Date:     2023-11-13 21:35:10 +0100 (Mon, 13 Nov 2023)
Log Message:
-----------
xcolor (13nov23)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/xcolor/ChangeLog
    trunk/Master/texmf-dist/doc/latex/xcolor/README.md
    trunk/Master/texmf-dist/doc/latex/xcolor/xcolor.lox
    trunk/Master/texmf-dist/doc/latex/xcolor/xcolor.pdf
    trunk/Master/texmf-dist/doc/latex/xcolor/xcolor1.tex
    trunk/Master/texmf-dist/doc/latex/xcolor/xcolor2.pdf
    trunk/Master/texmf-dist/doc/latex/xcolor/xcolor2.tex
    trunk/Master/texmf-dist/doc/latex/xcolor/xcolor3.tex
    trunk/Master/texmf-dist/doc/latex/xcolor/xcolor4.tex
    trunk/Master/texmf-dist/dvips/xcolor/xcolor.pro
    trunk/Master/texmf-dist/source/latex/xcolor/xcolor.dtx
    trunk/Master/texmf-dist/tex/latex/xcolor/svgnam.def
    trunk/Master/texmf-dist/tex/latex/xcolor/x11nam.def
    trunk/Master/texmf-dist/tex/latex/xcolor/xcolor.sty

Added Paths:
-----------
    trunk/Master/texmf-dist/tex/latex/xcolor/xcolor-2022-06-12.sty

Modified: trunk/Master/texmf-dist/doc/latex/xcolor/ChangeLog
===================================================================
--- trunk/Master/texmf-dist/doc/latex/xcolor/ChangeLog	2023-11-13 20:34:52 UTC (rev 68830)
+++ trunk/Master/texmf-dist/doc/latex/xcolor/ChangeLog	2023-11-13 20:35:10 UTC (rev 68831)
@@ -3,6 +3,17 @@
 
 History
 =======
+2023/11/11 v3.00
+* If a LaTeX older than 2022-06-01 is detected a frozen version is used.
+  All new features apply only if LaTeX 2022-06-01 or newer is detected.
+  The frozen version can also be requested with \usepackage{xcolor}[=v2]. 
+* The new LaTeX key/val handler is used for the package options. That means there
+  will be less option clash errors, issue #29
+* The \rowcolors command has moved to the colortbl package
+* The fixpdftex option is obsolete and does nothing at all (issue #20)
+* Extended \normalcolor to set also the "dot" color, issue #19
+* Fix Gray color model, issue #23
+
 2022/06/12 v2.14
 * New features:
     - Load if it exists the code from LaTeX to define \mathcolor.

Modified: trunk/Master/texmf-dist/doc/latex/xcolor/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/xcolor/README.md	2023-11-13 20:34:52 UTC (rev 68830)
+++ trunk/Master/texmf-dist/doc/latex/xcolor/README.md	2023-11-13 20:35:10 UTC (rev 68831)
@@ -1,6 +1,6 @@
 ## Package `xcolor` by Dr. Uwe Kern
 
-Version 2022-06-12 v2.14
+Version 2023-11-11 v3.00
 
 Maintained by the LaTeX Project https://github.com/latex3/xcolor/issues
 
@@ -14,7 +14,7 @@
 
 ## Copyright (C)
 - 2003-2021    Dr. Uwe Kern 
-- 2021-2022    The LaTeX Project 
+- 2021-2023    The LaTeX Project 
 
 ## License
 LaTeX Project Public License, version 1.3c or later.

Modified: trunk/Master/texmf-dist/doc/latex/xcolor/xcolor.lox
===================================================================
--- trunk/Master/texmf-dist/doc/latex/xcolor/xcolor.lox	2023-11-13 20:34:52 UTC (rev 68830)
+++ trunk/Master/texmf-dist/doc/latex/xcolor/xcolor.lox	2023-11-13 20:35:10 UTC (rev 68831)
@@ -23,11 +23,11 @@
 %%
 %% ----------------------------------------------------------------
 %% Copyright (C) 2003-2021 by Dr. Uwe Kern <xcolor at ukern dot de>
-%%               2021-2022    LaTeX Project https://github.com/latex3/xcolor/issues
+%%               2021-2023    LaTeX Project https://github.com/latex3/xcolor/issues
 %% ----------------------------------------------------------------
 %%
-\def\XCfileversion{v2.14}%
-\def\XCfiledate{2022/06/12}%
+\def\XCfileversion{v3.00}%
+\def\XCfiledate{2023/11/11}%
 \def\ukfile#1#2#3#4%
  {\def\ukhead
    {\ifnum#1>2 \perCent!^^J\fi
@@ -53,6 +53,7 @@
 \usepostamble\PStail
 \ukfile3{xcolor}{dvips}{LaTeX color extensions}
 }
+
 \endinput
 %%
 %% End of file `xcolor.lox'.

Modified: trunk/Master/texmf-dist/doc/latex/xcolor/xcolor.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/xcolor/xcolor1.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/xcolor/xcolor1.tex	2023-11-13 20:34:52 UTC (rev 68830)
+++ trunk/Master/texmf-dist/doc/latex/xcolor/xcolor1.tex	2023-11-13 20:35:10 UTC (rev 68831)
@@ -22,15 +22,16 @@
 %% in the same archive or directory.)
 %%
 \ProvidesFile{xcolor1}
- [2022/06/12 v2.14 Color conversion test (UK)]
+ [2023/11/11 v3.00 Color conversion test (UK)]
 %%
 %% ----------------------------------------------------------------
 %% Copyright (C) 2003-2021 by Dr. Uwe Kern <xcolor at ukern dot de>
-%%               2021-2022    LaTeX Project https://github.com/latex3/xcolor/issues
+%%               2021-2023    LaTeX Project https://github.com/latex3/xcolor/issues
 %% ----------------------------------------------------------------
 %%
-\def\XCfileversion{v2.14}%
-\def\XCfiledate{2022/06/12}%
+\def\XCfileversion{v3.00}%
+\def\XCfiledate{2023/11/11}%
+
 \documentclass[a4paper]{article}
 
 \usepackage{array,multicol,multido,textcomp}

Modified: trunk/Master/texmf-dist/doc/latex/xcolor/xcolor2.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/xcolor/xcolor2.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/xcolor/xcolor2.tex	2023-11-13 20:34:52 UTC (rev 68830)
+++ trunk/Master/texmf-dist/doc/latex/xcolor/xcolor2.tex	2023-11-13 20:35:10 UTC (rev 68831)
@@ -22,15 +22,16 @@
 %% in the same archive or directory.)
 %%
 \ProvidesFile{xcolor2}
- [2022/06/12 v2.14 Pstricks color test (UK)]
+ [2023/11/11 v3.00 Pstricks color test (UK)]
 %%
 %% ----------------------------------------------------------------
 %% Copyright (C) 2003-2021 by Dr. Uwe Kern <xcolor at ukern dot de>
-%%               2021-2022    LaTeX Project https://github.com/latex3/xcolor/issues
+%%               2021-2023    LaTeX Project https://github.com/latex3/xcolor/issues
 %% ----------------------------------------------------------------
 %%
-\def\XCfileversion{v2.14}%
-\def\XCfiledate{2022/06/12}%
+\def\XCfileversion{v3.00}%
+\def\XCfiledate{2023/11/11}%
+
 \listfiles
 \documentclass{article}
 

Modified: trunk/Master/texmf-dist/doc/latex/xcolor/xcolor3.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/xcolor/xcolor3.tex	2023-11-13 20:34:52 UTC (rev 68830)
+++ trunk/Master/texmf-dist/doc/latex/xcolor/xcolor3.tex	2023-11-13 20:35:10 UTC (rev 68831)
@@ -22,15 +22,16 @@
 %% in the same archive or directory.)
 %%
 \ProvidesFile{xcolor3}
- [2022/06/12 v2.14 Color logging test (UK)]
+ [2023/11/11 v3.00 Color logging test (UK)]
 %%
 %% ----------------------------------------------------------------
 %% Copyright (C) 2003-2021 by Dr. Uwe Kern <xcolor at ukern dot de>
-%%               2021-2022    LaTeX Project https://github.com/latex3/xcolor/issues
+%%               2021-2023    LaTeX Project https://github.com/latex3/xcolor/issues
 %% ----------------------------------------------------------------
 %%
-\def\XCfileversion{v2.14}%
-\def\XCfiledate{2022/06/12}%
+\def\XCfileversion{v3.00}%
+\def\XCfiledate{2023/11/11}%
+
 \listfiles
 \documentclass[a4paper]{article}
 \usepackage[showerrors,table,dvipsnames*,hyperref]{xcolor}[2005/12/21]

Modified: trunk/Master/texmf-dist/doc/latex/xcolor/xcolor4.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/xcolor/xcolor4.tex	2023-11-13 20:34:52 UTC (rev 68830)
+++ trunk/Master/texmf-dist/doc/latex/xcolor/xcolor4.tex	2023-11-13 20:35:10 UTC (rev 68831)
@@ -22,15 +22,16 @@
 %% in the same archive or directory.)
 %%
 \ProvidesFile{xcolor4}
- [2022/06/12 v2.14 Color driver test (UK)]
+ [2023/11/11 v3.00 Color driver test (UK)]
 %%
 %% ----------------------------------------------------------------
 %% Copyright (C) 2003-2021 by Dr. Uwe Kern <xcolor at ukern dot de>
-%%               2021-2022    LaTeX Project https://github.com/latex3/xcolor/issues
+%%               2021-2023    LaTeX Project https://github.com/latex3/xcolor/issues
 %% ----------------------------------------------------------------
 %%
-\def\XCfileversion{v2.14}%
-\def\XCfiledate{2022/06/12}%
+\def\XCfileversion{v3.00}%
+\def\XCfiledate{2023/11/11}%
+
 \listfiles
 \documentclass[a4paper]{article}
 %%\PassOptionsToPackage{dvipdf}{xcolor}
@@ -126,7 +127,7 @@
    {\immediate\write\@tempa{\@@tmp}}}
 \immediate\closeout\@tempa
 \@@end}% end of driver list construction code
-\edef\Options{\expandafter\@gobble\XC@@opt}
+\edef\Options{}
 \@tfor\@@tmp:={dvipdf}{dvipdfm}{dvipdfmx}{dvips}{dvipsone}{dviwin}{dviwindo}%
               {emtex}{oztex}{pctex32}{pctexhp}{pctexps}{pctexwin}{pdftex}%
               {tcidvi}{textures}{truetex}{vtex}{xdvi}{xetex}%

Modified: trunk/Master/texmf-dist/dvips/xcolor/xcolor.pro
===================================================================
--- trunk/Master/texmf-dist/dvips/xcolor/xcolor.pro	2023-11-13 20:34:52 UTC (rev 68830)
+++ trunk/Master/texmf-dist/dvips/xcolor/xcolor.pro	2023-11-13 20:35:10 UTC (rev 68831)
@@ -23,13 +23,14 @@
 %% in the same archive or directory.)
 %%
 %% xcolor.pro (PostScript/dvips header file)
-%%  [2022/06/12 v2.14 LaTeX color extensions (UK)]
+%%  [2023/11/11 v3.00 LaTeX color extensions (UK)]
 %%
 %% ----------------------------------------------------------------
 %% Copyright (C) 2003-2021 by Dr. Uwe Kern <xcolor at ukern dot de>
-%%               2021-2022    LaTeX Project https://github.com/latex3/xcolor/issues
+%%               2021-2023    LaTeX Project https://github.com/latex3/xcolor/issues
 %% ----------------------------------------------------------------
 %%
+
 userdict begin
 /setcmycolor{0 setcmykcolor}def
 /XCbd{bind def}bind def

Modified: trunk/Master/texmf-dist/source/latex/xcolor/xcolor.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/xcolor/xcolor.dtx	2023-11-13 20:34:52 UTC (rev 68830)
+++ trunk/Master/texmf-dist/source/latex/xcolor/xcolor.dtx	2023-11-13 20:35:10 UTC (rev 68831)
@@ -2,7 +2,7 @@
 %%
 %% ----------------------------------------------------------------
 %% Copyright (C) 2003-2021 by Dr. Uwe Kern <xcolor at ukern dot de>
-%%               2021-2022    LaTeX Project https://github.com/latex3/xcolor/issues
+%%               2021-2023    LaTeX Project https://github.com/latex3/xcolor/issues
 %% ----------------------------------------------------------------
 %%
 %<*package>
@@ -18,8 +18,8 @@
 %%
 %</package>
 %<*extract|driver|test1|test2|test3|test4>
-\def\XCfileversion{v2.14}%
-\def\XCfiledate{2022/06/12}%
+\def\XCfileversion{v3.00}%
+\def\XCfiledate{2023/11/11}%
 %</extract|driver|test1|test2|test3|test4>
 %
 % This file may be distributed and/or modified under the
@@ -382,12 +382,11 @@
 % \item options that determine the color driver as explained in \cite{dpc} and \cite{color}, currently: \Option{dvips}, \Option{xdvi}, \Option{dvipdf}, \Option{dvipdfm}, \Option{dvipdfmx}, \Option{luatex}, \Option{pdftex}, \Option{dvipsone}, \Option{dviwindo}, \Option{emtex}, \Option{dviwin}, \Option{oztex}, \Option{textures}, \Option{pctexps}, \Option{pctexwin}, \Option{pctexhp}, \Option{pctex32}, \Option{truetex}, \Option{tcidvi}, \Option{vtex}, \Option{xetex}, \Option{dvisvgm},
 % \item options that determine the target color model\footnote{Section \vref{sec.tgt} explains how this setting can be overridden at any point in a document.} (\Option{natural}, \Option{rgb}, \Option{cmy}, \Option{cmyk}, \Option{hsb}, \Option{gray}, \Option{RGB}, \Option{HTML}, \Option{HSB}, \Option{Gray}) or disable colored output (\Option{monochrome}),
 % \item options that control whether and how certain sets of predefined colors are being loaded: \Option{dvipsnames}, \Option{dvipsnames*}, \Option{svgnames}, \Option{svgnames*}, \Option{x11names}, \Option{x11names*},
-% \item options that determine which other packages are to be loaded or supported: \Option{table}, \Option{fixpdftex},
-% \Option{hyperref},
+% \item option that determine which other packages are to be loaded or supported: \Option{table},
 % \item options that influence the behaviour of other commands: \Option{prologue}, \Option{kernelfbox}, \Option{xcdraw}, \Option{noxcdraw}, \Option{fixinclude}, \Option{showerrors}, \Option{hideerrors},
 % \item obsolete options:
 % \oOption{pst},
-% \oOption{override}, \oOption{usenames}, \oOption{nodvipsnames}.
+% \oOption{override}, \oOption{usenames}, \oOption{nodvipsnames}, \oOption{fixpdftex}, \oOption{hyperref}.
 % \end{itemize}
 % All available package options (except driver selection and obsolete options) are listed in table \vref{tab.opt}.
 % \DescribeMacro\GetGinDriver
@@ -427,7 +426,7 @@
 % \Option{x11names}, \Option{x11names*}& Load a set of predefined colors according to \Index{Unix}/\Index{X11}.\footnotemark[1]\\
 % \hline
 % \Option{table}& Load the \Package{colortbl} package, in order to use the tools for coloring rows, columns, and cells within tables.\\
-% \Option{fixpdftex}& Load the \Package{pdfcolmk} package, in order to improve |pdftex|'s color behaviour (see section \vref{sec.fixpdftex}).\\
+% \Option{fixpdftex}& This option is obsolete and does nothing at all.\\
 % \Option{hyperref}& Support the \Package{hyperref} package in terms of color expressions by defining additional keys (see section \vref{sec.hyperref}).\\
 % \hline
 % \Option{prologue}& Write prologue information to \File{.xcp} file for every color definition (as described in section \vref{sec.prologue}).\\
@@ -452,15 +451,15 @@
 % \raggedleft
 % \extrarowheight2pt
 % \rowcolors{3}{tablerowcolor}{}
-% \begin{tabular}{l*{6}{c}}
+% \begin{tabular}{l*{5}{c}}
 % \hline
 % \rowcolor{tableheadcolor}
-% \em Action/Package    & \Package{colortbl}& \Package{pdfcolmk}& \Package{hyperref}& \Package{pstricks}& \LC& \Package{pstcol}\\
-% load before \XC       & no & no & allowed & allowed\rlap{\footnotemark[1]} & no & no  \\
-% load with \XC{} option& \Option{table} & \Option{fixpdftex} & --- & --- & --- & --- \\
-% load after \XC        & no & allowed & allowed & allowed & no & no \\
+% \em Action/Package    & \Package{colortbl}&  \Package{hyperref}& \Package{pstricks}& \LC& \Package{pstcol}\\
+% load before \XC       & allowed &  allowed & allowed\rlap{\footnotemark[1]} & no & no  \\
+% load with \XC{} option& \Option{table} &  --- & --- & --- & --- \\
+% load after \XC        & allowed &  allowed & allowed & no & no \\
 % \hline\hline
-% \multicolumn6{c}{\footnotemark[1]\,recent \Package{pstricks} versions do load \XC\ by default}\\
+% \multicolumn5{c}{\footnotemark[1]\,\Package{pstricks}  loads \XC\ by default}\\
 % \hline
 % \end{tabular}
 % \end{adjustwidth}
@@ -1350,6 +1349,14 @@
 %
 % \subsection{Border colors for hyperlinks}\label{sec.hyperref}
 %
+% \textbf{Change 2022}: The options described in this subsection have been removed from the code
+%  as no longer relevant. \Package{hyperref} can handle color names in the border color keys.
+%
+%  This affects the package options \Option{hyperref}, and the Keys
+%  \Key{xcitebordercolor}, \Key{xfilebordercolor}, \Key{xlinkbordercolor}, \Key{xmenubordercolor},
+%  \Key{xpagebordercolor}, \Key{xrunbordercolor}, \Key{xurlbordercolor} and \Key{xpdfborder}.
+%
+%
 % The \Package{hyperref} package offers all kinds of support for hyperlinks, pdfmarks etc.
 % There are two standard ways to make hyperlinks visible (see the package documentation \cite{hyperref} for additional information on how to set up these features):
 % \begin{itemize}
@@ -1391,6 +1398,13 @@
 %
 %
 % \subsection{Color in tables}
+% The commands in this subsection
+% were in previous versions provided by the \Package{xcolor} package as
+% an extension of the \Package{colortbl} commands. They have now
+% been merged into the \Package{colortbl} package properly. The package can be loaded
+% either with the \Option{table} option or independently with |\usepackage|.
+% The description of the commands is kept only for historical reasons. If in doubt
+% consult the documentation of \Package{colortbl}.
 %
 % \DescribeMacro\rowcolors
 %   \oarg{commands}\marg{row}\marg{odd-row color}\marg{even-row color}\\
@@ -1408,7 +1422,6 @@
 % \DescribeMacro\rownum
 % The counter |\rownum| may be used within such a table to access the current row number.
 % An example is given in figure \vref{fig.row}.
-% These commands require the \Option{table} option (which loads the \Package{colortbl} package).
 %
 % Note that table coloring may be combined with color series.
 % This method was used to construct the examples in figure \vref{fig.csx}.
@@ -1469,29 +1482,7 @@
 % \end{verbatim}
 % Now all colors from the \Index{SVG} set are available (except \Color{Fuchsia}) plus \Color{Fuchsia} from the other set.
 %
-% \subsubsection{Page breaks and pdf\TeX}\label{sec.fixpdftex}
 %
-% Since pdf\TeX{} does not maintain a \emph{\Index{color stack}} --- in contrast to \Program{dvips} --- a typical problem is the behaviour of colors in the case of page breaks, as illustrated by the following example:
-% \begin{verbatim}
-% \documentclass{minimal}
-% \usepackage{xcolor}
-% \begin{document}
-% black\color{red}red1\newpage red2\color{black}black
-% \end{document}
-% \end{verbatim}
-% This works as expected with |dvips|, i.e., `red1' and `red2' being \Color{red}, however, with |pdftex|, `red2' is displayed in \Color{black}.
-% The problem may be solved by using the \Option{fixpdftex} option which simply loads Heiko Oberdiek's \Package{pdfcolmk} package \cite{pdfcolmk}.
-% However, its author also lists some limitations:
-% \begin{itemize}
-% \item Mark limitations: page breaks in math.
-% \item LaTeX's output routine is redefinded.
-% \begin{itemize}
-% \item Changes in the output routine of newer versions of LaTeX are not detected.
-% \item Packages that change the output routine are not supported.
-% \end{itemize}
-% \item It does not support several independent text streams like footnotes.
-% \end{itemize}
-%
 % \subsubsection{Change color of included \File{.eps} file}\label{sec.fixinclude}
 %
 % In general, \XC{} cannot change colors of an image that is being included via the |\includegraphics| command from the \Package{graphics} or \Package{graphicx} package.
@@ -3152,7 +3143,32 @@
 %
 % \subsection*{History}
 % \addcontentsline{toc}{subsection}{History}
-%
+% \subsubsection*{2023/11/11 v3.00}
+% \begin{itemize}
+% \item if a \LaTeX{} older than 2022-06-01 is detected a frozen version is used.
+%  All new features apply only if LaTeX 2022-06-01 or newer is detected.
+%  The frozen version can also be requested with \verb+\usepackage{xcolor}[=v2]+  
+% \item  The new LaTeX key/val handler is used for the package options.
+% That means there will be fewer option clash errors (issue \#29).
+% item  The |\rowcolors| command has moved to the |colortbl| package and is no longer
+% defined by |xcolor|.
+% \item The fixpdftex option is obsolete and does nothing at all (issue \#20)
+% \item Extended |\normalcolor| to set also the dot color, issue \#19
+% \item Fix Gray color model, issue \#23
+% \end{itemize}
+% 
+% \subsubsection*{2022/06/12 v2.14}
+% \begin{itemize}
+% \item Load code from \LaTeX\ to define |\mathcolor| if it is available.
+% \item Bug fixes:
+%   \begin{itemize}
+%   \item Modify |\XC at info| to avoid spurious error from |\colorlet{foo}{}|, issue \#12
+%   \item make |\normalcolor|, |\colorbox|, |\fcolorbox|, |\textcolor|, |\pagecolor|, 
+%      |\nopagecolor|, |\definecolor|, |\DefineNamedColor| 
+%      protected as in |color.sty|, issue \#17
+%   \end{itemize}
+% \end{itemize}
+
 % \subsubsection*{2021/10/31 v2.13}
 % \begin{itemize}
 % \item Bug Fixes:
@@ -3556,20 +3572,33 @@
 %
 %
 % \subsection{Preparation}
+%    \begin{macrocode}
+%<*package>
+%    \end{macrocode}
 %
+% \subsubsection{Release handling}
+%
+%    \begin{macrocode}
+\providecommand\DeclareRelease[3]{}
+\providecommand\DeclareCurrentRelease[2]{}
+\DeclareRelease{v2}{0000-00-00}{xcolor-2022-06-12.sty}
+\DeclareCurrentRelease{}{2023-11-11}
+%    \end{macrocode}
+%
 % \subsubsection{File identification}
 %
 % \renewcommand*\MacroFont{\footnotesize\ttfamily}
 % \renewcommand*\AltMacroFont{\footnotesize\ttfamily\slshape}
 %
-%    \begin{macrocode}
-%<*package>
-%    \end{macrocode}
 %
 % \fbox{\MacroFont\string\ProvidesPackage\string{xcolor\string}[\XCfiledate\space\XCfileversion\space LaTeX color extensions (UK)]}
 %
 %    \begin{macrocode}
 \NeedsTeXFormat{LaTeX2e}
+\providecommand\IfFormatAtLeastTF{\@ifl at t@r\fmtversion}
+\IfFormatAtLeastTF{2022/06/01}{}
+ {\RequirePackageWithOptions{xcolor-2022-06-12}}
+\IfFormatAtLeastTF{2022/06/01}{}{\endinput}
 %    \end{macrocode}
 %
 %
@@ -3837,6 +3866,7 @@
 % Performs the test |\if|\Meta{str}\Meta[kl]{str} for $k=1,\dots,n$ and $l=1,\ldots,m_n$.
 % If for some $k,l$ the test is `true', then the attached code \Meta[k]{code} is executed.
 % If all tests are `false', then \Meta{default code} is executed.
+% \changes{3.0}{2022-08-10}{moved the patch from hycolor to correct Gray model, issue \#23}
 %    \begin{macrocode}
 \long\def\XC at ifcase#1#2#3%
  {\long\def\XC at if@##1##2%
@@ -3848,43 +3878,6 @@
 %
 %
 %
-% \subsection{Package options}
-%
-% \begin{macro}{\XC@@opt}
-% Initialise the macro to hold the names of \emph{executed} \XCP{} options.
-%    \begin{macrocode}
-\def\XC@@opt{,}
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@ifXCopt}
-%   \marg{option}\marg{executed}\marg{not executed}\\
-% Performs action dependent on whether a specific \XCP{} option has been executed or not.
-%    \begin{macrocode}
-\def\@ifXCopt#1%
- {\@expandtwoargs\in@{,#1,}{\XC@@opt}%
-  \ifin@\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\XC@@pkg}
-% Initialise the macro to hold the names of packages that are to be loaded by \XC.
-%    \begin{macrocode}
-\let\XC@@pkg\relax
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\DeclareOption}
-% |\DeclareOption| has to be redefined in order to collect every executed package option in |\XC@@opt|.
-% This is being restored immediately before |\ProcessOptions|; thus, other packages use the original definition.
-%    \begin{macrocode}
-\let\XC at declareoption\@declareoption
-\long\def\@declareoption#1#2%
- {\XC at declareoption{#1}{\edef\XC@@opt{\XC@@opt#1,}#2}}
-%    \end{macrocode}
-% \end{macro}
-%
-%
 % \subsubsection{Color model selection}
 %
 % \begin{macro}{\selectcolormodel}
@@ -3931,7 +3924,7 @@
 \@tfor\@@tmp:={natural}{rgb}{cmy}{cmyk}{hsb}{gray}{RGB}{HTML}{HSB}{Gray}\do
  {\expandafter\XC at sdef\csname XC at mod@\@@tmp\endcsname{\@@tmp}%
   \edef\@@tmp
-   {\noexpand\DeclareOption{\@@tmp}{\noexpand\selectcolormodel{\@@tmp}}}%
+   {\noexpand\DeclareKeys{\@@tmp .code= {\noexpand\selectcolormodel{\@@tmp}}}}%
   \@@tmp}
 %    \end{macrocode}
 % \end{macro}
@@ -3953,14 +3946,20 @@
 %
 % The \Option{monochrome} option should be used \emph{in addition} to one of the standard driver options.
 %    \begin{macrocode}
-\DeclareOption{monochrome}
- {\ExecuteOptions{hideerrors}%
-  \AtEndOfPackage
-   {\colors at false
-    \def\set at color{\c at lor@special\m at ne
-      {color push \current at color}\aftergroup\reset at color}%
-    \def\reset at color{\c at lor@special\m at ne{color pop}}%
-    \def\set at page@color{\c at lor@special\m at ne{background \current at color}}}}
+\DeclareKeys
+ {
+    monochrome .code =
+    {
+      \colorerrors at false
+      \AtEndOfPackage
+       {\colors at false
+        \def\set at color{\c at lor@special\m at ne
+          {color push \current at color}\aftergroup\reset at color}%
+        \def\reset at color{\c at lor@special\m at ne{color pop}}%
+        \def\set at page@color{\c at lor@special\m at ne{background \current at color}}}
+    }
+   ,monochrome .usage = load
+ }
 %    \end{macrocode}
 %
 %
@@ -3989,12 +3988,27 @@
 % Construct package options for color names.
 %    \begin{macrocode}
 \def\XC at declarenames#1#2#3%
- {\DeclareOption{#1}{\XC at append\XC@@names
-   {#3\definecolorstrue\input{#2.def}\definecolorstrue
-    \let\colornameprefix\XC@@nameprefix}}
-  \DeclareOption{#1*}{\XC at append\XC@@names
-   {#3\definecolorsfalse\input{#2.def}\definecolorstrue
-    \let\colornameprefix\XC@@nameprefix}}}
+ {%
+  \DeclareKeys
+   {
+    #1  .code =
+       {
+        \AddToHook{package/xcolor/after}
+          {#3\definecolorstrue\input{#2.def}\definecolorstrue
+           \let\colornameprefix\XC@@nameprefix}%
+        \DeclareKeys[xcolor]{#1 .code = {},#1* .code={}}
+       }
+   ,#1  .usage = preamble
+   ,#1* .code =
+       {
+         \AddToHook{package/xcolor/after}
+           {#3\definecolorsfalse\input{#2.def}\definecolorstrue
+            \let\colornameprefix\XC@@nameprefix}
+         \DeclareKeys[xcolor]{#1 .code = {},#1* .code={}}
+       }
+   ,#1* .usage = preamble
+   }%
+ }
 %    \end{macrocode}
 % \end{macro}
 %
@@ -4013,44 +4027,19 @@
 %
 % Use this option to load \People{David P.}{Carlisle}'s \Package{colortbl} package:
 %    \begin{macrocode}
-\DeclareOption{table}{\XC at append\XC@@pkg{\RequirePackage{colortbl}}}
+\DeclareKeys
+ {
+    table .code  ={\AddToHook{package/xcolor/after}{\RequirePackage{colortbl}}}
+   ,table .usage = preamble
 %    \end{macrocode}
 %
-% Use this option to load \People{Heiko}{Oberdiek}'s \Package{pdfcolmk} package:
+% These options are obsolete and only added for compatibility.
 %    \begin{macrocode}
-\DeclareOption{fixpdftex}{\XC at append\XC@@pkg{\RequirePackage{pdfcolmk}}}
+   ,hyperref  .code = {}
+   ,fixpdftex .code = {}
+ }
 %    \end{macrocode}
 %
-% \begin{macro}{\KV at Hyp@xcitebordercolor}
-% \begin{macro}{\KV at Hyp@xfilebordercolor}
-% \begin{macro}{\KV at Hyp@xlinkbordercolor}
-% \begin{macro}{\KV at Hyp@xmenubordercolor}
-% \begin{macro}{\KV at Hyp@xpagebordercolor}
-% \begin{macro}{\KV at Hyp@xrunbordercolor}
-% \begin{macro}{\KV at Hyp@xurlbordercolor}
-% \begin{macro}{\KV at Hyp@xpdfborder}
-% Use this option to define the extended keys for the \Package{hyperref} package.
-%    \begin{macrocode}
-\DeclareOption{hyperref}
- {\@tfor\@@tmp:={cite}{file}{link}{menu}{page}{run}{url}\do
-   {\expandafter\edef\csname KV at Hyp@x\@@tmp bordercolor\endcsname #1%
-     {\noexpand\XC at bordercolor{\@@tmp}{#1}}}%
-  \AtEndOfPackage
-   {\GetGinDriver\def\KV at Hyp@xpdfborder#1{\edef\@pdfborder{#1}}%
-    \@tfor\@@tmp:={dvips}\do
-     {\ifx\GinDriver\@@tmp
-       \def\KV at Hyp@xpdfborder#1%
-        {\edef\@pdfborder{#1}\expandafter\XC at pdfborder\@pdfborder\relax}%
-      \@break at tfor\fi}}}
-%    \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
 %
 %
 % \subsubsection{Driver options}
@@ -4066,25 +4055,42 @@
 \@tfor\@@tmp:={dvipdf}{dvipdfmx}{dvips}{dvipsone}{dviwin}%
               {emtex}{luatex}{pctex32}{pctexhp}{pctexps}{pctexwin}{pdftex}%
               {tcidvi}{textures}{truetex}{vtex}{xetex}{dvisvgm}\do
- {\edef\@@tmp{\noexpand\DeclareOption{\@@tmp}%
-    {\def\noexpand\Gin at driver{\@@tmp.def}}}%
+ {\edef\@@tmp{%
+   \noexpand\DeclareKeys
+     {
+      \@@tmp .code = {\def\noexpand\Gin at driver{\@@tmp.def}},
+      \@@tmp .usage=load
+     }}%
   \@@tmp}
 %    \end{macrocode}
 %
 % Drivers that are derivatives of others:
 %    \begin{macrocode}
-\DeclareOption{dviwindo}{\ExecuteOptions{dvipsone}}
-\DeclareOption{oztex}{\ExecuteOptions{dvips}}
-\DeclareOption{xdvi}{\ExecuteOptions{dvips,monochrome}}
-\DeclareOption{dvipdfm}{\ExecuteOptions{dvipdfmx}}
+\DeclareKeys
+ {
+  ,dviwindo .code   = {\SetKeys{dvipsone}}
+  ,dviwindo .usage  = load
+  ,oztex    .code   = {\SetKeys{dvips}}
+  ,oztex    .usage  = load
+  ,xdvi     .code   = {\SetKeys{dvips,monochrome}}
+  ,xdvi     .usage  = load
+  ,dvipdfm  .code   = {\SetKeys{dvipdfmx}}
+  ,dvipdfm  .usage  = load
+ }
 %    \end{macrocode}
 %
 % Options used by (some) drivers.
 %    \begin{macrocode}
-\DeclareOption{xcdraw}{\def\XC@@xcd@{1}}
-\DeclareOption{noxcdraw}{\def\XC@@xcd@{-1}}
-\DeclareOption{fixinclude}{\def\XC@@xcf@{1}}
-\DeclareOption{prologue}{\def\XC@@xcp@{1}}
+\DeclareKeys
+ {
+   ,xcdraw   .code    = {\def\XC@@xcd@{1}}
+   ,xcdraw   .usage   = load %TODO check
+   ,noxcdraw .code    = {\def\XC@@xcd@{-1}}
+   ,noxcdraw .usage   = load %TODO check
+   ,fixinclude .code  = {\def\XC@@xcf@{1}}
+   ,fixinclude .usage = load %TODO check
+   ,prologue .code    = {\def\XC@@xcp@{1}}
+   ,prologue .usage   = load %TODO check
 %    \end{macrocode}
 % \end{macro}
 %
@@ -4093,25 +4099,23 @@
 %
 % Switch to original kernel |\fbox| command instead of new \XC{} version.
 %    \begin{macrocode}
-\DeclareOption{kernelfbox}{\XC@@fboxfalse}
+   ,kernelfbox .code    = {\XC@@fboxfalse}
+   ,kernelfbox .usage   = load %TODO check
 %    \end{macrocode}
 %
 % These options control how non-existing colors are treated:
 %    \begin{macrocode}
-\DeclareOption{showerrors}{\colorerrors at true}
-\DeclareOption{hideerrors}{\colorerrors at false}
+   ,showerrors .code   = {\colorerrors at true}
+   ,hideerrors .code   = {\colorerrors at false}
 %    \end{macrocode}
 %
 % The \Option{debugshow} option turns on debugging info (perhaps).
 %    \begin{macrocode}
-\DeclareOption{debugshow}{\catcode`\^^A=9 \let\GDebug\typeout}
+   ,debugshow .code    = {\catcode`\^^A=9 \let\GDebug\typeout}
+  }
 %    \end{macrocode}
 %
-% All other options (including \LC's \oOption{usenames}, \oOption{nodvipsnames}) are being ignored.
-%    \begin{macrocode}
-\DeclareOption*%
- {\PackageInfo{xcolor}{Package option `\CurrentOption' ignored}}
-%    \end{macrocode}
+% All other options (including \LC's \oOption{usenames}, \oOption{nodvipsnames}) error.
 %
 % Choose default options:
 %    \begin{macrocode}
@@ -4118,7 +4122,7 @@
 \def\XC@@xcd@{-1}
 \def\XC@@xcf@{-1}
 \def\XC@@xcp@{-1}
-\ExecuteOptions{natural,showerrors}
+\SetKeys{natural,showerrors}
 %    \end{macrocode}
 %
 %
@@ -4127,14 +4131,18 @@
 % A local configuration file may declare more options.
 % It should also make one driver option the default, by calling |\ExecuteOptions| with the appropriate option.
 %    \begin{macrocode}
+\let\XC at ExecuteOptions\ExecuteOptions
+\ExplSyntaxOn
+\def\ExecuteOptions{\keys_set_known:nn {xcolor}}
+\ExplSyntaxOff
 \InputIfFileExists{color.cfg}{}{}
+\let\ExecuteOptions\XC at ExecuteOptions
 %    \end{macrocode}
 %
 % After the options are processed, load the appropriate driver file.
 % If a site wants a default driver (e.g., \Option{dvips}) it just needs to put |\ExecuteOptions{dvips}| in a \File{color.cfg} file.
 %    \begin{macrocode}
-\let\@declareoption\XC at declareoption
-\ProcessOptions\relax
+\ProcessKeyOptions
 %    \end{macrocode}
 %
 % \begin{macro}{\XC@@drv}
@@ -4225,11 +4233,10 @@
 %
 % \subsubsection{Required packages}
 %
-% All packages within the list |\XC at pkg|
-% receive a pretended \LC.
+% We pretent that color.sty has already been loaded.
+%
 %    \begin{macrocode}
 \@namedef{ver at color.sty}{1999/02/16}
-\XC@@pkg
 %    \end{macrocode}
 %
 %
@@ -4862,10 +4869,10 @@
 \def\XC at definecolor[#1]#2%
  {\@testopt{\XC at definec@lor[#1]{#2}}\colornameprefix}
 %    \end{macrocode}
-%
 %    \begin{macrocode}
 \def\XC at definec@lor[#1]#2[#3]#4#5%
- {\begingroup
+ {%
+  \begingroup
   \XC at sdef\@@cls{#1}\XC at edef\@@nam{#2}\edef\colornameprefix{#3}%
   \XC at logdef\@@nam
   \XC at getmodclr02{#4}{#5}{\let\@@tmp\relax}%
@@ -5932,116 +5939,8 @@
 % \end{macro}
 %
 %
-% \subsubsection{Colored rows in tables}
 %
-% The following definitions make only sense if the \Package{colortbl} package has been loaded by the \Option{table} option.
-%    \begin{macrocode}
-\@ifXCopt{table}{%
-%    \end{macrocode}
 %
-% \begin{macro}{\rowcolors}
-% \begin{macro}{\rowcolors*}
-%   \oarg{commands}\marg{row}\marg{odd-row color}\marg{even-row color}\\
-% Defines alternating colors for the next tabular environment.
-% Starting with row \Meta{row}, odd and even rows get their respective colors.
-% The color arguments may also be left empty (= no color).
-% Optional commands may be |\hline| or |\noalign|\marg{stuff}.
-%    \begin{macrocode}
- \def\rowcolors
-  {\@ifstar{\@rowcmdfalse\rowc at lors}{\@rowcmdtrue\rowc at lors}}
-%    \end{macrocode}
-%
-%    \begin{macrocode}
- \def\rowc at lors{\@testopt{\rowc at l@rs}{}}
-%    \end{macrocode}
-%
-%    \begin{macrocode}
- \def\rowc at l@rs[#1]#2#3#4%
-  {\global\rownum=\z@
-   \global\@rowcolorstrue
-   \@ifxempty{#3}%
-     {\def\@oddrowcolor{\@norowcolor}}%
-     {\def\@oddrowcolor{\gdef\CT at row@color{\CT at color{#3}}}}%
-   \@ifxempty{#4}%
-     {\def\@evenrowcolor{\@norowcolor}}%
-     {\def\@evenrowcolor{\gdef\CT at row@color{\CT at color{#4}}}}%
-   \if at rowcmd
-     \def\@rowcolors
-      {#1\if at rowcolors
-         \noalign{\relax\ifnum\rownum<#2\@norowcolor\else
-                  \ifodd\rownum\@oddrowcolor\else\@evenrowcolor\fi\fi}%
-       \fi}%
-   \else
-     \def\@rowcolors
-      {\if at rowcolors
-         \ifnum\rownum<#2\noalign{\@norowcolor}\else
-         #1\noalign{\ifodd\rownum\@oddrowcolor\else\@evenrowcolor\fi}\fi
-       \fi}%
-   \fi
-   \CT at everycr{\@rowc at lors\the\everycr}%
-   \ignorespaces}
-%    \end{macrocode}
-%
-%    \begin{macrocode}
- \def\@rowc at lors{\noalign{\global\advance\rownum\@ne}\@rowcolors}
- \let\@rowcolors\@empty
-%    \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\showrowcolors}
-% \begin{macro}{\hiderowcolors}
-% Switch coloring mode on/off.
-%    \begin{macrocode}
- \def\showrowcolors{\noalign{\global\@rowcolorstrue}\@rowcolors}
- \def\hiderowcolors{\noalign{\global\@rowcolorsfalse\@norowcolor}}
- \def\@norowcolor{\global\let\CT at row@color\relax}
- \@norowcolor
-%    \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\if at rowcolors}
-% \begin{macro}{\if at rowcmd}
-%    \begin{macrocode}
- \newif\if at rowcolors
- \newif\if at rowcmd
-%    \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\rownum}
-% Reserve a counter register.
-%    \begin{macrocode}
- \@ifundefined{rownum}{\newcount\rownum}{}
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\CT at extract}
-% This is a fix for active `!' character to enable color expressions; it is apparently only necessary for |\columncolor| commands within |\multicolumn|.
-%    \begin{macrocode}
- \def\CT at extract#1\columncolor#2#3\@nil
-  {\if!#2%
-     \let\CT at column@color\@empty
-   \else
-     \if[#2%
-       \expandafter\CT at extractb
-     \else
-       \XC at edef\XC@@tmp{#2}%
-       \edef\CT at column@color{\noexpand\CT at color{\XC@@tmp}}%
-       \expandafter\CT at extractd
-     \fi
-     {#1}#3\@nil
-   \fi}
-%    \end{macrocode}
-% \end{macro}
-%
-% End of conditional code for colored tables.
-%    \begin{macrocode}
-}{}
-%    \end{macrocode}
-%
-%
 % \subsubsection{Color information}
 %
 % \begin{macro}{\extractcolorspec}
@@ -6546,10 +6445,12 @@
 %
 % \begin{macro}{\XC at cnv@gray}
 %   \Meta{gray}|,|
+% \changes{3.0}{2022-08-10}{moved the patch from hycolor to correct Gray model, issue \#23}
 %    \begin{macrocode}
 \def\XC at cnv@gray#1,%
  {\XC at ifxcase\tm
    {\XC at mod@rgb {\XC at calcN{#1}\@@tmp \edef\@@tmp{\@@tmp,\@@tmp,\@@tmp}}%
+    \XC at mod@gray{}%
     \XC at mod@cmy {\XC at calcC{#1}\@@tmp \edef\@@tmp{\@@tmp,\@@tmp,\@@tmp}}%
     \XC at mod@cmyk{\XC at calcC{#1}\@@tmp \edef\@@tmp{0,0,0,\@@tmp}}%
     \XC at mod@RGB {\edef\@@scl{\rangeRGB}\XC at calcM{#1}\@@tmp
@@ -6988,7 +6889,10 @@
 % |\normalcolor| is defined (to |\relax|) in the \LaTeX\ kernel, so it is safe to use this in macros that may possibly be used in conjunction with color.
 % It will have no effect until the \XCP{} is also loaded.
 %    \begin{macrocode}
-\protected\def\normalcolor{\let\current at color\default at color\set at color}
+\protected\def\normalcolor{%
+  \let\current at color\default at color
+  \let\XC at current@color\XC at default@color\XC at display}
+\AtBeginDocument{\let\XC at default@color\XC at current@color}
 %    \end{macrocode}
 % \end{macro}
 %
@@ -8274,7 +8178,7 @@
    {\immediate\write\@tempa{\@@tmp}}}
 \immediate\closeout\@tempa
 \@@end}% end of driver list construction code
-\edef\Options{\expandafter\@gobble\XC@@opt}
+\edef\Options{}
 \@tfor\@@tmp:={dvipdf}{dvipdfm}{dvipdfmx}{dvips}{dvipsone}{dviwin}{dviwindo}%
               {emtex}{oztex}{pctex32}{pctexhp}{pctexps}{pctexwin}{pdftex}%
               {tcidvi}{textures}{truetex}{vtex}{xdvi}{xetex}%

Modified: trunk/Master/texmf-dist/tex/latex/xcolor/svgnam.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/xcolor/svgnam.def	2023-11-13 20:34:52 UTC (rev 68830)
+++ trunk/Master/texmf-dist/tex/latex/xcolor/svgnam.def	2023-11-13 20:35:10 UTC (rev 68831)
@@ -22,13 +22,14 @@
 %% in the same archive or directory.)
 %%
 \ProvidesFile{svgnam.def}
- [2022/06/12 v2.14 Predefined colors according to SVG 1.1 (UK)]
+ [2023/11/11 v3.00 Predefined colors according to SVG 1.1 (UK)]
 %%
 %% ----------------------------------------------------------------
 %% Copyright (C) 2003-2021 by Dr. Uwe Kern <xcolor at ukern dot de>
-%%               2021-2022    LaTeX Project https://github.com/latex3/xcolor/issues
+%%               2021-2023    LaTeX Project https://github.com/latex3/xcolor/issues
 %% ----------------------------------------------------------------
 %%
+
 \def\colornameprefix{XC@}
 \preparecolorset{rgb}{}{}{%
 AliceBlue,.94,.972,1;%

Modified: trunk/Master/texmf-dist/tex/latex/xcolor/x11nam.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/xcolor/x11nam.def	2023-11-13 20:34:52 UTC (rev 68830)
+++ trunk/Master/texmf-dist/tex/latex/xcolor/x11nam.def	2023-11-13 20:35:10 UTC (rev 68831)
@@ -22,13 +22,14 @@
 %% in the same archive or directory.)
 %%
 \ProvidesFile{x11nam.def}
- [2022/06/12 v2.14 Predefined colors according to Unix/X11 (UK)]
+ [2023/11/11 v3.00 Predefined colors according to Unix/X11 (UK)]
 %%
 %% ----------------------------------------------------------------
 %% Copyright (C) 2003-2021 by Dr. Uwe Kern <xcolor at ukern dot de>
-%%               2021-2022    LaTeX Project https://github.com/latex3/xcolor/issues
+%%               2021-2023    LaTeX Project https://github.com/latex3/xcolor/issues
 %% ----------------------------------------------------------------
 %%
+
 \def\colornameprefix{XC@}
 \preparecolorset{rgb}{}{}{%
 AntiqueWhite1,1,.936,.86;%

Added: trunk/Master/texmf-dist/tex/latex/xcolor/xcolor-2022-06-12.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/xcolor/xcolor-2022-06-12.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/xcolor/xcolor-2022-06-12.sty	2023-11-13 20:35:10 UTC (rev 68831)
@@ -0,0 +1,1465 @@
+%%
+%% This is file `xcolor.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xcolor.dtx  (with options: `package')
+%%
+%% IMPORTANT NOTICE:
+%%
+%% For the copyright see the source file.
+%%
+%% Any modified versions of this file must be renamed
+%% with new filenames distinct from xcolor.sty.
+%%
+%% For distribution of the original source see the terms
+%% for copying and modification in the file xcolor.dtx.
+%%
+%% This generated file may be distributed as long as the
+%% original source files, as listed above, are part of the
+%% same distribution. (The sources need not necessarily be
+%% in the same archive or directory.)
+%%
+\ProvidesPackage{xcolor-2022-06-12}
+ [2022/06/12 v2.14 LaTeX color extensions (UK)]
+%%
+%% ----------------------------------------------------------------
+%% Copyright (C) 2003-2021 by Dr. Uwe Kern <xcolor at ukern dot de>
+%%               2021-2022    LaTeX Project https://github.com/latex3/xcolor/issues
+%% ----------------------------------------------------------------
+%%
+%% Please send error reports and suggestions for
+%% improvements to https://github.com/latex3/xcolor/issues.
+%%
+%% This package contains code copied from
+%%
+%% color.dtx [1999/02/16 v1.0i Standard LaTeX Color (DPC)]
+%% Copyright (C) 1994--1999 David Carlisle
+%%
+%% which is part of the Standard LaTeX `Graphics Bundle'.
+%%
+\NeedsTeXFormat{LaTeX2e}
+\expandafter\edef\csname XC at catcodes\endcsname
+ {\catcode33 \the\catcode33 % !
+  \catcode34 \the\catcode34 % "
+  \catcode39 \the\catcode39 % '
+  \catcode42 \the\catcode42 % *
+  \catcode44 \the\catcode44 % ,
+  \catcode45 \the\catcode45 % -
+  \catcode46 \the\catcode46 % .
+  \catcode47 \the\catcode47 % /
+  \catcode58 \the\catcode58 % :
+  \catcode59 \the\catcode59 % ;
+  \catcode60 \the\catcode60 % <
+  \catcode61 \the\catcode61 % =
+  \catcode62 \the\catcode62 % >
+  \catcode63 \the\catcode63 % ?
+  \catcode64 \the\catcode64 % @
+  \catcode94 \the\catcode94 % ^
+  \catcode96 \the\catcode96 % `
+  \catcode`\noexpand\^^A\the\catcode`\^^A\relax}
+\catcode64 11 %
+\@makeother\! \@makeother\" \@makeother\' \@makeother\* \@makeother\,
+\@makeother\- \@makeother\. \@makeother\/ \@makeother\: \@makeother\;
+\@makeother\< \@makeother\= \@makeother\> \@makeother\? \@makeother\`
+\catcode94 7 %
+\catcode`\^^A=14 %
+\edef\XC@@{\expandafter\noexpand\csname\@backslashchar XC@@\endcsname}
+\newif\ifcolors@ \colors at true
+\newif\ifcolorerrors@
+\newif\ifglobalcolors \globalcolorsfalse
+\newif\ifdefinecolors \definecolorstrue
+\newif\ifconvertcolorsD
+\newif\ifconvertcolorsU
+\newif\ifblendcolors
+\newif\ifmaskcolors
+\newif\ifXC@@fbox \XC@@fboxtrue
+\newif\ifXC@@tst
+\def\c at lor@error#1%
+ {\ifcolorerrors@\PackageError{xcolor}{Undefined color #1}\@ehc
+  \else\PackageWarning{xcolor}{Undefined color #1}\fi}
+\def\XC at append#1#2%
+ {\ifx#1\@undefined\def#1{#2}\else\ifx#1\relax\def#1{#2}\else
+  \toks@\expandafter{#1#2}\edef#1{\the\toks@}\fi\fi}
+\def\XC at let@cc#1{\expandafter\XC at let@Nc\csname#1\endcsname}
+\providecommand*\@namelet[1]{\expandafter\XC at let@Nc\csname#1\endcsname}
+\def\XC at let@Nc#1#2{\expandafter\let\expandafter#1\csname#2\endcsname}
+\def\XC at let@cN#1{\expandafter\let\csname#1\endcsname}
+\def\@namexdef#1{\expandafter\xdef\csname #1\endcsname}
+\def\aftergroupdef#1#2%
+ {\expandafter\endgroup\expandafter\def\expandafter#1\expandafter{#2}}
+\def\aftergroupedef#1#2%
+ {\edef\@@tmp{\def\noexpand#1{#2}}\expandafter\endgroup\@@tmp}
+\begingroup
+\catcode`\!=13 \catcode`\:=13 \catcode`\-=13 \catcode`\+=13
+\catcode`\;=13 \catcode`\/=13 \catcode`\"=13 \catcode`\>=13
+\gdef\XC at edef#1#2%
+ {\begingroup
+  \ifnum\catcode`\!=13 \edef!{\string!}\fi
+  \ifnum\catcode`\:=13 \edef:{\string:}\fi
+  \ifnum\catcode`\-=13 \edef-{\string-}\fi
+  \ifnum\catcode`\+=13 \edef+{\string+}\fi
+  \ifnum\catcode`\;=13 \edef;{\string;}\fi
+  \ifnum\catcode`\"=13 \edef"{\string"}\fi
+  \ifnum\catcode`\>=13 \edef>{\string>}\fi
+  \edef#1{#2}\@onelevel at sanitize#1\aftergroupdef#1#1}
+\gdef\XC at mdef#1#2%
+ {\begingroup
+  \ifnum\catcode`\/=13 \edef/{\string/}\fi
+  \ifnum\catcode`\:=13 \edef:{\string:}\fi
+  \edef#1{#2}\@onelevel at sanitize#1\aftergroupdef#1#1}
+\endgroup
+\def\XC at sdef#1#2{\edef#1{#2}\@onelevel at sanitize#1}
+\def\@ifxempty#1{\@@ifxempty#1\@@ifxempty\XC@@}
+\def\@@ifxempty#1#2\XC@@
+ {\ifx#1\@@ifxempty
+  \expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
+\long\def\XC at ifxcase#1#2#3%
+ {\long\def\XC at if@##1##2%
+   {\ifx#1##1%
+      \toks@{##2}\expandafter\remove at to@nnil\else\expandafter\XC at if@\fi}%
+  \XC at if@#2#1{#3}\@nnil\the\toks@}
+\long\def\XC at ifcase#1#2#3%
+ {\long\def\XC at if@##1##2%
+   {\@expandtwoargs\in@{,#1,}{,##1,}\ifin@
+      \toks@{##2}\expandafter\remove at to@nnil\else\expandafter\XC at if@\fi}%
+  \XC at if@#2{#1}{#3}\@nnil\the\toks@}
+\def\XC@@opt{,}
+\def\@ifXCopt#1%
+ {\@expandtwoargs\in@{,#1,}{\XC@@opt}%
+  \ifin@\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
+\let\XC@@pkg\relax
+\let\XC at declareoption\@declareoption
+\long\def\@declareoption#1#2%
+ {\XC at declareoption{#1}{\edef\XC@@opt{\XC@@opt#1,}#2}}
+\def\selectcolormodel#1%
+ {\@ifundefined{XC at mod@#1}%
+   {\c at lor@error{target model `#1'}}%
+   {\expandafter\ifx\csname XC at mod@#1\endcsname\XC at mod@natural
+      \def\XC at tgt@mod##1{##1}\convertcolorsDfalse\convertcolorsUfalse
+    \else\expandafter\ifx\csname XC at mod@#1\endcsname\XC at mod@named
+      \c at lor@error{target model `#1'}
+    \else
+      \edef\XC at tgt@mod##1{#1}\convertcolorsDtrue\convertcolorsUtrue
+    \fi\fi}}
+\@tfor\@@tmp:={Hsb}{tHsb}{ignore}{named}{ps}{wave}\do
+ {\expandafter\XC at sdef\csname XC at mod@\@@tmp\endcsname{\@@tmp}}
+\@tfor\@@tmp:={natural}{rgb}{cmy}{cmyk}{hsb}{gray}{RGB}{HTML}{HSB}{Gray}\do
+ {\expandafter\XC at sdef\csname XC at mod@\@@tmp\endcsname{\@@tmp}%
+  \edef\@@tmp
+   {\noexpand\DeclareOption{\@@tmp}{\noexpand\selectcolormodel{\@@tmp}}}%
+  \@@tmp}
+\DeclareOption{monochrome}
+ {\ExecuteOptions{hideerrors}%
+  \AtEndOfPackage
+   {\colors at false
+    \def\set at color{\c at lor@special\m at ne
+      {color push \current at color}\aftergroup\reset at color}%
+    \def\reset at color{\c at lor@special\m at ne{color pop}}%
+    \def\set at page@color{\c at lor@special\m at ne{background \current at color}}}}
+\let\XC@@names\relax
+\providecommand*\colornameprefix{XC@}
+\let\XC@@nameprefix\colornameprefix
+\def\XC at declarenames#1#2#3%
+ {\DeclareOption{#1}{\XC at append\XC@@names
+   {#3\definecolorstrue\input{#2.def}\definecolorstrue
+    \let\colornameprefix\XC@@nameprefix}}
+  \DeclareOption{#1*}{\XC at append\XC@@names
+   {#3\definecolorsfalse\input{#2.def}\definecolorstrue
+    \let\colornameprefix\XC@@nameprefix}}}
+\XC at declarenames{dvipsnames}{dvipsnam}{\let\colornameprefix\@empty}
+\XC at declarenames{svgnames}{svgnam}{}
+\XC at declarenames{x11names}{x11nam}{}
+\XC at declarenames{hksnames}%
+ {hks\ifcase\paperquality k\or n\or k\or z\else n\fi nam}{}
+\XC at declarenames{pmsnames}{pmsnam}{}
+\XC at declarenames{ralnames}{ralnam}{}
+\DeclareOption{table}{\XC at append\XC@@pkg{\RequirePackage{colortbl}}}
+\DeclareOption{fixpdftex}{\XC at append\XC@@pkg{\RequirePackage{pdfcolmk}}}
+\DeclareOption{hyperref}
+ {\@tfor\@@tmp:={cite}{file}{link}{menu}{page}{run}{url}\do
+   {\expandafter\edef\csname KV at Hyp@x\@@tmp bordercolor\endcsname #1%
+     {\noexpand\XC at bordercolor{\@@tmp}{#1}}}%
+  \AtEndOfPackage
+   {\GetGinDriver\def\KV at Hyp@xpdfborder#1{\edef\@pdfborder{#1}}%
+    \@tfor\@@tmp:={dvips}\do
+     {\ifx\GinDriver\@@tmp
+       \def\KV at Hyp@xpdfborder#1%
+        {\edef\@pdfborder{#1}\expandafter\XC at pdfborder\@pdfborder\relax}%
+      \@break at tfor\fi}}}
+\providecommand*\Gin at driver{}
+\@tfor\@@tmp:={dvipdf}{dvipdfmx}{dvips}{dvipsone}{dviwin}%
+              {emtex}{luatex}{pctex32}{pctexhp}{pctexps}{pctexwin}{pdftex}%
+              {tcidvi}{textures}{truetex}{vtex}{xetex}{dvisvgm}\do
+ {\edef\@@tmp{\noexpand\DeclareOption{\@@tmp}%
+    {\def\noexpand\Gin at driver{\@@tmp.def}}}%
+  \@@tmp}
+\DeclareOption{dviwindo}{\ExecuteOptions{dvipsone}}
+\DeclareOption{oztex}{\ExecuteOptions{dvips}}
+\DeclareOption{xdvi}{\ExecuteOptions{dvips,monochrome}}
+\DeclareOption{dvipdfm}{\ExecuteOptions{dvipdfmx}}
+\DeclareOption{xcdraw}{\def\XC@@xcd@{1}}
+\DeclareOption{noxcdraw}{\def\XC@@xcd@{-1}}
+\DeclareOption{fixinclude}{\def\XC@@xcf@{1}}
+\DeclareOption{prologue}{\def\XC@@xcp@{1}}
+\DeclareOption{kernelfbox}{\XC@@fboxfalse}
+\DeclareOption{showerrors}{\colorerrors at true}
+\DeclareOption{hideerrors}{\colorerrors at false}
+\DeclareOption{debugshow}{\catcode`\^^A=9 \let\GDebug\typeout}
+\DeclareOption*%
+ {\PackageInfo{xcolor}{Package option `\CurrentOption' ignored}}
+\def\XC@@xcd@{-1}
+\def\XC@@xcf@{-1}
+\def\XC@@xcp@{-1}
+\ExecuteOptions{natural,showerrors}
+\InputIfFileExists{color.cfg}{}{}
+\let\@declareoption\XC at declareoption
+\ProcessOptions\relax
+\edef\Gin at driver{\Gin at driver}
+\if!\Gin at driver!
+  \PackageError{xcolor}
+    {No driver specified}
+    {You should make a default driver option in a file \MessageBreak
+     color.cfg\MessageBreak
+     eg: \protect\ExecuteOptions{dvips}}
+\else
+  \PackageInfo{xcolor}{Driver file: \Gin at driver}
+  \@ifundefined{ver@\Gin at driver}{\input{\Gin at driver}}{}
+  \def\@@tmp#1.def{\def\XC@@drv{#1}}
+  \expandafter\@@tmp\Gin at driver
+\fi
+\count@\XC@@xcd@ \advance\count@\XC@@xcf@ \advance\count@\XC@@xcp@\relax
+\ifnum\count@>-3
+  \XC at ifcase\XC@@drv
+   {{dvips,pctex32}%
+    {\def\@tempa{0}
+     \def\XC at special#1{\special{ps:XC!b}\special{"#1}\special{ps:XC!e}}}%
+    {pdftex}%
+    {\def\@tempa{1}
+     \def\XC at special#1{\pdfliteral{ q #1 Q }}}%
+    {luatex}%
+    {\def\@tempa{1}
+     \ifnum\luatexversion<87%
+       \def\XC at special#1{\pdfliteral{ q #1 Q }}%
+     \else%
+       \def\XC at special#1{\pdfextension literal{ q #1 Q }}%
+     \fi}%
+    {dvipdfm}%
+    {\def\@tempa{1}
+     \def\XC at special#1{\special{pdf: content #1}}}%
+   }{\def\@tempa{-1}}
+  \ifnum\XC@@xcd@>\m at ne\let\XC@@xcd@\@tempa\fi
+  \ifnum\XC@@xcf@>\m at ne\let\XC@@xcf@\@tempa\fi
+  \ifnum\XC@@xcp@>\m at ne\let\XC@@xcp@\@tempa\fi
+  \ifnum\@tempa=0 \AtBeginDvi{\special{header=xcolor.pro}}\fi
+  \ifcase\XC@@xcf@
+    \AtBeginDvi{\special{! XCfixnormalscale}}
+  \fi
+  \ifcase\XC@@xcp@
+    \AtBeginDvi{\special{header=\jobname.xcp}}
+    \newwrite\XC@@xcp\immediate\openout\XC@@xcp=\jobname.xcp
+    \immediate\write\XC@@xcp{\@percentchar!}
+    \immediate\write\XC@@xcp{TeXDict begin}
+    \AtEndDocument
+     {\immediate\write\XC@@xcp{end}\immediate\closeout\XC@@xcp}
+  \fi
+\fi
+\@namedef{ver at color.sty}{1999/02/16}
+\XC@@pkg
+\long\def\@secondoffive#1#2#3#4#5{#2}
+\long\def\@thirdoffive#1#2#3#4#5{#3}
+\def\xglobal{\xglobal at stop\begingroup\futurelet\@@tok\xglobal at test}
+\def\xglobal at test
+ {\expandafter\@tfor\expandafter\@@tmp
+   \expandafter:\expandafter=\xglobal at list\do
+    {\expandafter\ifx\@@tmp\@@tok
+       \aftergroup\let\aftergroup\xglobal@\@break at tfor\fi}%
+  \endgroup\global}
+\def\xglobal at stop{\let\xglobal@\@empty}
+\xglobal at stop
+\def\xglobal at list
+ {\definecolor\definecolors\definecolorset\colorlet\providecolor
+  \providecolors\providecolorset\blendcolors\maskcolors
+  \substitutecolormodel}
+\def\xglobalize@#1{\ifx\xglobal@\global\global\let#1#1\fi}
+\def\GetGinDriver
+ {\@tempswafalse
+  \@tfor\@@tmp:={dvips}{luatex}{pdftex}{dvipdf}{dvipdfm}{dvipsone}{vtex}{textures}%
+  \do{\ifx\XC@@drv\@@tmp\@tempswatrue\@break at tfor\fi}%
+  \edef\GinDriver{\if at tempswa\XC@@drv\else hypertex\fi}}
+\def\@hex at Hex#1{\ifx#1\relax\else\expandafter\@hex@@Hex\expandafter#1\fi}
+\def\@hex@@Hex#1%
+ {\if a#1A\else \if b#1B\else \if c#1C\else \if d#1D\else
+  \if e#1E\else \if f#1F\else #1\fi\fi\fi\fi\fi\fi \@hex at Hex}
+\def\XC at strip@comma#1,#2%
+ {\ifx,#2%
+    #1\expandafter\remove at to@nnil\else#1 \expandafter\XC at strip@comma\fi
+  #2}
+{\catcode`Q=3
+ \gdef\XC at replace#1#2#3%
+  {\begingroup
+   \def\XC at repl@ce##1#2##2Q##3%
+    {\@ifxempty{##2}{\XC at r@pl at ce##1Q}{\XC at repl@ce##1##3##2Q{##3}}}%
+   \def\XC at r@pl at ce##1\@empty Q%
+    {\expandafter\endgroup\expandafter\def\expandafter#1\expandafter{##1}}%
+   \expandafter\XC at repl@ce\expandafter\@empty #1\@empty#2Q{#3}}
+}
+\def\XC at clean#1%
+ {\edef#1{ #1 }%
+  \XC at cle@n#1,{ }\XC at cle@n#1{. }{ }\XC at cle@n#1{ },%
+  \edef#1{\expandafter\@gobbletwo#1}}
+\def\XC at cle@n#1#2#3%
+ {\def\XC at cl@@n##1#2##2{#3##1\ifx##2\@empty\else\expandafter\XC at cl@@n\fi##2}%
+  \edef#1{\expandafter\XC at cl@@n#1#2\@empty}}%
+\def\rdivide#1#2%
+ {\begingroup\toks@{#1}\edef\@@tmp{\noexpand\@tempdima\the#1}%
+  \@defaultunits\@tempdimb=#2pt\relax\@nnil \@@tmp\relax
+  \ifdim\@tempdima<\z@ \@tempdima-\@tempdima\def\@sign{-}\else
+    \def\@sign{}\fi
+  \ifdim\@tempdimb<\z@ \@tempdimb-\@tempdimb\edef\@sign{\@sign-}\fi
+  \ifdim\@tempdima<.1\maxdimen \ifdim\@tempdimb<.01\maxdimen
+    \lshift\@tempdima \lshift\@tempdimb \fi\fi
+  \@tempcnta=\@tempdima \@tempcntb=\@tempdimb
+  \count@=\@tempcnta \divide\count@\@tempcntb
+  \edef\@@tmp{\number\count at .}%
+  \@tempswatrue  \@rdivide \@rdivide \@rdivide \@rdivide \@rdivide
+  \@tempswafalse \@rdivide
+  \dimen@\@@tmp\p@ \ifnum\count@>4\advance\dimen at 1sp\fi
+  \dimen@\@sign\dimen@
+  \edef\@@tmp{\the\toks@\the\dimen@}%
+  \expandafter\endgroup\@@tmp}
+\def\@rdivide
+ {\multiply\count@\@tempcntb \advance\@tempcnta-\count@
+  \multiply\@tempcnta10 \count@=\@tempcnta \divide\count@\@tempcntb
+  \if at tempswa\edef\@@tmp{\@@tmp\number\count@}\fi}
+\def\rmultiply#1#2%
+ {\begingroup
+  \edef\@@mul{#2}\@tempdima\the#1\relax
+  \afterassignment\@tempdimb\@tempcntb=\@@mul\p@
+  \ifdim\@tempdima<\z@ \@tempdima-\@tempdima\def\@sign{-}\else
+    \def\@sign{}\fi
+  \ifnum\@tempcntb<\z@ \@tempcntb-\@tempcntb\edef\@sign{\@sign-}\fi
+  \lshift\@tempdima \dimen@\z@
+  \expandafter\@rmultiply\@@mul.0.\@nil
+  \advance\dimen@\@tempcntb\@tempdima \rshift\dimen@
+  \dimen@\@sign\dimen@
+  \edef\@@tmp{#1\the\dimen@}%
+  \expandafter\endgroup\@@tmp}
+\def\@rmultiply#1.#2.#3\@nil
+ {\def\@@tmp{}%
+  \@tfor\@@mul:=#2\do
+   {\edef\@@tmp
+     {\advance\dimen@\@@mul\@tempdima \divide\dimen at 10 \@@tmp}}%
+  \@@tmp}
+\def\lshift#1{#1\expandafter\lshift@\the#1}
+\def\llshift#1{\lshift#1\lshift#1}
+\def\lshiftnum#1{\expandafter\lshiftnum@#1.00.:}
+\def\lshiftnum@#1.#2#3.#4:{#1#2\ifnum0#3>\z at .#3\fi}
+\def\llshiftnum#1{\expandafter\llshiftnum@#1\@empty.00.:}
+\def\llshiftnum@#1.#2#3#4.#5:%
+ {#1#2\ifnum0#3>\z@#3\else0\fi\ifnum0#4>\z at .#4\fi}
+\def\lshiftset#1#2{\edef\@@XC{\noexpand\lshiftnum{#2}}#1\@@XC\p@}
+\def\llshiftset#1#2{\edef\@@XC{\noexpand\llshiftnum{#2}}#1\@@XC\p@}
+\def\rshift#1{#1\expandafter\rshift@\the#1}
+\def\rrshift#1{\rshift#1\rshift#1}
+\begingroup
+\catcode`P=12
+\catcode`T=12
+\lowercase
+ {\def\@@tmp{\def\lshift@##1.##2##3PT{##1##2\ifnum0##3>\z at .##3\fi\p@}
+             \def\rshift@##1.##2PT{\rshift@@##1\relax##2\p@}}}
+\expandafter\endgroup\@@tmp
+\def\rshift@@#1#2%
+ {\ifx#2\relax.#1\else#1\expandafter\rshift@@\expandafter#2\fi}
+\def\XC at inflate#1#2#3#4%
+ {\edef#4{#2,\ifx#1\XC at mod@cmyk #3\else
+             \ifx#1\XC at mod@gray ,,,#3,,,\else ,#3,\fi\fi}}
+\def\XC at vec#1,#2,#3,#4,#5,#6,#7,#8,#9%
+ {\def\@@tmp{}%
+  \XC at vec@{#1}{#5}%
+  \ifx,#2,\else
+  \XC at vec@{#2}{#6}\XC at vec@{#3}{#7}\ifx,#4,\else\XC at vec@{#4}{#8}\fi\fi
+  \aftergroupdef#9\@@tmp}
+\def\XC at vec@@{\edef\@@tmp{\ifx\@@tmp\@empty\else\@@tmp,\fi\strip at pt\dimen@}}
+\def\XC at add{\begingroup \let\XC at vec@\XC at add@ \XC at vec}
+\def\XC at add@#1#2%
+ {\llshiftset\dimen@{#1}\llshiftset\@tempdima{#2}%
+  \advance\dimen@\@tempdima \rrshift\dimen@ \XC at vec@@}
+\def\XC at sub{\begingroup \let\XC at vec@\XC at sub@ \XC at vec}
+\def\XC at sub@#1#2{\XC at add@{#1}{-#2}}
+\def\XC at mul{\begingroup \let\XC at vec@\XC at mul@ \XC at vec}
+\def\XC at mul@#1#2%
+ {\llshiftset\dimen@{#1}\rmultiply\dimen@{#2}\rrshift\dimen@ \XC at vec@@}
+\def\XC at mix%
+ {\begingroup
+  \@tempdima\dimen@ \@tempdimb100\p@ \advance\@tempdimb-\@tempdima
+  \let\XC at vec@\XC at mix@ \XC at vec}
+\def\XC at mix@#1#2%
+ {\dimen@#1\@tempdima \advance\dimen@#2\@tempdimb \rrshift\dimen@ \XC at vec@@}
+\def\XC at calc@#1,#2,#3,#4,#5:#6%
+ {\XC at let@Nc\@@cmd{XC at calc#6}\@@cmd{#1}\@@tmp
+  \ifx,#2,\else
+    \@@cmd{#2}\@tempa\@@cmd{#3}\@tempb
+    \ifx,#4,%
+      \edef\@@tmp{\@@tmp,\@tempa,\@tempb}\else
+      \@@cmd{#4}\@tempc\edef\@@tmp{\@@tmp,\@tempa,\@tempb,\@tempc}\fi\fi}
+\def\XC at calcC#1#2%
+ {\llshiftset\dimen@{-#1}\advance\dimen at 100\p@
+  \rrshift\dimen@ \XC at calcN{\strip at pt\dimen@}#2}
+\def\XC at calcD{\XC at c@lcD\@@scl{}}
+\def\XC at c@lcD#1#2#3#4%
+ {\dimen@#3\p@ \rdivide\dimen@{#1}\edef#4{\strip at pt\dimen@#2}}
+\def\XC at calcF#1#2%
+ {\edef#2{#1}\expandafter\XC at c@lcF#2.0.:#2}
+\def\XC at c@lcF#1.#2.#3:#4%
+ {\edef#4{\XC at c@@cR#200000:}%
+  \dimen@#1.5\p@ \afterassignment\dimen@\count@=\the\dimen@
+  \edef#4%
+   {\ifnum#4>0 \ifnum\count@=0 \ifdim#1.5\p@<\z@ -\fi\fi\fi
+    \number\count at .#4}}
+\def\XC at calcH#1#2%
+ {\count@#1 \divide\count@\sixt@@n \edef\XC@@tmp{\hexnumber@\count@}%
+  \multiply\count at -\sixt@@n \advance\count@#1
+  \edef#2{\XC@@tmp\hexnumber@\count@}}
+\def\XC at calcM#1#2%
+ {\dimen@#1\p@ \dimen@\@@scl\dimen@ \advance\dimen at .5\p@
+  \afterassignment\dimen@\count@=\the\dimen@ \edef#2{\number\count@}}
+\def\XC at calcN#1#2%
+ {\XC at calcR{#1}#2\edef#2{\expandafter\XC at c@lcN#200000:}}
+\def\XC at c@lcN#1.#200000#3:{#1\ifnum0#2=0 \else.#2\fi}
+\def\XC at calcR#1#2{\edef#2{#1}\edef#2{\expandafter\XC at c@lcR#2.0.:}}
+\def\XC at c@lcR#1.#2.#3:%
+ {\ifnum#10>0 1.00000\else 0.\ifnum#11<0 00000\else
+  \XC at c@@cR#200000:\fi\fi}
+\def\XC at c@@cR#1#2#3#4#5#6:{#1#2#3#4#5}
+\def\XC at calcS{\XC at c@lcS\@@scl{}}
+\def\XC at c@lcS#1#2#3#4%
+ {\lshiftset\dimen@{#3}%
+  \ifdim#1\p@<100\p@
+    \dimen@\lshiftnum#1\dimen@ \rrshift\dimen@ \else
+    \dimen@#1\dimen@ \rshift\dimen@ \fi
+  \edef#4{\strip at pt\dimen@#2}}
+\def\XC at calcT#1#2%
+ {\lshiftset\dimen@{#1}\advance\dimen@\lshiftnum\@@arg\p@ \rshift\dimen@
+  \edef#2%
+   {\ifdim\dimen@>\p at 1\else\ifdim\dimen@<\z at 0\else\strip at pt\dimen@\fi\fi}}
+\def\XC at calcU#1#2%
+ {\dimen@#1\p@
+  \ifdim\dimen@=\p@\else
+    \afterassignment\dimen@\count@=\the\dimen@
+    \relax\ifdim\dimen@=\z@\else
+      \ifdim#1\p@<\z@ \dimen at -\dimen@ \advance\dimen@\p@ \fi
+    \fi
+  \fi
+  \edef#2{\strip at pt\dimen@}}
+\providecommand*\rangeRGB{255}
+\providecommand*\rangeHSB{240}
+\providecommand*\rangeHsb{360}
+\providecommand*\rangetHsb{60,30;120,60;180,120;210,180;240,240}
+\providecommand*\rangeGray{15}
+\providecommand*\adjustUCRBG{1,1,1,1}
+\providecommand*\paperquality{1}
+\providecommand*\colorseriescycle{16}
+\def\XC at clr@rgb at white{1,1,1}
+\def\XC at clr@cmy at white{0,0,0}
+\def\XC at clr@cmyk at white{0,0,0,0}
+\def\XC at clr@hsb at white{\@@hue,0,1}
+\def\XC at clr@hsb at gray{\@@hue,0,0.5}
+\def\XC at clr@hsb at black{\@@hue,0,0}
+\def\XC at clr@gray at white{1}
+\@tfor\@@tmp:={grad}{last}{step}\do
+ {\XC at let@cN{XC at met@\@@tmp}\@@tmp}
+\protected\def\definecolor{\@testopt{\XC at definecolor}{}}
+\def\XC at definecolor[#1]#2%
+ {\@testopt{\XC at definec@lor[#1]{#2}}\colornameprefix}
+\def\XC at definec@lor[#1]#2[#3]#4#5%
+ {\begingroup
+  \XC at sdef\@@cls{#1}\XC at edef\@@nam{#2}\edef\colornameprefix{#3}%
+  \XC at logdef\@@nam
+  \XC at getmodclr02{#4}{#5}{\let\@@tmp\relax}%
+   {\ifx\@@mod\XC at mod@named
+      \XC at c@l at rlet\@@nam\@@clr
+    \else
+      \ifx\@@cls\XC at mod@ps
+        \edef\@@drv{\@@mod\space\@@clr}\def\@@hue{0}%
+        \edef\@@clr{\@nameuse{XC at clr@\@@mod @white}}%
+      \else
+        \ifconvertcolorsD
+          \let\@@tmp\@@mod\XC at sdef\@@mod{\XC at tgt@mod\@@tmp}%
+          \convertcolorspec\@@tmp\@@clr\@@mod\@@clr
+        \fi
+        \XC at coremodel\@@mod\@@clr
+        \csname color@\@@mod\expandafter\endcsname
+          \expandafter\@@drv\expandafter{\@@clr}%
+        \ifcase\XC@@xcp@
+          \immediate\write\XC@@xcp{/\colornameprefix\@@nam{\expandafter
+            \XC at strip@comma\@@clr,,\@nnil}XC\@@mod}%
+          \let\@@cls\XC at mod@named
+        \fi
+        \ifx\@@cls\@empty\else
+          \let\@@tmp\@@cls
+          \@nameuse{define at color@\@@cls}\@@nam\@@drv
+          \csname color@\@@tmp\expandafter\endcsname
+            \expandafter\@@drv\expandafter{\@@nam}%
+        \fi
+      \fi
+      \toks@\expandafter{\@@drv}%
+      \edef\@@tmp
+       {\ifglobalcolors\global\else\xglobal@\fi
+        \noexpand\@namedef{\@backslashchar color@\@@nam}%
+         {\noexpand\xcolor@{\@@cls}{\the\toks@}{\@@mod}{\@@clr}}}%
+    \fi}%
+  \expandafter\endgroup\@@tmp\xglobal at stop}
+\def\XC at getmodclr#1#2#3#4%
+ {\ifnum\ifcase#1 \ifXC@@getmod1\else0 \fi \or1 \fi>0
+    \XC at mdef\@@mod{#3}\expandafter\XC at getmod\@@mod////////\XC@@
+    \@ifundefinedmodel\@@Mod{\let\@@Mod\XC at mod@ignore}{}\fi
+  \@ifundefined{XC at mod@\@@mod}%
+   {\c at lor@error{model `\@@mod'}\@firstoftwo}%
+   {\ifcase#2\else
+      \XC at mdef\@@clr{#4}%
+      \edef\@@clr{\expandafter\XC at getclr\@@clr////////\XC@@}%
+      \ifx\@@cls\XC at mod@ps\else\XC at clean\@@clr\fi
+      \ifx\@@Mod\XC at mod@ignore\else
+        \convertcolorspec\@@mod\@@clr\@@Mod\@@clr
+        \ifnum#2>1 \let\@@mod\@@Mod\fi
+      \fi
+    \fi \@secondoftwo}}
+\def\XC at getmod#1/#2/#3/#4/#5/#6/#7/#8/#9\XC@@
+ {\XC at g@tm at d0#1::\XC@@ \XC at getm@d1{#2}\XC at getm@d2{#3}%
+  \XC at getm@d3{#4}\XC at getm@d4{#5}\XC at getm@d5{#6}\XC at getm@d6{#7}%
+  \XC at getm@d7{#8}\def\XC@@pos{0}\def\@@mod{#1}\@gobble\@nnil}%
+\def\XC at getm@d#1#2%
+ {\edef\XC@@pos{#2}\XC at sdef\@@mod{\XC at tgt@mod\XC@@pos}%
+  \ifx\XC@@pos\@@mod\def\XC@@pos{#1}\expandafter\remove at to@nnil\fi}%
+\def\XC at g@tm at d#1#2:#3:#4\XC@@
+ {\@ifxempty{#3}{\let\@@Mod\XC at mod@ignore\XC at getm@d0{#2}}%
+    {\def\@@Mod{#2}\XC at getm@d0{#3}}}%
+\def\XC at getclr#1/#2/#3/#4/#5/#6/#7/#8/#9\XC@@
+ {\ifcase\XC@@pos\space #1\or#2\or#3\or#4\or#5\or#6\or#7\or#8\fi}
+\newif\ifXC@@getmod \XC@@getmodtrue
+\let\xdefinecolor\definecolor
+\def\providecolor{\@testopt{\XC at providecolor}{}}
+\def\XC at providecolor[#1]#2%
+ {\@testopt{\XC at providec@lor[#1]{#2}}\colornameprefix}
+\def\XC at providec@lor[#1]#2[#3]%
+ {\XC at edef\XC@@tmp{#2}%
+  \@ifundefinedcolor\XC@@tmp{\XC at definecolor[#1]{#2}[#3]}%
+   {\ifnum\XC at tracing>0
+      \PackageInfo{xcolor}{Ignoring color definition `\XC@@tmp'}\fi
+    \@gobbletwo}}
+\def\xcolor@#1#2#3#4{#2}
+\def\colorlet{\@testopt{\XC at colorlet}{}}
+\def\XC at colorlet[#1]#2{\@testopt{\XC at col@rlet[#1]{#2}}{}}
+\def\XC at col@rlet[#1]#2[#3]#4%
+ {\begingroup
+  \edef\@@cls{#1}\XC at edef\@@nam{#2}\XC at sdef\@@mod{#3}\XC at edef\@@clr{#4}%
+  \XC at info\@@clr\@@tmp\XC@@tstfalse
+  \ifnum\@@tmp=\@ne\ifx\@@mod\@empty
+    \ifx\@@cls\@empty
+      \XC@@tsttrue
+    \else
+      \edef\@@tmp
+       {\expandafter\expandafter\expandafter\@secondoffive
+         \csname\@backslashchar color@\@@clr\endcsname}%
+      \ifx\@@cls\@@tmp\XC@@tsttrue\fi
+    \fi
+  \fi\fi
+  \ifXC@@tst
+    \XC at logdef\@@nam\XC at c@l at rlet\@@nam\@@clr
+  \else
+    \extractcolorspec\@@clr\@@clr
+    \ifx\@@mod\@empty\else
+      \expandafter\convertcolorspec\@@clr\@@mod\@@clr
+      \edef\@@clr{{\@@mod}{\@@clr}}\fi
+    \edef\@@tmp{\noexpand\XC at definecolor[\@@cls]{\@@nam}\@@clr}%
+  \fi
+  \expandafter\endgroup\@@tmp\xglobal at stop}
+\def\XC at c@l at rlet#1#2%
+ {\@ifundefinedcolor{#2}%
+   {\c at lor@error{`#2'}\let\@@tmp\@empty}%
+   {\edef\@@tmp
+     {\ifglobalcolors\global\else\xglobal@\fi
+      \noexpand\XC at let@cc{\@backslashchar color@#1}{\@backslashchar color@#2}}}}
+\protected\def\DefineNamedColor#1%
+ {\@nameuse{XC@\ifdefinecolors defin\else prepar\fi ecolor}[#1]}
+\def\preparecolor{\@testopt{\XC at preparecolor}{}}
+\def\XC at preparecolor[#1]#2%
+ {\@testopt{\XC at preparec@lor[#1]{#2}}\colornameprefix}
+\def\XC at preparec@lor[#1]#2[#3]#4#5%
+ {\XC at sdef\@@cls{#1}\XC at edef\@@nam{#2}%
+  \XC at getmodclr01{#4}{#5}{}%
+   {\xdef\XC@@stack
+     {\ifx\XC@@stack\@empty\else\XC@@stack,\fi{#1}{\@@nam}{#3}%
+      {\ifx\@@Mod\XC at mod@ignore\@@mod\else\@@Mod\fi}{\@@clr}}}}
+\let\XC@@stack\@empty
+\def\definecolors#1%
+ {\let\XC@@cmd\definecolor\let\XC@@glb\xglobal@
+  \expandafter\XC at definecolors#1,,}
+\def\XC at definecolors#1,%
+ {\@ifxempty{#1}{}{\expandafter\XC at definec@lors#1=#1=:\XC at definecolors}}
+\def\XC at definec@lors#1=#2=#3:%
+ {\XC at edef\@@nam{#1}\XC at edef\@@arg{#2}%
+  \let\next\XC at definec@l at rs\expandafter\next\XC@@stack,,\@nnil}
+\def\XC at definec@l at rs#1,%
+ {\ifx,#1,\let\next\remove at to@nnil\else\XC at defin@c at l@rs#1\fi\next}
+\def\XC at defin@c at l@rs#1#2#3#4#5%
+ {\def\@@tmp{#2}%
+  \ifx\@@tmp\@@arg
+    \let\xglobal@\XC@@glb\XC@@cmd[#1]{\@@nam}[#3]{#4}{#5}%
+    \let\next\remove at to@nnil
+  \fi}
+\def\providecolors#1%
+ {\let\XC@@cmd\providecolor\let\XC@@glb\xglobal@
+  \expandafter\XC at definecolors#1,,}
+\def\definecolorset
+ {\let\XC@@cmd\definecolor\@testopt{\XC at definecolorset}{}}
+\def\XC at definecolorset[#1]#2#3#4#5%
+ {\XC at getmodclr10{#2}{}{}%
+   {\XC@@getmodfalse\XC at edef\XC@@tmp{#5}\let\XC@@glb\xglobal@
+    \def\XC at definec@lorset##1,##2;%
+     {\@ifxempty{##1}{}%
+       {\let\xglobal@\XC@@glb
+        \XC@@cmd[#1]{#3##1#4}{\@@mod}{##2}\XC at definec@lorset}}%
+    \expandafter\XC at definec@lorset\XC@@tmp;,;\XC@@getmodtrue}}
+\def\providecolorset
+ {\let\XC@@cmd\providecolor\@testopt{\XC at definecolorset}{}}
+\def\preparecolorset
+ {\ifdefinecolors\let\XC@@cmd\definecolor\else\let\XC@@cmd\preparecolor\fi
+  \@testopt{\XC at definecolorset}{}}
+\def\definecolorseries#1#2#3%
+ {\@testopt{\XC at definecolorseries{#1}{#2}{#3}}{}}
+\def\XC at definecolorseries#1#2#3[#4]#5%
+ {\@testopt{\XC at definec@lorseries{#1}{#2}{#3}[#4]{#5}}{}}
+\def\XC at definec@lorseries#1#2#3[#4]#5[#6]#7%
+ {\begingroup
+  \XC at sdef\@@mod{#2}%
+  \@ifxempty{#4}{\extractcolorspec{#5}\@@clr}{\edef\@@clr{{#4}{#5}}}%
+  \expandafter\convertcolorspec\@@clr\@@mod\@@clr
+  \@namexdef{\@backslashchar colorB@#1}{{\@@mod}{\@@clr}}%
+  \edef\@@met{#3}%
+  \ifx\@@met\XC at met@last
+    \@ifxempty{#6}{\extractcolorspec{#7}\@@tmp}{\edef\@@tmp{{#6}{#7}}}%
+    \expandafter\convertcolorspec\@@tmp\@@mod\@@tmp
+    \XC at inflate\@@mod\@@tmp\@@clr\@@tmp
+    \expandafter\XC at sub\@@tmp,\@@tmp
+  \else
+    \edef\@@tmp{#7}%
+  \fi
+  \@namexdef{\@backslashchar colorD@#1}{{\@@met}{\@@tmp}}%
+  \endgroup}
+\def\resetcolorseries{\@testopt{\XC at resetcolorseries}{}}
+\def\XC at resetcolorseries[#1]#2%
+ {\begingroup
+  \@namexdef
+   {\@backslashchar color@#2}{\noexpand\xcolor@{}{}\@nameuse{\@backslashchar colorB@#2}}%
+  \XC at let@Nc\@@tmp{\@backslashchar colorD@#2}%
+  \edef\@@met{\expandafter\@firstoftwo\@@tmp}%
+  \edef\@@tmp{\expandafter\@secondoftwo\@@tmp}%
+  \ifx\@@met\XC at met@step\else
+    \edef\@@scl{\@ifxempty{#1}\colorseriescycle{#1}}%
+    \expandafter\XC at calc@\@@tmp,,,,:D%
+  \fi
+  \@namexdef{\@backslashchar colorS@#2}{\@@tmp}%
+  \endgroup}
+\def\XC at step#1%
+ {\let\xcolor@\@gobbletwo\edef\@@tmp{\@nameuse{\@backslashchar color@#1}}%
+  \expandafter\XC at st@p\@@tmp{#1}%
+  \@namexdef{\@backslashchar color@#1}{\noexpand\xcolor@{}{}{\@@mod}{\@@tmp}}}
+\def\XC at st@p#1#2#3%
+ {\def\@@mod{#1}\def\@@tmp{#2}\edef\@@vec{\@nameuse{\@backslashchar colorS@#3}}%
+  \@whilenum\@tempcnta>\z@\do
+   {\XC at inflate\@@mod\@@tmp\@@vec\@@tmp
+    \expandafter\XC at add\@@tmp,\@@tmp \expandafter\XC at calc@\@@tmp,,,,:U%
+    \advance\@tempcnta\m at ne}}
+\def\XC at stepabs#1%
+ {\edef\@@tmp{\@nameuse{\@backslashchar colorB@#1}}%
+  \expandafter\XC at st@p\@@tmp{#1}%
+  \edef\@@tmp
+   {\def\noexpand\@@mod{\@@mod}\def\noexpand\@@clr{\@@tmp}}}
+\def\blendcolors{\@ifstar{\XC at blendcolors\colorblend}{\XC at blendcolors{}}}
+\def\XC at blendcolors#1#2%
+ {\edef\colorblend{#1}\XC at edef\XC@@tmp{#2}%
+  \ifx\XC@@tmp\@empty
+    \xglobal@\blendcolorsfalse
+  \else
+    \xglobal@\blendcolorstrue
+    \expandafter\XC at blendc@lors\XC@@tmp!!\@nil
+  \fi
+  \xglobalize@\colorblend \xglobal at stop}
+\def\XC at blendc@lors!#1!#2!#3\@nil
+ {\@ifxempty{#1}{}%
+   {\@ifxempty{#2}%
+    {\edef\colorblend{\colorblend!#1!white}}%
+    {\edef\colorblend{\colorblend!#1!#2}\XC at blendc@lors!#3!\@nil}}}
+\blendcolors{}
+\def\maskcolors{\@testopt{\XC at maskcolors}{}}
+\def\XC at maskcolors[#1]#2%
+ {\XC at edef\colormask{#2}%
+  \ifx\colormask\@empty
+    \xglobal@\maskcolorsfalse \def\XC at mmod{}\def\XC at mclr{}%
+  \else
+    \xglobal@\maskcolorstrue \extractcolorspecs\colormask\XC at mmod\XC at mclr
+    \@ifxempty{#1}{}%
+     {\convertcolorspec\XC at mmod\XC at mclr{#1}\XC at mclr \XC at sdef\XC at mmod{#1}}%
+    \XC at coremodel\XC at mmod\XC at mclr
+  \fi
+  \xglobalize@\colormask \xglobalize@\XC at mmod \xglobalize@\XC at mclr
+  \xglobal at stop}
+\maskcolors{}
+\DeclareRobustCommand\color
+ {\@ifnextchar[\@undeclaredcolor\@declaredcolor}
+\def\@undeclaredcolor[#1]#2%
+ {\begingroup
+  \let\@@cls\@empty
+  \XC at getmodclr12{#1}{#2}{}%
+   {\ifblendcolors
+      \ifx\colorblend\@empty\else
+        \edef\@@mix{\expandafter\@gobble\colorblend}\@tempswafalse
+        \XC at coremodel\@@mod\@@clr\@xcolor@{}{}\@@mod\@@clr
+      \fi
+    \fi
+    \ifconvertcolorsU
+      \edef\@@tmp{\XC at tgt@mod{\@@mod}}%
+      \convertcolorspec\@@mod\@@clr\@@tmp\@@clr \let\@@mod\@@tmp
+    \fi
+    \ifmaskcolors
+      \convertcolorspec\@@mod\@@clr\XC at mmod\@@clr
+      \let\@@mod\XC at mmod
+      \XC at inflate\@@mod\XC at mclr\@@clr\@@tmp
+      \expandafter\XC at mul\@@tmp,\@@clr
+    \fi
+    \edef\@@tmp{\noexpand\XC at undeclaredcolor{\@@mod}{\@@clr}}%
+    \expandafter\endgroup\@@tmp}}
+\def\XC at undeclaredcolor#1#2%
+ {\@ifundefinedmodel{#1}%
+   {\c at lor@error{model `#1'}}%
+   {\@nameuse{color@#1}\current at color{#2}%
+    \edef\XC at current@color{\noexpand\xcolor@{}{\current at color}{#1}{#2}}%
+    \XC at display}}
+\def\@declaredcolor#1%
+ {\XC at edef\XC@@tmp{#1}\XC@@tstfalse
+  \ifcase\XC at type\XC@@tmp\relax \XC@@tsttrue\or \relax\else
+    \ifblendcolors\XC@@tsttrue\fi \ifmaskcolors\XC@@tsttrue\fi
+    \ifconvertcolorsU\XC@@tsttrue\fi
+  \fi
+  \ifXC@@tst
+    \expandafter\XC at declaredcolor\else
+    \expandafter\XC at declaredc@lor\fi}
+\def\XC at declaredcolor
+ {\XC at split\XC@@tmp
+  \edef\@@tmp{\noexpand\@undeclaredcolor[\@@mod]{\@@clr}}%
+  \expandafter\endgroup\@@tmp}
+\def\XC at declaredc@lor
+ {\XC at let@Nc\XC at current@color{\@backslashchar color@\XC@@tmp}%
+  \edef\current at color{\XC at current@color}%
+  \XC at display}
+\protected\def\textcolor#1#{\@textcolor{#1}}
+\def\@textcolor#1#2#3{\protect\leavevmode{\color#1{#2}#3}}
+\protected\def\pagecolor
+ {\begingroup
+  \let\ignorespaces\endgroup \let\set at color\set at page@color
+  \color}
+\protected\def\nopagecolor
+ {\@ifundefined{no at page@color}%
+   {\PackageInfo{xcolor}{\@backslashchar nopagecolor\space is not supported}}%
+   {\no at page@color}}
+\InputIfFileExists{mathcolor.ltx}{}{}
+\protected\def\colorbox#1#{\color at box{#1}}
+\def\color at box#1#2{\color at b@x\relax{\color#1{#2}}}
+\protected\def\fcolorbox#1#{\color at fbox{#1}}
+\def\color at fbox#1#2#3#{\protect\color at fb@x{#1}{#2}{#3}}
+\def\color at fb@x#1#2#3#4%
+ {\color at b@x{\fboxsep\z@\color#1{#2}\XC at fbox}%
+   {\@ifxempty{#3}{\color#1}{\color#3}{#4}}}
+\long\def\color at b@x#1#2#3%
+ {\leavevmode
+  \setbox\z@\hbox{\kern\fboxsep{\set at color#3}\kern\fboxsep}%
+  \dimen@\ht\z@\advance\dimen@\fboxsep\ht\z@\dimen@
+  \dimen@\dp\z@\advance\dimen@\fboxsep\dp\z@\dimen@
+  {#1{#2\color at block{\wd\z@}{\ht\z@}{\dp\z@}\box\z@}}}
+\def\XC at frameb@x#1%
+ {\hbox
+   {\@tempdima\fboxrule \advance\@tempdima\fboxsep
+    \advance\@tempdima\dp\@tempboxa
+    \setbox\@tempboxa\hbox
+     {\lower\@tempdima\hbox
+       {\vbox
+         {\kern\fboxrule
+          \hbox{\kern\fboxrule#1%
+                \vbox{\kern\fboxsep\box\@tempboxa\kern\fboxsep}%
+                #1\kern\fboxrule}%
+          \kern\fboxrule}}}%
+    \@tempdima\wd\@tempboxa
+    \edef\@tempa{{\the\@tempdima}{\the\ht\@tempboxa}{\the\dp\@tempboxa}}%
+    \box\@tempboxa\kern-\@tempdima\expandafter\boxframe\@tempa}}
+\ifXC@@fbox
+  \let\@frameb at x\XC at frameb@x \let\XC at fbox\fbox
+\else
+  \def\XC at fbox{\let\@frameb at x\XC at frameb@x\fbox}
+\fi
+
+\ifnum\XC@@xcd@>\m at ne
+\def\XC at boxframe#1#2#3#4%
+ {\hbox{\sbox\z@{\ifdim\fboxrule>\z@ #4\fi}%
+    \wd\z@#1\relax\ht\z@#2\relax\dp\z@#3\relax\box\z@}}
+\fi
+\ifcase\XC@@xcd@
+\providecommand*\color at block[3]%
+ {{\set at color\hbox
+    {\dimen@#3\edef\@tempa{ \number\dimen@\space}%
+     \dimen@#2\edef\@tempa{ \number\dimen@\@tempa}%
+     \dimen@#1\relax
+     \XC at special{\number\dimen@\@tempa XCcolorblock}}}}
+\providecommand*\boxframe[3]%
+ {\XC at boxframe{#1}{#2}{#3}%
+   {\dimen@#3\edef\@tempa{ \number\dimen@\space}%
+    \dimen@#2\edef\@tempa{ \number\dimen@\@tempa}%
+    \dimen@#1\relax
+    \XC at special{\number\fboxrule\space\number\dimen@\@tempa XCboxframe}}}
+\or
+\providecommand*\boxframe[3]%
+ {\XC at boxframe{#1}{#2}{#3}%
+   {\dimen@#3\edef\@tempa{ 0 -\strip at pt\dimen@\space}%
+    \edef\@tempb{\advance\dimen@\the\dimen@}%
+    \dimen@#2\advance\dimen at -\fboxrule\@tempb
+    \edef\@tempb{ \strip at pt\dimen@\space re s}%
+    \dimen@#1\advance\dimen at -\fboxrule
+    \edef\@tempb{ cm\@tempa\strip at pt\dimen@\@tempb}%
+    \dimen at .5\fboxrule\edef\@tempa{ \strip at pt\dimen@}%
+    \XC at special
+     {0.996264 0 0 0.996264 0 0 cm
+      \strip at pt\fboxrule\space w [] 0 d 2 J 0 j 4 M
+      1 0 0 1\@tempa\@tempa\@tempb}}}
+\fi
+\providecommand*\color at block[3]%
+ {{\set at color\rlap{\ifcolors@\vrule\@width#1\@height#2\@depth#3\fi}}}
+\providecommand*\boxframe[3]%
+ {\hbox
+   {\dimen@#2\advance\dimen@#3\relax
+    \lower#3\vbox
+     {\hrule\@height\fboxrule
+      \@tempdima-0.5\fboxrule \ifodd\fboxrule\advance\@tempdima\m at ne sp\fi
+      \kern\@tempdima
+      \hbox
+       {\advance\dimen at -\fboxrule
+        \vrule\@width\fboxrule\@height\dimen@\@depth\z@
+        \@tempdima#1\advance\@tempdima-\tw@\fboxrule \kern\@tempdima
+        \vrule\@width\fboxrule\@height\dimen@\@depth\z@}%
+      \kern-0.5\fboxrule
+      \hrule\@height\fboxrule}}}
+\def\@xcolor@#1#2#3#4%
+ {\XC at sdef\@@mod{#3}\edef\@@clr{#4}%
+  \ifx\@@mix\@empty\else\expandafter\@xcolor@@\@@mix!!!!\@nil\fi
+  \if at tempswa
+    \XC at let@Nc\@@tmp{XC at cnv@\@@mod @compl}%
+    \ifx\@@tmp\relax \expandafter\XC at calc@\@@clr,,,,:C\else
+                     \expandafter\@@tmp\@@clr,\fi
+    \let\@@clr\@@tmp
+  \fi}
+\def\@xcolor@@#1!#2!#3!#4!#5\@nil
+ {\dimen@\@ifxempty{#1}{100}{#1}\p@
+  \edef\@@mix{\@ifxempty{#2}{white}{#2}}%
+  \ifdim\dimen@=100\p@
+    \expandafter\XC at postfix\@@mix]\relax
+  \else\ifdim\dimen@=\z@
+    \extractcolorspecs\@@mix\@@mod\@@clr
+  \else
+    \XC at let@Nc\@@tmp{XC at clr@\@@mod @\@@mix}%
+    \ifx\@@tmp\relax
+      \extractcolorspec\@@mix\@@tmp
+      \ifx\@@mod\XC at mod@gray
+        \edef\@@mod{\expandafter\@firstoftwo\@@tmp}%
+        \edef\@@tmp{\expandafter\@secondoftwo\@@tmp}%
+        \convertcolorspec\XC at mod@gray\@@clr\@@mod\@@clr
+      \else
+        \expandafter\convertcolorspec\@@tmp\@@mod\@@tmp
+      \fi
+    \else
+      \ifx\@@mod\XC at mod@hsb\expandafter\XC at extract@hue\@@clr:\@@hue\fi
+    \fi
+    \XC at inflate\@@mod\@@clr\@@tmp\@@tmp
+    \expandafter\XC at mix\@@tmp,\@@clr
+  \fi\fi
+  \@ifxempty{#3}%
+   {\@ifxempty{#4}{}{\@xcolor@@!#4!#5\@nil}}%
+   {\@xcolor@@#3!#4!#5\@nil}}
+\def\XC at split#1%
+ {\begingroup\XC at edef\@@tmp{#1}\expandafter\XC at split@i\@@tmp>>\@nnil}
+\def\XC at split@i#1>%
+ {\def\@@tmp{#1}\XC at split@ii#1:\@nil \XC at func}
+\def\XC at split@ii#1:#2\@nil
+ {\@ifxempty{#2}{\XC at split@vi}{\XC at split@iii#1,,:#2}}
+\def\XC at split@iii#1,#2,#3:#4:%
+ {\edef\XC@@mod{#1}\let\@tempa\@empty
+  \ifx,#2,\XC@@tsttrue\@tempdima\z@\else\XC@@tstfalse\@tempdima#2\p@\fi
+  \XC at split@iv#4;,;}
+\def\XC at split@iv#1,#2;%
+ {\@ifxempty{#1}%
+   {\let\XC@@clr\@empty \@tempa \expandafter\XC at calc@\XC@@clr,,,,:U%
+    \let\@@mod\XC@@mod \let\@@clr\@@tmp}
+   {\XC at append\@tempa{\XC at split@v{#1}{#2}}%
+    \ifXC@@tst\advance\@tempdima#2\p@\fi
+    \XC at split@iv}}
+\def\XC at split@v#1#2%
+ {\def\@@tmp{#1}\XC at split@vi
+  \ifx\@@mod\XC@@mod\else
+    \convertcolorspec\@@mod\@@clr\XC@@mod\@@clr
+  \fi
+  \dimen@#2\p@ \rdivide\dimen@\@tempdima
+  \edef\@@scl{\strip at pt\dimen@}%
+  \expandafter\XC at calc@\@@clr,,,,:S%
+  \ifx\XC@@clr\@empty\let\XC@@clr\@@tmp\else
+    \XC at inflate\XC@@mod\XC@@clr\@@tmp\@@tmp
+    \expandafter\XC at add\@@tmp,\XC@@clr
+  \fi}
+\def\XC at split@vi{\count@\z@ \expandafter\XC at split@vii\@@tmp!\@nil}
+\def\XC at split@vii#1%
+ {\ifx#1-\advance\count@\@ne\expandafter\XC at split@vii
+  \else\expandafter\XC at split@viii\expandafter#1\fi}
+\def\XC at split@viii#1!#2\@nil
+ {\edef\@@nam{#1}\edef\@@mix{#2}%
+  \ifodd\count@\@tempswatrue\else\@tempswafalse\fi
+  \@ifundefinedcolor\@@nam
+   {\c at lor@error{`\@@nam'}\def\@@nam{black}}{}%
+  \let\xcolor@\@xcolor@\@nameuse{\@backslashchar color@\@@nam}}
+\def\XC at postfix#1#2]#3\relax
+ {\begingroup
+  \if[#1\@tempcnta#2\relax\XC at stepabs\@@nam
+  \else\@tempcnta\z@
+    \@tfor\@@tok:=#1#2\do
+     {\if+\@@tok\advance\@tempcnta\@ne
+      \else\if-\@@tok\advance\@tempcnta\m at ne
+      \else\@tempcnta\z@\expandafter\@break at tfor\fi\fi}%
+    \ifnum\@tempcnta=\z@\relax\else\XC at step\@@nam\fi
+    \let\@@tmp\@empty
+  \fi\expandafter\endgroup\@@tmp}
+\def\XC at func#1>{\@ifxempty{#1}{\remove at to@nnil}{\XC at fun@#1,>\XC at func}}
+\def\XC at fun@#1,#2>{\@nameuse{XC at func@#1}#2,,>}
+\def\XC at func@wheel#1,#2,#3>{\XC at func@wh at el{#1}{#2}0}
+\def\XC at func@twheel#1,#2,#3>{\XC at func@wh at el{#1}{#2}1}
+\def\XC at func@wh at el#1#2#3%
+ {\convertcolorspec\@@mod\@@clr
+   {\ifcase#3 \XC at mod@Hsb\or\XC at mod@tHsb\fi}\@@clr
+  \expandafter\XC at extract@hue\@@clr:\@@hue \dimen@#1\p@
+  \@ifxempty{#2}{}%
+   {\rdivide\dimen@{#2}\lshift\dimen@
+    \dimen@\rangeHsb\dimen@\rshift\dimen@}%
+  \advance\dimen@\@@hue\p@ \rdivide\dimen@\rangeHsb
+  \edef\@@hue{\strip at pt\dimen@}\XC at calcU\@@hue\@@hue
+  \ifcase#3
+    \expandafter\XC at replace@hue\@@clr:\@@hue,\@@clr
+  \or
+    \XC at c@lcS\rangeHsb{}\@@hue\@@hue
+    \expandafter\XC at replace@hue\@@clr:\@@hue,\@@clr
+    \convertcolorspec\XC at mod@tHsb\@@clr\XC at mod@hsb\@@clr
+  \fi
+  \let\@@mod\XC at mod@hsb}
+\def\XC at display
+ {\XC at bcolor\XC at let@cN{\@backslashchar color at .}\XC at current@color
+  \ifnum\XC at type{.}=1
+    \PackageWarning{xcolor}{Incompatible color definition}\else
+  \ifnum\XC at tracing>2
+    \begingroup \let\xcolor@\@empty \def\@nil{\@backslashchar @nil}%
+    \PackageInfo{xcolor}{Setting color `\XC at current@color'}%
+    \endgroup
+  \fi\fi
+  \XC at mcolor\set at color\XC at ecolor\ignorespaces}
+\let\XC at bcolor\relax
+\let\XC at mcolor\relax
+\let\XC at ecolor\relax
+\def\XC at bordercolor#1#2%
+ {\extractcolorspec{#2}\XC@@tmp
+  \expandafter\convertcolorspec\XC@@tmp\XC at mod@rgb\XC@@tmp
+  \expandafter\edef\csname @#1bordercolor\endcsname
+   {\expandafter\XC at strip@comma\XC@@tmp,,\@nnil}}
+\def\XC at pdfborder#1 #2 #3\relax
+ {\def\@@scl{80}\XC at calc@#1,#2,#3,,:S%
+  \edef\@pdfborder{\expandafter\XC at strip@comma\@@tmp,,\@nnil}}
+\@ifXCopt{table}{%
+ \def\rowcolors
+  {\@ifstar{\@rowcmdfalse\rowc at lors}{\@rowcmdtrue\rowc at lors}}
+ \def\rowc at lors{\@testopt{\rowc at l@rs}{}}
+ \def\rowc at l@rs[#1]#2#3#4%
+  {\global\rownum=\z@
+   \global\@rowcolorstrue
+   \@ifxempty{#3}%
+     {\def\@oddrowcolor{\@norowcolor}}%
+     {\def\@oddrowcolor{\gdef\CT at row@color{\CT at color{#3}}}}%
+   \@ifxempty{#4}%
+     {\def\@evenrowcolor{\@norowcolor}}%
+     {\def\@evenrowcolor{\gdef\CT at row@color{\CT at color{#4}}}}%
+   \if at rowcmd
+     \def\@rowcolors
+      {#1\if at rowcolors
+         \noalign{\relax\ifnum\rownum<#2\@norowcolor\else
+                  \ifodd\rownum\@oddrowcolor\else\@evenrowcolor\fi\fi}%
+       \fi}%
+   \else
+     \def\@rowcolors
+      {\if at rowcolors
+         \ifnum\rownum<#2\noalign{\@norowcolor}\else
+         #1\noalign{\ifodd\rownum\@oddrowcolor\else\@evenrowcolor\fi}\fi
+       \fi}%
+   \fi
+   \CT at everycr{\@rowc at lors\the\everycr}%
+   \ignorespaces}
+ \def\@rowc at lors{\noalign{\global\advance\rownum\@ne}\@rowcolors}
+ \let\@rowcolors\@empty
+ \def\showrowcolors{\noalign{\global\@rowcolorstrue}\@rowcolors}
+ \def\hiderowcolors{\noalign{\global\@rowcolorsfalse\@norowcolor}}
+ \def\@norowcolor{\global\let\CT at row@color\relax}
+ \@norowcolor
+ \newif\if at rowcolors
+ \newif\if at rowcmd
+ \@ifundefined{rownum}{\newcount\rownum}{}
+ \def\CT at extract#1\columncolor#2#3\@nil
+  {\if!#2%
+     \let\CT at column@color\@empty
+   \else
+     \if[#2%
+       \expandafter\CT at extractb
+     \else
+       \XC at edef\XC@@tmp{#2}%
+       \edef\CT at column@color{\noexpand\CT at color{\XC@@tmp}}%
+       \expandafter\CT at extractd
+     \fi
+     {#1}#3\@nil
+   \fi}
+}{}
+\def\extractcolorspec#1#2%
+ {\XC at split{#1}\edef\@@tmp{{\@@mod}{\@@clr}}\aftergroupdef#2\@@tmp}
+\def\extractcolorspecs#1#2#3%
+ {\extractcolorspec{#1}#3%
+  \edef#2{\expandafter\@firstoftwo#3}%
+  \edef#3{\expandafter\@secondoftwo#3}}
+\def\XC at extract@hue#1,#2:#3{\edef#3{#1}}
+\def\XC at replace@hue#1,#2:#3,#4{\edef#4{#3,#2}}
+\def\@ifundefinedcolor#1{\@ifundefined{\@backslashchar color@#1}}
+\def\@ifundefinedmodel#1{\@ifundefined{color@#1}}
+\def\XC at type#1%
+ {\expandafter\expandafter\expandafter\XC at typ@
+  \csname\@backslashchar color@#1\endcsname\@empty\@empty\@empty\XC@@}
+\def\XC at typ@#1#2#3#4\XC@@
+ {\ifx#1\relax 0\else
+    \ifx#1\xcolor@
+      \ifx$#2$%
+        \ifx$#3$4\else3\fi\@gobbletwo
+      \else2\fi\@gobbletwo
+    \else1\fi
+  \fi}
+\def\XC at info#1#2%
+ {\XC at edef#2{#1}%
+  \expandafter\in@\expandafter>\expandafter{#2}%
+  \ifin@\def#2{4}\else\expandafter\in@\expandafter:\expandafter{#2}%
+  \ifin@\def#2{3}\else\expandafter\in@\expandafter!\expandafter{#2}%
+  \ifin@\def#2{2}\else % now there's no >,:,!
+  \if-\expandafter\@car#2\relax\@nil\def#2{2}\else % catches -red
+  \edef#2{\noexpand\in@{/./}{/#2/}}#2%
+  \edef#2{\ifin at 0\else1\fi}\fi\fi\fi\fi}
+\def\tracingcolors{\begingroup\afterassignment\XC at tracingcolors\count@}
+\def\XC at tracingcolors{\aftergroupdef\XC at tracing{\the\count@}}
+\tracingcolors=0
+\def\XC at logdef#1%
+ {\ifnum\XC at tracing>1
+    \@ifundefinedcolor{#1}%
+     {\ifnum\XC at tracing>2
+        \PackageInfo{xcolor}{Defining color `#1'}%
+      \fi}%
+     {\PackageInfo{xcolor}{Redefining color `#1'}}%
+  \fi}
+\newenvironment*{testcolors}[1][rgb,cmyk,hsb,HTML]%
+ {\let\@@nam\@empty\count@\z@
+  \@for\@@tmp:=#1\do
+    {\advance\count@\@ne
+     \XC at sdef\@@tmp{\@@tmp}\edef\@@nam{\@@nam{\@@tmp}}}%
+  \edef\@@num{\the\count@}%
+  \def\XC@@gt{\textgreater}\def\@@tmp{OT1}%
+  \ifx\f at encoding\@@tmp
+    \@expandtwoargs\in@{,\f at family,}{,cmtt,pcr,}%
+    \ifin@\def\XC@@gt{>}\fi
+  \fi
+  \def\XC@@xcp@{-1}\ifnum\XC at tracing>1 \def\XC at tracing{1}\fi
+  \def\testcolor{\@testopt{\@testcolor}{}}%
+  \def\@testcolor[##1]##2%
+   {\XC at mdef\@@mod{##1}\XC at edef\@@clr{##2}%
+    \ifx\@@mod\@empty
+      \let\@@arg\@@clr\XC at replace\@@arg>\XC@@gt\else
+      \edef\@@arg{[\@@mod]{\@@clr}}\XC at definecolor[]{*}\@@mod\@@clr
+      \def\@@clr{*}\fi
+    \XC at append\@@arg{&}\extractcolorspecs\@@clr\@@mod\@@clr
+    \@testc at lor}%
+  \def\@testc at lor
+   {\count@\z@
+    \expandafter\@tfor\expandafter\@@tmp\expandafter:\expandafter=\@@nam\do
+     {\ifx\@@clr\@empty
+        \edef\@@cmd{\noexpand\textbf{\@@tmp}}%
+      \else
+        \convertcolorspec\@@mod\@@clr\@@tmp\@@cmd
+        \edef\@@cmd
+         {\noexpand\@testc at l@r{\@@tmp}{\@@cmd}%
+          \ifx\@@mod\@@tmp\noexpand\underline\fi
+          {\expandafter\XC at strip@comma\@@cmd,,\@nnil}}%
+      \fi
+      \expandafter\XC at append\expandafter\@@arg\expandafter{\@@cmd}%
+      \advance\count@\@ne
+      \ifnum\count@=\@@num\XC at append\@@arg{\\}\else\XC at append\@@arg{&}\fi}%
+    \@@arg}%
+  \def\@testc at l@r##1##2%
+   {\fboxsep\z@\fbox{\colorbox[##1]{##2}{\phantom{XX}}} }%
+  \tabular{@{}l*{\@@num}{l}@{}}%
+  \def\@@arg{\textbf{color}& }\let\@@clr\@empty\@testc at lor}%
+ {\endtabular\ignorespacesafterend}
+\def\color at setgroup{\begingroup\set at color}
+\let\color at begingroup\begingroup
+\def\color at endgroup{\endgraf\endgroup}
+\def\color at hbox{\hbox\bgroup\color at begingroup}
+\def\color at vbox{\vbox\bgroup\color at begingroup}
+\def\color at endbox{\color at endgroup\egroup}
+\def\convertcolorspec#1#2#3#4%
+ {\begingroup
+  \XC at sdef\sm{#1}\XC at sdef\tm{#3}\edef\@@tmp{#2}%
+  \ifx\sm\XC at mod@named\extractcolorspecs\@@tmp\sm\@@tmp\fi
+  \ifx\sm\tm\else\csname XC at cnv@\sm\expandafter\endcsname\@@tmp,\fi
+  \aftergroupdef#4\@@tmp}
+\def\XC at coremodel#1#2%
+ {\XC at ifxcase#1%
+   {\XC at mod@RGB {\convertcolorspec#1#2\XC at mod@rgb#2\let#1\XC at mod@rgb}%
+    \XC at mod@HTML{\convertcolorspec#1#2\XC at mod@rgb#2\let#1\XC at mod@rgb}%
+    \XC at mod@Hsb {\convertcolorspec#1#2\XC at mod@hsb#2\let#1\XC at mod@hsb}%
+    \XC at mod@tHsb{\convertcolorspec#1#2\XC at mod@hsb#2\let#1\XC at mod@hsb}%
+    \XC at mod@HSB {\convertcolorspec#1#2\XC at mod@hsb#2\let#1\XC at mod@hsb}%
+    \XC at mod@Gray{\convertcolorspec#1#2\XC at mod@gray#2\let#1\XC at mod@gray}%
+    \XC at mod@wave{\convertcolorspec#1#2\XC at mod@hsb#2\let#1\XC at mod@hsb}%
+    \XC at mod@named{}%
+    \XC at mod@ps{}}%
+   {\expandafter\XC at calc@#2,,,,:N\let#2\@@tmp}}
+\def\XC at cnv@rgb#1,#2,#3,%
+ {\XC at ifxcase\tm
+   {\XC at mod@cmy {\XC at calc@#1,#2,#3,,:C}%
+    \XC at mod@cmyk
+     {\XC at calc@#1,#2,#3,,:C\expandafter\XC at cnv@cmy at cmyk\@@tmp,}%
+    \XC at mod@RGB {\edef\@@scl{\rangeRGB}\XC at calc@#1,#2,#3,,:M}%
+    \XC at mod@HTML{\edef\@@scl{\@cclv}\XC at calc@#1,#2,#3,,:M%
+      \expandafter\XC at calc@\@@tmp,,:H%
+      \expandafter\XC at cnv@rgb at HTML\@@tmp,}%
+    \XC at mod@gray{\XC at cnv@rgb at gray#1,#2,#3,}%
+    \XC at mod@Gray{\XC at cnv@rgb at gray#1,#2,#3,\XC at cnv@gray\@@tmp,}}%
+   {\XC at cnv@rgb at hsb#1,#2,#3,\XC at cnv@hsb@}}
+\def\XC at cnv@rgb@
+ {\ifx\tm\XC at mod@rgb\else\expandafter\XC at cnv@rgb\@@tmp,\fi}
+\def\XC at cnv@rgb at hsb#1,#2,#3,%
+ {\count@\z@
+  \ifdim#2\p@>#1\p@ \else\advance\count at 4 \fi
+  \ifdim#3\p@>#2\p@ \else\advance\count at 2 \fi
+  \ifdim#1\p@>#3\p@ \else\advance\count at 1 \fi
+  \ifcase\count@\or
+  \XC at c@v at rgb@hsb{#3}{#2}{#1}3{}\or
+  \XC at c@v at rgb@hsb{#2}{#1}{#3}1{}\or
+  \XC at c@v at rgb@hsb{#2}{#3}{#1}3-\or
+  \XC at c@v at rgb@hsb{#1}{#3}{#2}5{}\or
+  \XC at c@v at rgb@hsb{#3}{#1}{#2}5-\or
+  \XC at c@v at rgb@hsb{#1}{#2}{#3}1-\or
+  \def\@tempa{0}\def\@tempb{0}\XC at calcN{#3}\@tempc
+  \fi
+  \edef\@@tmp{\@tempa,\@tempb,\@tempc}}
+\def\XC at c@v at rgb@hsb#1#2#3#4#5%
+ {\XC at calcN{#1}\@tempc \llshiftset\dimen@{#1}%
+  \llshiftset\@tempdimb{-#3}\advance\@tempdimb\dimen@
+  \llshiftset\@tempdima{-#5#2}\advance\@tempdima#5\dimen@
+  \advance\@tempdima#4\@tempdimb \rdivide\@tempdima{6\@tempdimb}%
+  \edef\@tempa{\ifdim\@tempdima>\p at 1\else\strip at pt\@tempdima\fi}%
+  \rdivide\@tempdimb\dimen@
+  \edef\@tempb{\strip at pt\@tempdimb}}
+\def\XC at cnv@rgb at gray#1,#2,#3,%
+ {\llshiftset\dimen@{#1}\@tempdima30\dimen@
+  \llshiftset\dimen@{#2}\advance\@tempdima59\dimen@
+  \llshiftset\dimen@{#3}\advance\@tempdima11\dimen@
+  \rrshift\@tempdima \rdivide\@tempdima{100}%
+  \edef\@@tmp{\strip at pt\@tempdima}}
+\def\XC at cnv@rgb at HTML#1,#2,#3,%
+ {\edef\@@tmp{#1#2#3}}
+\def\XC at cnv@cmy#1,#2,#3,%
+ {\XC at ifxcase\tm
+   {\XC at mod@cmyk{\XC at cnv@cmy at cmyk#1,#2,#3,}%
+    \XC at mod@gray{\XC at cnv@rgb at gray#1,#2,#3,\XC at calcC\@@tmp\@@tmp}%
+    \XC at mod@Gray{\XC at cnv@rgb at gray#1,#2,#3,\XC at calcC\@@tmp\@@tmp
+      \XC at cnv@gray\@@tmp,}}%
+   {\XC at calc@#1,#2,#3,,:C\XC at cnv@rgb@}}
+\def\XC at cnv@cmy at cmyk#1,#2,#3,%
+ {\edef\@@scl
+   {\ifdim#1\p@<#2\p@
+    \ifdim#1\p@<#3\p@ #1\else #3\fi \else
+    \ifdim#2\p@<#3\p@ #2\else #3\fi \fi}%
+  \expandafter\XC at calc@\adjustUCRBG,:S%
+  \expandafter\XC at c@v at cmy@cmyk\@@tmp,#1,#2,#3,}
+\def\XC at c@v at cmy@cmyk#1,#2,#3,#4,#5,#6,#7,%
+ {\XC at add#5,#6,#7,,-#1,-#2,-#3,,\@@tmp \edef\@@tmp{\@@tmp,#4}%
+  \expandafter\XC at calc@\@@tmp,:N}
+\def\XC at cnv@cmyk#1,#2,#3,#4,%
+ {\XC at ifxcase\tm
+   {\XC at mod@gray{\XC at cnv@rgb at gray#1,#2,#3,\edef\@@arg{#4}%
+      \XC at calcT\@@tmp\@@tmp \XC at calcC\@@tmp\@@tmp}%
+    \XC at mod@Gray{\XC at cnv@rgb at gray#1,#2,#3,\edef\@@arg{#4}%
+      \XC at calcT\@@tmp\@@tmp \XC at calcC\@@tmp\@@tmp \XC at cnv@gray\@@tmp,}}%
+   {\XC at cnv@cmyk at cmy#1,#2,#3,#4,%
+    \ifx\tm\XC at mod@cmy\else\expandafter\XC at cnv@cmy\@@tmp,\fi}}
+\def\XC at cnv@cmyk at cmy#1,#2,#3,#4,%
+ {\edef\@@arg{#4}\XC at calc@#1,#2,#3,,:T}
+\def\XC at cnv@hsb#1,#2,#3,%
+ {\XC at ifxcase\tm
+   {\XC at mod@Hsb {\XC at cnv@hsb at Hsb#1,#2,#3,}%
+    \XC at mod@tHsb{\XC at cnv@hsb at Hsb#1,#2,#3,\expandafter\XC at cnv@Hsb\@@tmp,}%
+    \XC at mod@HSB {\edef\@@scl{\rangeHSB}\XC at calc@#1,#2,#3,,:M}}%
+   {\XC at cnv@hsb at rgb#1,#2,#3,\XC at cnv@rgb@}}
+\def\XC at cnv@hsb@
+ {\ifx\tm\XC at mod@hsb\else\expandafter\XC at cnv@hsb\@@tmp,\fi}
+\def\XC at cnv@hsb at rgb#1,#2,#3,%
+ {\llshiftset\dimen@{#1}\dimen at 6\dimen@ \rrshift\dimen@
+  \afterassignment\dimen@\count@=\the\dimen@
+  \edef\@@tmp{\strip at pt\dimen@}%
+  \ifodd\count@\else\XC at calcC\@@tmp\@@tmp\fi
+  \edef\@@tmp
+   {\ifcase\count@ 0,\@@tmp,1\or \@@tmp,0,1\or 1,0,\@@tmp\or
+    1,\@@tmp,0\or \@@tmp,1,0\or 0,1,\@@tmp\or 0,\@@tmp,1\fi}%
+  \edef\@@scl{#2}\expandafter\XC at calc@\@@tmp,,:S%
+  \expandafter\XC at calc@\@@tmp,,:C%
+  \edef\@@scl{#3}\expandafter\XC at calc@\@@tmp,,:S%
+  \expandafter\XC at calc@\@@tmp,,:N}
+\def\XC at cnv@hsb at Hsb#1,#2,#3,%
+ {\XC at c@lcS\rangeHsb{,#2,#3}{#1}\@@tmp}
+\def\XC at cnv@gray#1,%
+ {\XC at ifxcase\tm
+   {\XC at mod@rgb {\XC at calcN{#1}\@@tmp \edef\@@tmp{\@@tmp,\@@tmp,\@@tmp}}%
+    \XC at mod@cmy {\XC at calcC{#1}\@@tmp \edef\@@tmp{\@@tmp,\@@tmp,\@@tmp}}%
+    \XC at mod@cmyk{\XC at calcC{#1}\@@tmp \edef\@@tmp{0,0,0,\@@tmp}}%
+    \XC at mod@RGB {\edef\@@scl{\rangeRGB}\XC at calcM{#1}\@@tmp
+      \edef\@@tmp{\@@tmp,\@@tmp,\@@tmp}}%
+    \XC at mod@HTML{\edef\@@scl{\@cclv}\XC at calcM{#1}\@@tmp
+      \XC at calcH\@@tmp\@@tmp \edef\@@tmp{\@@tmp\@@tmp\@@tmp}}%
+    \XC at mod@HSB {\edef\@@scl{\rangeHSB}\XC at calcM{#1}\@@tmp
+      \edef\@@tmp{0,0,\@@tmp}}%
+    \XC at mod@Gray{\edef\@@scl{\rangeGray}\XC at calcM{#1}\@@tmp}}%
+   {\XC at calcN{#1}\@@tmp \edef\@@tmp{0,0,\@@tmp}}}
+\def\XC at cnv@RGB#1,#2,#3,%
+ {\edef\@@scl{\rangeRGB}\XC at calc@#1,#2,#3,,:D\XC at cnv@rgb@}
+\def\XC at cnv@HTML#1,%
+ {\edef\@@tmp{\expandafter\@hex at Hex#1\relax}\expandafter\XC at cnv@HTML@\@@tmp
+  \edef\@@scl{\@cclv}\expandafter\XC at calc@\@@tmp,,:D\XC at cnv@rgb@}
+\def\XC at cnv@HTML@#1#2#3#4#5#6%
+ {\edef\@@tmp{\number"#1#2,\number"#3#4,\number"#5#6}}
+\def\XC at cnv@Hsb#1,#2,#3,%
+ {\ifx\tm\XC at mod@tHsb\XC at cnv@@Hsb#1,#2,#3,\XC at cnv@Hsb@
+  \else\XC at cnv@Hsb at hsb#1,#2,#3,\XC at cnv@hsb@\fi}
+\def\XC at cnv@Hsb at hsb#1,#2,#3,%
+ {\XC at c@lcD\rangeHsb{,#2,#3}{#1}\@@tmp}
+\def\XC at cnv@@Hsb#1,#2,#3,#4%
+ {\dimen@\rangeHsb\p@ \advance\dimen@\p@ \edef\@@tmp{\strip at pt\dimen@}%
+  \edef\@@tmp{0,0;\rangetHsb;\rangeHsb,\rangeHsb;\@@tmp,\@@tmp;}%
+  \dimen@#1\p@ \expandafter#4\@@tmp\@nnil
+  \edef\@@tmp{\strip at pt\dimen@,#2,#3}}
+\def\XC at cnv@Hsb@#1,#2;#3,#4;%
+ {\ifdim\dimen@<#4\p@
+    \@tempdima#3\p@ \advance\@tempdima-#1\p@
+    \@tempdimb#4\p@ \advance\@tempdimb-#2\p@
+    \rdivide\@tempdima\@tempdimb
+    \advance\dimen at -#2\p@ \rmultiply\dimen@{\strip at pt\@tempdima}%
+    \advance\dimen@#1\p@ \expandafter\remove at to@nnil
+  \else
+    \def\@@tmp{\XC at cnv@Hsb@#3,#4;}\expandafter\@@tmp
+  \fi}
+\def\XC at cnv@tHsb#1,#2,#3,%
+ {\XC at cnv@@Hsb#1,#2,#3,\XC at cnv@tHsb@
+  \ifx\tm\XC at mod@Hsb\else\expandafter\XC at cnv@Hsb\@@tmp,\fi}
+\def\XC at cnv@tHsb@#1,#2;#3,#4;%
+ {\ifdim\dimen@<#3\p@
+    \@tempdima#4\p@ \advance\@tempdima-#2\p@
+    \@tempdimb#3\p@ \advance\@tempdimb-#1\p@
+    \rdivide\@tempdima\@tempdimb
+    \advance\dimen at -#1\p@ \rmultiply\dimen@{\strip at pt\@tempdima}%
+    \advance\dimen@#2\p@ \expandafter\remove at to@nnil
+  \else
+    \def\@@tmp{\XC at cnv@tHsb@#3,#4;}\expandafter\@@tmp
+  \fi}
+\def\XC at cnv@HSB#1,#2,#3,%
+ {\edef\@@scl{\rangeHSB}\XC at calc@#1,#2,#3,,:D\XC at cnv@hsb@}
+\def\XC at cnv@Gray#1,%
+ {\XC at c@lcD\rangeGray{}{#1}\@@tmp \XC at cnv@gray\@@tmp,}
+\def\XC at cnv@wave#1,%
+ {\XC at cnv@wave at hsb#1,\XC at cnv@hsb@}
+\def\XC at cnv@wave at hsb#1,%
+ {\@tempdima#1\p@
+  \ifdim\@tempdima<440\p@
+    \XC at c@v at wave@hsb{-.0166667}{7.33333}4{}\else
+  \ifdim\@tempdima<490\p@
+    \XC at c@v at wave@hsb{.02}{-8.8}4-\else
+  \ifdim\@tempdima<510\p@
+    \XC at c@v at wave@hsb{-.05}{25.5}2{}\else
+  \ifdim\@tempdima<580\p@
+    \XC at c@v at wave@hsb{.0142857}{-7.28571}2-\else
+  \ifdim\@tempdima<645\p@
+    \XC at c@v at wave@hsb{-.0153846}{9.92308}0{}\else
+  \dimen@\z@ \fi\fi\fi\fi\fi
+  \divide\dimen at 6\relax
+  \edef\@@tmp{\strip at pt\dimen@,1,}%
+  \ifdim\@tempdima<420\p@
+    \XC at c@v at wave@hsb{.0175}{-6.35}0{}\else
+  \ifdim\@tempdima>700\p@
+    \XC at c@v at wave@hsb{-.00875}{7.125}0{}\else
+  \dimen@\p@ \fi\fi
+  \edef\@@tmp{\@@tmp\strip at pt\dimen@}}
+\def\XC at c@v at wave@hsb#1#2#3#4%
+ {\dimen@#1\@tempdima \advance\dimen@#2\p@
+  \XC at calcR{\strip at pt\dimen@}\@tempa
+  \dimen@#4\@tempa\p@ \advance\dimen@#3\p@}
+\def\XC at cnv@cmyk at compl#1,#2,#3,#4,%
+ {\XC at cnv@cmyk at cmy#1,#2,#3,#4,%
+  \expandafter\XC at calc@\@@tmp,,:C\expandafter\XC at cnv@cmy at cmyk\@@tmp,}
+\def\XC at cnv@hsb at compl#1,#2,#3,%
+ {\lshiftset\dimen@{#1}\advance\dimen@\ifdim\dimen@<5\p at -\fi-5\p@
+  \rshift\dimen@ \edef\@@tmp{\strip at pt\dimen@}%
+  \lshiftset\dimen@{#3}\@tempdima#2\dimen@
+  \@tempdimb\@tempdima \advance\@tempdimb10\p@ \advance\@tempdimb-\dimen@
+  \ifdim\@tempdimb=\z@
+    \edef\@@tmp{\@@tmp,0,0}%
+  \else
+    \rdivide\@tempdima\@tempdimb \rshift\@tempdimb
+    \edef\@@tmp{\@@tmp,\strip at pt\@tempdima,\strip at pt\@tempdimb}%
+  \fi}
+\def\substitutecolormodel#1#2%
+ {\XC at sdef\XC@@tmp{\expandafter\XC at substitutecolormodel#2/ignore/\@nnil}%
+  \ifx\XC@@tmp\XC at mod@ignore
+    \XC at let@cN{color@#1}\color at ignore
+  \else
+    \expandafter\edef\csname color@#1\endcsname##1##2%
+     {\noexpand\convertcolorspec
+      \expandafter\noexpand\csname XC at mod@#1\endcsname{##2}%
+      \expandafter\noexpand\csname XC at mod@\XC@@tmp\endcsname
+      \noexpand\XC@@tmp\noexpand\expandafter
+      \expandafter\noexpand\csname color@\XC@@tmp\endcsname
+      \noexpand\expandafter##1\noexpand\expandafter{\noexpand\XC@@tmp}}%
+  \fi
+  \expandafter\xglobalize@\csname color@#1\endcsname \xglobal at stop
+  \PackageInfo{xcolor}{Model `#1' substituted by `\XC@@tmp'}}
+\def\XC at substitutecolormodel#1/%
+ {\@ifundefinedmodel{#1}{\XC at substitutecolormodel}{#1\remove at to@nnil}}
+\def\color at ignore#1#2{\def#1{}}
+\@ifundefinedmodel{rgb}%
+ {\substitutecolormodel{rgb}{RGB/HTML/hsb/Hsb/HSB/cmy/cmyk/gray/Gray}}{}
+\@ifundefinedmodel{cmyk}{\substitutecolormodel{cmyk}{cmy/rgb}}{}
+\@ifundefinedmodel{cmy}%
+ {\PackageInfo{xcolor}{Model `cmy' substituted by `cmy0'}
+  \def\color at cmy#1#2{\color at cmyk#1{#2,0}}}{}
+\@ifundefinedmodel{hsb}{\@tempswatrue}%
+ {\XC at ifcase\XC@@drv{{dvipdfm,textures}\@tempswatrue}\@tempswafalse}
+\if at tempswa
+  \substitutecolormodel{hsb}{Hsb/HSB/rgb}
+\fi
+\@ifundefinedmodel{RGB}%
+ {\substitutecolormodel{RGB}{HTML/rgb}}
+ {\PackageInfo{xcolor}{Model `RGB' extended}
+  \let\XC at color@RGB\color at RGB
+  \def\color at RGB#1#2%
+   {\relax\ifnum\rangeRGB=255
+      \XC at color@RGB#1{#2}%
+    \else
+      \convertcolorspec\XC at mod@RGB{#2}\XC at mod@rgb\XC@@tmp
+      \expandafter\color at rgb\expandafter#1\expandafter{\XC@@tmp}%
+    \fi}}
+\@ifundefinedmodel{gray}{\substitutecolormodel{gray}{Gray/rgb}}{}
+\@ifundefinedmodel{HTML}{\substitutecolormodel{HTML}{rgb}}{}
+\@ifundefinedmodel{Hsb}{\substitutecolormodel{Hsb}{hsb}}{}
+\@ifundefinedmodel{tHsb}{\substitutecolormodel{tHsb}{hsb}}{}
+\@ifundefinedmodel{HSB}{\substitutecolormodel{HSB}{hsb}}{}
+\@ifundefinedmodel{Gray}{\substitutecolormodel{Gray}{gray}}{}
+\@ifundefinedmodel{wave}{\substitutecolormodel{wave}{hsb}}{}
+\def\XC at getcolor#1#2%
+ {\begingroup\toks@{#1}\XC at getc@lor#1\XC@@\aftergroupdef#2{\@@tmp}}
+\def\XC at getc@lor#1#2\XC@@
+ {\@ifxempty{#2}%
+   {\expandafter\XC at getc@l at r#1\XC@@}%
+   {\let\set at color\relax
+    \ifx#1[%
+      \expandafter\@undeclaredcolor\the\toks@\else
+      \expandafter\@declaredcolor\expandafter{\the\toks@}\fi
+    \let\@@tmp\XC at current@color}}
+\def\XC at getc@l at r#1#2\XC@@
+ {\ifx#1\xcolor@
+    \def\@@tmp{\xcolor@#2}%
+  \else
+    \let\set at color\relax
+    \expandafter\@declaredcolor\expandafter{\the\toks@}%
+    \let\@@tmp\XC at current@color
+  \fi}
+\def\XC at usecolor#1{\expandafter\XC at usec@lor#1\XC@@}
+\def\XC at usec@lor#1#2\XC@@
+ {\ifx#1\xcolor@
+    \expandafter\expandafter\expandafter\c at lor@to at ps#1#2\@@
+  \else
+    \expandafter\expandafter\expandafter\expandafter\expandafter\expandafter
+    \expandafter\c at lor@to at ps\csname\@backslashchar color@#1#2\endcsname\@@
+  \fi
+  \space}
+\let\XC at c@lor at to@ps\XC at usecolor
+\let\pst at getcolor\XC at getcolor
+\let\pst at usecolor\XC at usecolor
+\def\c at lor@special#1#2{\edef\@tempa{\write#1{#2}}\@tempa}
+\protected\def\normalcolor{\let\current at color\default at color\set at color}
+\AtBeginDocument{\let\default at color\current at color}
+\XC at ifcase\XC@@drv
+ {{dvipdf,dvipdfm,dvipdfmx,dvips,pctex32}%
+  {\def\c at lor@@named#1,#2,#3\@@#4%
+    {\edef#4{\expandafter\expandafter\expandafter\@thirdoffive
+             \csname\@backslashchar color@#1\endcsname}}
+   \def\define at color@named#1#2%
+    {\@namedef{\@backslashchar color@#1}{{}{}{ \colornameprefix#1}{}{}}}}%
+  {dvipsone,luatex,pctexps,pdftex,tcidvi,truetex,vtex,xetex}%
+  {\def\c at lor@@named#1,#2,#3\@@#4%
+    {\edef#4{\expandafter\expandafter\expandafter\@thirdoffive
+             \csname\@backslashchar color@#1\endcsname}}
+   \def\define at color@named#1#2%
+    {\let\@@cls\@empty\@namedef{\@backslashchar color@#1}{{}{}{#2}{}{}}}}%
+  {textures}%
+  {\def\c at lor@@named#1,#2,#3\@@#4%
+    {\edef\@tempa{\color at P@custom{#1}{\if!#2!1\else#2\fi}}%
+     \expandafter\def\expandafter#4\@tempa}
+   \def\define at color@named#1#2%
+    {\edef\@tempa{{#1}{#2}}\expandafter\AddCustomColor\@tempa}
+   \def\c at lor@ps@#1 #2\@@
+    {\expandafter\expandafter\expandafter\expandafter\expandafter
+     \expandafter\expandafter\c at lor@to at ps@
+     \csname\@backslashchar color@#1\expandafter\endcsname\space
+     #2. \@@{#1}}}%
+ }{}
+\definecolorset{rgb/hsb/cmyk/gray}{}{}%
+ {red,1,0,0/0,1,1/0,1,1,0/.3;%
+  green,0,1,0/.33333,1,1/1,0,1,0/.59;%
+  blue,0,0,1/.66667,1,1/1,1,0,0/.11;%
+  brown,.75,.5,.25/.083333,.66667,.75/0,.25,.5,.25/.5475;%
+  lime,.75,1,0/.20833,1,1/.25,0,1,0/.815;%
+  orange,1,.5,0/.083333,1,1/0,.5,1,0/.595;%
+  pink,1,.75,.75/0,.25,1/0,.25,.25,0/.825;%
+  purple,.75,0,.25/.94444,1,.75/0,.75,.5,.25/.2525;%
+  teal,0,.5,.5/.5,1,.5/.5,0,0,.5/.35;%
+  violet,.5,0,.5/.83333,1,.5/0,.5,0,.5/.205}%
+\definecolorset{cmyk/rgb/hsb/gray}{}{}%
+ {cyan,1,0,0,0/0,1,1/.5,1,1/.7;%
+  magenta,0,1,0,0/1,0,1/.83333,1,1/.41;%
+  yellow,0,0,1,0/1,1,0/.16667,1,1/.89;%
+  olive,0,0,1,.5/.5,.5,0/.16667,1,.5/.39}
+\definecolorset{gray/rgb/hsb/cmyk}{}{}%
+ {black,0/0,0,0/0,0,0/0,0,0,1;%
+  darkgray,.25/.25,.25,.25/0,0,.25/0,0,0,.75;%
+  gray,.5/.5,.5,.5/0,0,.5/0,0,0,.5;%
+  lightgray,.75/.75,.75,.75/0,0,.75/0,0,0,.25;%
+  white,1/1,1,1/0,0,1/0,0,0,0}
+\XC@@names
+\AtBeginDocument{\let\XC@@stack\@empty}
+\let\colornameprefix\XC@@nameprefix
+\XC at catcodes
+\csname xcolorcmd\endcsname
+\color{black}
+\endinput
+%%
+%% End of file `xcolor.sty'.


Property changes on: trunk/Master/texmf-dist/tex/latex/xcolor/xcolor-2022-06-12.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/latex/xcolor/xcolor.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/xcolor/xcolor.sty	2023-11-13 20:34:52 UTC (rev 68830)
+++ trunk/Master/texmf-dist/tex/latex/xcolor/xcolor.sty	2023-11-13 20:35:10 UTC (rev 68831)
@@ -22,11 +22,11 @@
 %% in the same archive or directory.)
 %%
 \ProvidesPackage{xcolor}
- [2022/06/12 v2.14 LaTeX color extensions (UK)]
+ [2023/11/11 v3.00 LaTeX color extensions (UK)]
 %%
 %% ----------------------------------------------------------------
 %% Copyright (C) 2003-2021 by Dr. Uwe Kern <xcolor at ukern dot de>
-%%               2021-2022    LaTeX Project https://github.com/latex3/xcolor/issues
+%%               2021-2023    LaTeX Project https://github.com/latex3/xcolor/issues
 %% ----------------------------------------------------------------
 %%
 %% Please send error reports and suggestions for
@@ -39,7 +39,16 @@
 %%
 %% which is part of the Standard LaTeX `Graphics Bundle'.
 %%
+
+\providecommand\DeclareRelease[3]{}
+\providecommand\DeclareCurrentRelease[2]{}
+\DeclareRelease{v2}{0000-00-00}{xcolor-2022-06-12.sty}
+\DeclareCurrentRelease{}{2023-11-11}
 \NeedsTeXFormat{LaTeX2e}
+\providecommand\IfFormatAtLeastTF{\@ifl at t@r\fmtversion}
+\IfFormatAtLeastTF{2022/06/01}{}
+ {\RequirePackageWithOptions{xcolor-2022-06-12}}
+\IfFormatAtLeastTF{2022/06/01}{}{\endinput}
 \expandafter\edef\csname XC at catcodes\endcsname
  {\catcode33 \the\catcode33 % !
   \catcode34 \the\catcode34 % "
@@ -125,14 +134,6 @@
    {\@expandtwoargs\in@{,#1,}{,##1,}\ifin@
       \toks@{##2}\expandafter\remove at to@nnil\else\expandafter\XC at if@\fi}%
   \XC at if@#2{#1}{#3}\@nnil\the\toks@}
-\def\XC@@opt{,}
-\def\@ifXCopt#1%
- {\@expandtwoargs\in@{,#1,}{\XC@@opt}%
-  \ifin@\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
-\let\XC@@pkg\relax
-\let\XC at declareoption\@declareoption
-\long\def\@declareoption#1#2%
- {\XC at declareoption{#1}{\edef\XC@@opt{\XC@@opt#1,}#2}}
 \def\selectcolormodel#1%
  {\@ifundefined{XC at mod@#1}%
    {\c at lor@error{target model `#1'}}%
@@ -148,26 +149,47 @@
 \@tfor\@@tmp:={natural}{rgb}{cmy}{cmyk}{hsb}{gray}{RGB}{HTML}{HSB}{Gray}\do
  {\expandafter\XC at sdef\csname XC at mod@\@@tmp\endcsname{\@@tmp}%
   \edef\@@tmp
-   {\noexpand\DeclareOption{\@@tmp}{\noexpand\selectcolormodel{\@@tmp}}}%
+   {\noexpand\DeclareKeys{\@@tmp .code= {\noexpand\selectcolormodel{\@@tmp}}}}%
   \@@tmp}
-\DeclareOption{monochrome}
- {\ExecuteOptions{hideerrors}%
-  \AtEndOfPackage
-   {\colors at false
-    \def\set at color{\c at lor@special\m at ne
-      {color push \current at color}\aftergroup\reset at color}%
-    \def\reset at color{\c at lor@special\m at ne{color pop}}%
-    \def\set at page@color{\c at lor@special\m at ne{background \current at color}}}}
+\DeclareKeys
+ {
+    monochrome .code =
+    {
+      \colorerrors at false
+      \AtEndOfPackage
+       {\colors at false
+        \def\set at color{\c at lor@special\m at ne
+          {color push \current at color}\aftergroup\reset at color}%
+        \def\reset at color{\c at lor@special\m at ne{color pop}}%
+        \def\set at page@color{\c at lor@special\m at ne{background \current at color}}}
+    }
+   ,monochrome .usage = load
+ }
 \let\XC@@names\relax
 \providecommand*\colornameprefix{XC@}
 \let\XC@@nameprefix\colornameprefix
 \def\XC at declarenames#1#2#3%
- {\DeclareOption{#1}{\XC at append\XC@@names
-   {#3\definecolorstrue\input{#2.def}\definecolorstrue
-    \let\colornameprefix\XC@@nameprefix}}
-  \DeclareOption{#1*}{\XC at append\XC@@names
-   {#3\definecolorsfalse\input{#2.def}\definecolorstrue
-    \let\colornameprefix\XC@@nameprefix}}}
+ {%
+  \DeclareKeys
+   {
+    #1  .code =
+       {
+        \AddToHook{package/xcolor/after}
+          {#3\definecolorstrue\input{#2.def}\definecolorstrue
+           \let\colornameprefix\XC@@nameprefix}%
+        \DeclareKeys[xcolor]{#1 .code = {},#1* .code={}}
+       }
+   ,#1  .usage = preamble
+   ,#1* .code =
+       {
+         \AddToHook{package/xcolor/after}
+           {#3\definecolorsfalse\input{#2.def}\definecolorstrue
+            \let\colornameprefix\XC@@nameprefix}
+         \DeclareKeys[xcolor]{#1 .code = {},#1* .code={}}
+       }
+   ,#1* .usage = preamble
+   }%
+ }
 \XC at declarenames{dvipsnames}{dvipsnam}{\let\colornameprefix\@empty}
 \XC at declarenames{svgnames}{svgnam}{}
 \XC at declarenames{x11names}{x11nam}{}
@@ -175,47 +197,62 @@
  {hks\ifcase\paperquality k\or n\or k\or z\else n\fi nam}{}
 \XC at declarenames{pmsnames}{pmsnam}{}
 \XC at declarenames{ralnames}{ralnam}{}
-\DeclareOption{table}{\XC at append\XC@@pkg{\RequirePackage{colortbl}}}
-\DeclareOption{fixpdftex}{\XC at append\XC@@pkg{\RequirePackage{pdfcolmk}}}
-\DeclareOption{hyperref}
- {\@tfor\@@tmp:={cite}{file}{link}{menu}{page}{run}{url}\do
-   {\expandafter\edef\csname KV at Hyp@x\@@tmp bordercolor\endcsname #1%
-     {\noexpand\XC at bordercolor{\@@tmp}{#1}}}%
-  \AtEndOfPackage
-   {\GetGinDriver\def\KV at Hyp@xpdfborder#1{\edef\@pdfborder{#1}}%
-    \@tfor\@@tmp:={dvips}\do
-     {\ifx\GinDriver\@@tmp
-       \def\KV at Hyp@xpdfborder#1%
-        {\edef\@pdfborder{#1}\expandafter\XC at pdfborder\@pdfborder\relax}%
-      \@break at tfor\fi}}}
+\DeclareKeys
+ {
+    table .code  ={\AddToHook{package/xcolor/after}{\RequirePackage{colortbl}}}
+   ,table .usage = preamble
+   ,hyperref  .code = {}
+   ,fixpdftex .code = {}
+ }
 \providecommand*\Gin at driver{}
 \@tfor\@@tmp:={dvipdf}{dvipdfmx}{dvips}{dvipsone}{dviwin}%
               {emtex}{luatex}{pctex32}{pctexhp}{pctexps}{pctexwin}{pdftex}%
               {tcidvi}{textures}{truetex}{vtex}{xetex}{dvisvgm}\do
- {\edef\@@tmp{\noexpand\DeclareOption{\@@tmp}%
-    {\def\noexpand\Gin at driver{\@@tmp.def}}}%
+ {\edef\@@tmp{%
+   \noexpand\DeclareKeys
+     {
+      \@@tmp .code = {\def\noexpand\Gin at driver{\@@tmp.def}},
+      \@@tmp .usage=load
+     }}%
   \@@tmp}
-\DeclareOption{dviwindo}{\ExecuteOptions{dvipsone}}
-\DeclareOption{oztex}{\ExecuteOptions{dvips}}
-\DeclareOption{xdvi}{\ExecuteOptions{dvips,monochrome}}
-\DeclareOption{dvipdfm}{\ExecuteOptions{dvipdfmx}}
-\DeclareOption{xcdraw}{\def\XC@@xcd@{1}}
-\DeclareOption{noxcdraw}{\def\XC@@xcd@{-1}}
-\DeclareOption{fixinclude}{\def\XC@@xcf@{1}}
-\DeclareOption{prologue}{\def\XC@@xcp@{1}}
-\DeclareOption{kernelfbox}{\XC@@fboxfalse}
-\DeclareOption{showerrors}{\colorerrors at true}
-\DeclareOption{hideerrors}{\colorerrors at false}
-\DeclareOption{debugshow}{\catcode`\^^A=9 \let\GDebug\typeout}
-\DeclareOption*%
- {\PackageInfo{xcolor}{Package option `\CurrentOption' ignored}}
+\DeclareKeys
+ {
+  ,dviwindo .code   = {\SetKeys{dvipsone}}
+  ,dviwindo .usage  = load
+  ,oztex    .code   = {\SetKeys{dvips}}
+  ,oztex    .usage  = load
+  ,xdvi     .code   = {\SetKeys{dvips,monochrome}}
+  ,xdvi     .usage  = load
+  ,dvipdfm  .code   = {\SetKeys{dvipdfmx}}
+  ,dvipdfm  .usage  = load
+ }
+\DeclareKeys
+ {
+   ,xcdraw   .code    = {\def\XC@@xcd@{1}}
+   ,xcdraw   .usage   = load %TODO check
+   ,noxcdraw .code    = {\def\XC@@xcd@{-1}}
+   ,noxcdraw .usage   = load %TODO check
+   ,fixinclude .code  = {\def\XC@@xcf@{1}}
+   ,fixinclude .usage = load %TODO check
+   ,prologue .code    = {\def\XC@@xcp@{1}}
+   ,prologue .usage   = load %TODO check
+   ,kernelfbox .code    = {\XC@@fboxfalse}
+   ,kernelfbox .usage   = load %TODO check
+   ,showerrors .code   = {\colorerrors at true}
+   ,hideerrors .code   = {\colorerrors at false}
+   ,debugshow .code    = {\catcode`\^^A=9 \let\GDebug\typeout}
+  }
 \def\XC@@xcd@{-1}
 \def\XC@@xcf@{-1}
 \def\XC@@xcp@{-1}
-\ExecuteOptions{natural,showerrors}
+\SetKeys{natural,showerrors}
+\let\XC at ExecuteOptions\ExecuteOptions
+\ExplSyntaxOn
+\def\ExecuteOptions{\keys_set_known:nn {xcolor}}
+\ExplSyntaxOff
 \InputIfFileExists{color.cfg}{}{}
-\let\@declareoption\XC at declareoption
-\ProcessOptions\relax
+\let\ExecuteOptions\XC at ExecuteOptions
+\ProcessKeyOptions
 \edef\Gin at driver{\Gin at driver}
 \if!\Gin at driver!
   \PackageError{xcolor}
@@ -266,7 +303,6 @@
   \fi
 \fi
 \@namedef{ver at color.sty}{1999/02/16}
-\XC@@pkg
 \long\def\@secondoffive#1#2#3#4#5{#2}
 \long\def\@thirdoffive#1#2#3#4#5{#3}
 \def\xglobal{\xglobal at stop\begingroup\futurelet\@@tok\xglobal at test}
@@ -474,7 +510,8 @@
 \def\XC at definecolor[#1]#2%
  {\@testopt{\XC at definec@lor[#1]{#2}}\colornameprefix}
 \def\XC at definec@lor[#1]#2[#3]#4#5%
- {\begingroup
+ {%
+  \begingroup
   \XC at sdef\@@cls{#1}\XC at edef\@@nam{#2}\edef\colornameprefix{#3}%
   \XC at logdef\@@nam
   \XC at getmodclr02{#4}{#5}{\let\@@tmp\relax}%
@@ -977,57 +1014,6 @@
 \def\XC at pdfborder#1 #2 #3\relax
  {\def\@@scl{80}\XC at calc@#1,#2,#3,,:S%
   \edef\@pdfborder{\expandafter\XC at strip@comma\@@tmp,,\@nnil}}
-\@ifXCopt{table}{%
- \def\rowcolors
-  {\@ifstar{\@rowcmdfalse\rowc at lors}{\@rowcmdtrue\rowc at lors}}
- \def\rowc at lors{\@testopt{\rowc at l@rs}{}}
- \def\rowc at l@rs[#1]#2#3#4%
-  {\global\rownum=\z@
-   \global\@rowcolorstrue
-   \@ifxempty{#3}%
-     {\def\@oddrowcolor{\@norowcolor}}%
-     {\def\@oddrowcolor{\gdef\CT at row@color{\CT at color{#3}}}}%
-   \@ifxempty{#4}%
-     {\def\@evenrowcolor{\@norowcolor}}%
-     {\def\@evenrowcolor{\gdef\CT at row@color{\CT at color{#4}}}}%
-   \if at rowcmd
-     \def\@rowcolors
-      {#1\if at rowcolors
-         \noalign{\relax\ifnum\rownum<#2\@norowcolor\else
-                  \ifodd\rownum\@oddrowcolor\else\@evenrowcolor\fi\fi}%
-       \fi}%
-   \else
-     \def\@rowcolors
-      {\if at rowcolors
-         \ifnum\rownum<#2\noalign{\@norowcolor}\else
-         #1\noalign{\ifodd\rownum\@oddrowcolor\else\@evenrowcolor\fi}\fi
-       \fi}%
-   \fi
-   \CT at everycr{\@rowc at lors\the\everycr}%
-   \ignorespaces}
- \def\@rowc at lors{\noalign{\global\advance\rownum\@ne}\@rowcolors}
- \let\@rowcolors\@empty
- \def\showrowcolors{\noalign{\global\@rowcolorstrue}\@rowcolors}
- \def\hiderowcolors{\noalign{\global\@rowcolorsfalse\@norowcolor}}
- \def\@norowcolor{\global\let\CT at row@color\relax}
- \@norowcolor
- \newif\if at rowcolors
- \newif\if at rowcmd
- \@ifundefined{rownum}{\newcount\rownum}{}
- \def\CT at extract#1\columncolor#2#3\@nil
-  {\if!#2%
-     \let\CT at column@color\@empty
-   \else
-     \if[#2%
-       \expandafter\CT at extractb
-     \else
-       \XC at edef\XC@@tmp{#2}%
-       \edef\CT at column@color{\noexpand\CT at color{\XC@@tmp}}%
-       \expandafter\CT at extractd
-     \fi
-     {#1}#3\@nil
-   \fi}
-}{}
 \def\extractcolorspec#1#2%
  {\XC at split{#1}\edef\@@tmp{{\@@mod}{\@@clr}}\aftergroupdef#2\@@tmp}
 \def\extractcolorspecs#1#2#3%
@@ -1232,6 +1218,7 @@
 \def\XC at cnv@gray#1,%
  {\XC at ifxcase\tm
    {\XC at mod@rgb {\XC at calcN{#1}\@@tmp \edef\@@tmp{\@@tmp,\@@tmp,\@@tmp}}%
+    \XC at mod@gray{}%
     \XC at mod@cmy {\XC at calcC{#1}\@@tmp \edef\@@tmp{\@@tmp,\@@tmp,\@@tmp}}%
     \XC at mod@cmyk{\XC at calcC{#1}\@@tmp \edef\@@tmp{0,0,0,\@@tmp}}%
     \XC at mod@RGB {\edef\@@scl{\rangeRGB}\XC at calcM{#1}\@@tmp
@@ -1405,7 +1392,10 @@
 \let\pst at getcolor\XC at getcolor
 \let\pst at usecolor\XC at usecolor
 \def\c at lor@special#1#2{\edef\@tempa{\write#1{#2}}\@tempa}
-\protected\def\normalcolor{\let\current at color\default at color\set at color}
+\protected\def\normalcolor{%
+  \let\current at color\default at color
+  \let\XC at current@color\XC at default@color\XC at display}
+\AtBeginDocument{\let\XC at default@color\XC at current@color}
 \AtBeginDocument{\let\default at color\current at color}
 \XC at ifcase\XC@@drv
  {{dvipdf,dvipdfm,dvipdfmx,dvips,pctex32}%



More information about the tex-live-commits mailing list.