[latex3-commits] [git/LaTeX3-latex3-latex3] color-multi-model: Merge branch 'master' into color-multi-model (8dc539a95)
Joseph Wright
joseph.wright at morningstar2.co.uk
Mon Jun 15 11:16:34 CEST 2020
Repository : https://github.com/latex3/latex3
On branch : color-multi-model
Link : https://github.com/latex3/latex3/commit/8dc539a95f5eec857a49d0604babd736dfa8d641
>---------------------------------------------------------------
commit 8dc539a95f5eec857a49d0604babd736dfa8d641
Merge: 75c3fa1a2 311080927
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Mon Jun 15 10:16:34 2020 +0100
Merge branch 'master' into color-multi-model
>---------------------------------------------------------------
8dc539a95f5eec857a49d0604babd736dfa8d641
l3experimental/l3color/l3color.dtx | 31 +++++++++++++++++++++++++------
1 file changed, 25 insertions(+), 6 deletions(-)
diff --cc l3experimental/l3color/l3color.dtx
index 2770bb596,8c45bb95c..c58f09f25
--- a/l3experimental/l3color/l3color.dtx
+++ b/l3experimental/l3color/l3color.dtx
@@@ -237,31 -237,25 +237,50 @@@
% and similar are not influenced by this setting.
% \end{variable}
%
+% \section{Multiple color models}
+%
+% When selecting or setting a color with an explicit model, it is possible
+% to give values for more than one model at one time. This is particularly
+% useful where automated conversion between models does not give the desired
+% outcome. To do this, the list of models and list of values are both subdivided
+% using |/| characters (as for the similar function in \pkg{xcolor}). For
+% example, to save a color with explicit |cmyk| and |rgb| values, one could
+% use
+% \begin{verbatim}
+% \color_set:nnn { foo } { cmyk / rgb }
+% { 0.1 , 0.2 , 0.3 , 0.4 / 0.1, 0.2 , 0.3 }
+% \end{verbatim}
+% The manually-specified conversion will be used in preference to automated
+% calculation whenever the model(s) listed are used: both in expressions and
+% when a fixed model is active.
+%
+% Similarly, the same syntax can be applied to directly selecting a color.
+% \begin{verbatim}
+% \color_select:nn { cmyk / rgb }
+% { 0.1 , 0.2 , 0.3 , 0.4 / 0.1, 0.2 , 0.3 }
+% \end{verbatim}
+% Again, this list is used when a fixed model is active: the first entry is used
+% unless there is a fixed model matching one of the other entries.
+%
+ % \section{Core color representation}
+ %
+ % To allow data to be handled internally, \pkg{l3color} uses a simple
+ % representation of color, comprising two \meta{balanced text} entries, the first
+ % the \meta{model} and the second the \meta{values} given
+ % \emph{separated by spaces}.
+ %
+ % This core representation is produced when parsing color expressions.
+ %
+ % \begin{function}{\color_parse:nN}
+ % \begin{syntax}
+ % \cs{color_parse:nN} \Arg{color expression} \Arg{tl}
+ % \end{syntax}
+ % Parses the \meta{color expression} as described above, and sets the
+ % \meta{tl} to the equivalent \meta{core color representation}
+ % (used at the backend level and based on \texttt{dvips} color
+ % representation).
+ % \end{function}
+ %
% \section{Spot colors}
% \label{l3color:sec:spot}
%
More information about the latex3-commits
mailing list.