summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/l3experimental/l3color.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/l3experimental/l3color.dtx')
-rw-r--r--macros/latex/contrib/l3experimental/l3color.dtx105
1 files changed, 53 insertions, 52 deletions
diff --git a/macros/latex/contrib/l3experimental/l3color.dtx b/macros/latex/contrib/l3experimental/l3color.dtx
index ec8266d06f..f644bf5fde 100644
--- a/macros/latex/contrib/l3experimental/l3color.dtx
+++ b/macros/latex/contrib/l3experimental/l3color.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-01}
+% \date{Released 2020-09-11}
%
% \maketitle
%
@@ -350,9 +350,10 @@
% example those involving separations (see
% \url{https://helpx.adobe.com/indesign/using/spot-process-colors.html}
% for details of the use of separations in print). Color models may be split
-% into families; in the case of the basic \texttt{cmyk}, \texttt{gray}
-% and \texttt{rgb} models, the family and the model itself are synonymous. This
-% is not generally the case: see the PDF reference for more details.
+% into families; for the standard device-based color models (\texttt{DeviceCMYK},
+% \texttt{DeviceRGB}, \texttt{DeviceGray}), these are synonymous. This
+% is not generally the case: see the PDF reference for more details. (Note that
+% \pkg{l3color} uses the shorter names \texttt{cmyk}, etc.)
%
% \begin{function}{\color_model_new:nnn}
% \begin{syntax}
@@ -375,7 +376,7 @@
% name of a spot color ink. Such a \meta{name} may contain spaces, etc.,
% which are not permitted in the \meta{model}.
% \item \texttt{alternative-model} An alternative device colorspace, one of
-% \texttt{cmyk}, \texttt{rgb}, \texttt{gray} or \texttt{cielab}. The three
+% \texttt{cmyk}, \texttt{rgb}, \texttt{gray} or \texttt{CIELAB}. The three
% parameter-based models work as described above; see below for
% details of CIELAB colors.
% \item \texttt{alternative-values} A comma-separated list of values
@@ -384,7 +385,7 @@
% \end{itemize}
%
% CIELAB color separations are created using the
-% \texttt{alternative-model = cielab} setting. These colors must also have an
+% \texttt{alternative-model = CIELAB} setting. These colors must also have an
% \texttt{illuminant} key, one of \texttt{a}, \texttt{c}, \texttt{e},
% \texttt{d50}, \texttt{d55}, \texttt{d65} or \texttt{d75}. The
% \texttt{alternative-values} in this case are the three parameters $L*$, $a*$
@@ -412,7 +413,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplPackage{l3color}{2020-09-01}{}
+\ProvidesExplPackage{l3color}{2020-09-11}{}
{L3 Experimental color support}
% \end{macrocode}
%
@@ -1525,47 +1526,34 @@
%
% \begin{variable}
% {
-% \c_@@_model_whitepoint_cielab_a_tl ,
-% \c_@@_model_whitepoint_cielab_b_tl ,
-% \c_@@_model_whitepoint_cielab_e_tl ,
-% \c_@@_model_whitepoint_cielab_d50_tl ,
-% \c_@@_model_whitepoint_cielab_d55_tl ,
-% \c_@@_model_whitepoint_cielab_d65_tl ,
-% \c_@@_model_whitepoint_cielab_d75_tl
+% \c_@@_model_whitepoint_CIELAB_a_tl ,
+% \c_@@_model_whitepoint_CIELAB_b_tl ,
+% \c_@@_model_whitepoint_CIELAB_e_tl ,
+% \c_@@_model_whitepoint_CIELAB_d50_tl ,
+% \c_@@_model_whitepoint_CIELAB_d55_tl ,
+% \c_@@_model_whitepoint_CIELAB_d65_tl ,
+% \c_@@_model_whitepoint_CIELAB_d75_tl
% }
% Whitepoint data for the CIELAB profiles.
% \begin{macrocode}
-\tl_const:Nn \c_@@_model_whitepoint_cielab_a_tl { 1.0985 ~ 1 ~ 0.3558 }
-\tl_const:Nn \c_@@_model_whitepoint_cielab_b_tl { 0.9807~ 1 ~ 1.1822 }
-\tl_const:Nn \c_@@_model_whitepoint_cielab_e_tl { 1 ~ 1 ~ 1 }
-\tl_const:cn { c_@@_model_whitepoint_cielab_d50_tl } { 0.9642 ~, 1 ~ 0.8251 }
-\tl_const:cn { c_@@_model_whitepoint_cielab_d55_tl } { 0.9568 ~ 1 ~ 0.9214 }
-\tl_const:cn { c_@@_model_whitepoint_cielab_d65_tl } { 0.9504 ~ 1 ~ 1.0888 }
-\tl_const:cn { c_@@_model_whitepoint_cielab_d75_tl } { 0.9497 ~ 1 ~ 1.2261 }
+\tl_const:Nn \c_@@_model_whitepoint_CIELAB_a_tl { 1.0985 ~ 1 ~ 0.3558 }
+\tl_const:Nn \c_@@_model_whitepoint_CIELAB_b_tl { 0.9807 ~ 1 ~ 1.1822 }
+\tl_const:Nn \c_@@_model_whitepoint_CIELAB_e_tl { 1 ~ 1 ~ 1 }
+\tl_const:cn { c_@@_model_whitepoint_CIELAB_d50_tl } { 0.9642 ~ 1 ~ 0.8251 }
+\tl_const:cn { c_@@_model_whitepoint_CIELAB_d55_tl } { 0.9568 ~ 1 ~ 0.9214 }
+\tl_const:cn { c_@@_model_whitepoint_CIELAB_d65_tl } { 0.9504 ~ 1 ~ 1.0888 }
+\tl_const:cn { c_@@_model_whitepoint_CIELAB_d75_tl } { 0.9497 ~ 1 ~ 1.2261 }
% \end{macrocode}
% \end{variable}
%
-% \begin{variable}{\c_@@_model_range_cielab_tl}
+% \begin{variable}{\c_@@_model_range_CIELAB_tl}
% The range for CIELAB color spaces.
% \begin{macrocode}
-\tl_const:Nn \c_@@_model_range_cielab_tl { -128 ~ 127 ~ -128 ~ 127 }
+\tl_const:Nn \c_@@_model_range_CIELAB_tl { 0 ~ 100 ~ -128 ~ 127 ~ -128 ~ 127 }
% \end{macrocode}
% \end{variable}
%
% \begin{macro}{\color_model_new:nnn, \@@_model_new:nnn}
-% \begin{macro}{\@@_model_separation:n}
-% \begin{macro}{\@@_model_separation:nn}
-% \begin{macro}{\@@_model_separation:nnn}
-% \begin{macro}{\@@_model_separation:w}
-% \begin{macro}
-% {
-% \@@_model_separation_cmyk:nnnnnn ,
-% \@@_model_separation_gray:nnnnnn ,
-% \@@_model_separation_rgb:nnnnnn
-% }
-% \begin{macro}{\@@_model_convert:nnn}
-% \begin{macro}{\@@_model_separation_cielab:nnnnnn}
-% \begin{macro}{\@@_model_separation_cielab:nnnnnnn}
% Set up a new model: in general this has to be handled by a family-dependent
% function. To avoid some \enquote{interesting} questions with casing, we
% fold the case of the family name. The key--value list should always be
@@ -1596,6 +1584,21 @@
}
}
% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_model_separation:n}
+% \begin{macro}{\@@_model_separation:nn}
+% \begin{macro}{\@@_model_separation:nnn}
+% \begin{macro}{\@@_model_separation:w}
+% \begin{macro}
+% {
+% \@@_model_separation_cmyk:nnnnnn ,
+% \@@_model_separation_gray:nnnnnn ,
+% \@@_model_separation_rgb:nnnnnn
+% }
+% \begin{macro}{\@@_model_convert:nnn}
+% \begin{macro}{\@@_model_separation_CIELAB:nnnnnn}
+% \begin{macro}{\@@_model_separation_CIELAB:nnnnnnn}
% Separations must have a \enquote{real} name, which is pretty easy to find.
% \begin{macrocode}
\cs_new_protected:Npn \@@_model_separation:n #1
@@ -1748,16 +1751,16 @@
% Setting up for CIELAB needs a bit more work: there is the illuminant and
% the need for an appropriate object.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_model_separation_cielab:nnnnnn #1#2#3#4#5#6
+\cs_new_protected:Npn \@@_model_separation_CIELAB:nnnnnn #1#2#3#4#5#6
{
\prop_get:NnNF \l_@@_internal_prop { illuminant }
\l_@@_internal_tl
{
\__kernel_msg_error:nnn { color }
- { cielab-requires-illuminant } {#1}
+ { CIELAB-requires-illuminant } {#1}
\tl_set:Nn \l_@@_internal_tl { d50 }
}
- \exp_args:NV \@@_model_separation_cielab:nnnnnnn
+ \exp_args:NV \@@_model_separation_CIELAB:nnnnnnn
\l_@@_internal_tl {#1} {#2} {#3} {#4} {#5} {#6}
}
% \end{macrocode}
@@ -1767,12 +1770,11 @@
% cannot be converted to anything else, we fallback to producing black: the
% user should set up a second model for colors set up this way.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_model_separation_cielab:nnnnnnn #1#2#3#4#5#6#7
+\cs_new_protected:Npn \@@_model_separation_CIELAB:nnnnnnn #1#2#3#4#5#6#7
{
- \tl_if_exist:cTF { c_@@_model_whitepoint_cielab_ #1 _tl }
+ \tl_if_exist:cTF { c_@@_model_whitepoint_CIELAB_ #1 _tl }
{
- \@@_backend_separation_init_cielab:n {#1}
- \@@_backend_separation_init_cielab:nnnnn {#2} {#3} {#4} {#5} {#6}
+ \@@_backend_separation_init_CIELAB:nnn {#1} {#3} { #4 ~ #5 ~ #6 }
\cs_new:cpn { @@_convert_ #2 _cmyk:w } ##1 ~ ##2 \s_@@_stop
{ 0 ~ 0 ~ 0 ~ 1 }
\cs_new:cpn { @@_convert_ #2 _rgb:w } ##1 ~ ##2 \s_@@_stop
@@ -1782,7 +1784,7 @@
}
{
\__kernel_msg_error:nnn { color }
- { unknown-cielab-illuminant } {#1}
+ { unknown-CIELAB-illuminant } {#1}
}
}
% \end{macrocode}
@@ -1794,7 +1796,6 @@
% \end{macro}
% \end{macro}
% \end{macro}
-% \end{macro}
%
% \subsection{Diagnostics}
%
@@ -1830,12 +1831,12 @@
% \subsection{Messages}
%
% \begin{macrocode}
-\__kernel_msg_new:nnnn { color } { cielab-requires-illuminant }
+\__kernel_msg_new:nnnn { color } { CIELAB-requires-illuminant }
{ CIELAB~color~space~'#1'~require~an~illuminant. }
{
LaTeX~has~been~asked~to~create~a~separation~color~space~using~
CIELAB~specifications,~but~no~\\ \\
- \iow_indent:n { illuminant = <basis> }
+ \iow_indent:n { illuminant~=~<basis> }
\\ \\
key~was~given~with~the~correct~information.~LaTeX~will~use~illuminant~
'd50'~for~recovery.
@@ -1857,7 +1858,7 @@
{
LaTeX~has~been~asked~to~create~a~separation~color~space,~
but~no~\\ \\
- \iow_indent:n { alternative-model = <model> }
+ \iow_indent:n { alternative-model~=~<model> }
\\ \\
key~was~given~with~the~correct~information.
}
@@ -1866,7 +1867,7 @@
{
LaTeX~has~been~asked~to~create~a~separation~color~space,~
but~no~\\ \\
- \iow_indent:n { alternative-values = <model> }
+ \iow_indent:n { alternative-values~=~<model> }
\\ \\
key~was~given~with~the~correct~information.
}
@@ -1875,7 +1876,7 @@
{
LaTeX~has~been~asked~to~create~a~separation~color~space,~
but~no~\\ \\
- \iow_indent:n { name = <formal~name> }
+ \iow_indent:n { name~=~<formal~name> }
\\ \\
key~was~given~with~the~correct~information.
}
@@ -1890,7 +1891,7 @@
{
LaTeX~has~been~asked~to~create~a~separation~color~space,~
but~the~model~given~as\\ \\
- \iow_indent:n { alternative-model = <model> }
+ \iow_indent:n { alternative-model~=~<model> }
\\ \\
is~unknown.
}
@@ -1900,7 +1901,7 @@
LaTeX~has~been~asked~to~export~a~color~in~format~'#1',~
but~this~has~never~been~defined.
}
-\__kernel_msg_new:nnnn { color } { unknown-cielab-illuminant }
+\__kernel_msg_new:nnnn { color } { unknown-CIELAB-illuminant }
{ Unknown~illuminant~model~'#1'. }
{
LaTeX~has~been~asked~to~use~create~a~color~space~using~CIELAB~