[latex3-commits] [git/LaTeX3-latex3-latex3] color-models: "cielab" not "CIELAB" (587a702cd)

Joseph Wright joseph.wright at morningstar2.co.uk
Fri Jul 17 11:37:30 CEST 2020


Repository : https://github.com/latex3/latex3
On branch  : color-models
Link       : https://github.com/latex3/latex3/commit/587a702cdce406b0c59010172350f5039a5f4ff9

>---------------------------------------------------------------

commit 587a702cdce406b0c59010172350f5039a5f4ff9
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Fri Jul 17 10:36:58 2020 +0100

    "cielab" not "CIELAB"
    
    Following the xcolor logic, cielab is an real-number based
    system. We are using CIELAB as the full name following Wikipedia,
    which makes it clear that Lab is used for other things,


>---------------------------------------------------------------

587a702cdce406b0c59010172350f5039a5f4ff9
 l3experimental/l3color/l3color.dtx              | 78 ++++++++++++-------------
 l3experimental/l3color/testfiles/m3color003.lvt |  6 +-
 2 files changed, 42 insertions(+), 42 deletions(-)

diff --git a/l3experimental/l3color/l3color.dtx b/l3experimental/l3color/l3color.dtx
index 19bac84bb..4c660c6c2 100644
--- a/l3experimental/l3color/l3color.dtx
+++ b/l3experimental/l3color/l3color.dtx
@@ -334,7 +334,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
@@ -343,7 +343,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$
@@ -1349,30 +1349,30 @@
 %
 % \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 { -128 ~ 127 ~ -128 ~ 127 }
 %    \end{macrocode}
 % \end{variable}
 %
@@ -1388,11 +1388,11 @@
 %     \@@_model_separation_rgb:nnnnnn
 %   }
 % \begin{macro}{\@@_model_convert:nnn}
-% \begin{macro}{\@@_model_separation_CIELAB:nnnnnn}
-% \begin{macro}{\@@_model_separation_CIELAB:nnnnnnn}
+% \begin{macro}{\@@_model_separation_cielab:nnnnnn}
+% \begin{macro}{\@@_model_separation_cielab:nnnnnnn}
 % \begin{macro}{\@@_model_separation_init:nnnnn}
-% \begin{macro}{\@@_model_separation_init_CIELAB:n}
-% \begin{macro}{\@@_model_separation_init_CIELAB:nnnnn}
+% \begin{macro}{\@@_model_separation_init_cielab:n}
+% \begin{macro}{\@@_model_separation_init_cielab:nnnnn}
 %   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
@@ -1572,16 +1572,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}
@@ -1591,12 +1591,12 @@
 %   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 }
       {
-        \@@_model_separation_init_CIELAB:n {#1}
-        \@@_model_separation_init_CIELAB:nnnnn {#2} {#3} {#4} {#5} {#6}
+        \@@_model_separation_init_cielab:n {#1}
+        \@@_model_separation_init_cielab:nnnnn {#2} {#3} {#4} {#5} {#6}
         \cs_new:cpn { @@_convert_ #1 _cmyk:w } ##1 ~ ##2 \s_@@_stop
           { 0 ~ 0 ~ 0 ~ 1 }
         \cs_new:cpn { @@_convert_ #1 _rgb:w } ##1 ~ ##2 \s_@@_stop
@@ -1606,7 +1606,7 @@
       }
       {
         \__kernel_msg_error:nnn { color }
-          { unknown-CIELAB-illuminant } {#1}
+          { unknown-cielab-illuminant } {#1}
       }
   }
 %    \end{macrocode}
@@ -1642,26 +1642,26 @@
 %   For CIELAB colors, we need one object per document for the illuminant,
 %   plus initialisation of the color space referencing that object.
 %    \begin{macrocode}
-\cs_new_protected:Npn \@@_model_separation_init_CIELAB:n #1
+\cs_new_protected:Npn \@@_model_separation_init_cielab:n #1
   {
-    \pdf_object_new:nn { @@_illuminant_CIELAB_ #1 } { array }
-    \pdf_object_write:nx { @@_illuminant_CIELAB_ #1 }
+    \pdf_object_new:nn { @@_illuminant_cielab_ #1 } { array }
+    \pdf_object_write:nx { @@_illuminant_cielab_ #1 }
       {
         /Lab ~
         <<
          /WhitePoint ~
-           [ \tl_use:c { c_@@_model_whitepoint_CIELAB_ #1 _tl } ]
+           [ \tl_use:c { c_@@_model_whitepoint_cielab_ #1 _tl } ]
          /Range ~ [ \c_@@_model_range_lab_tl ]
         >>
      }
   }
 \cs_if_exist:NF \pdf_object_new:nn
-  { \cs_gset_protected:Npn \@@_model_separation_init_CIELAB:n #1 { } }
-\cs_new_protected:Npn \@@_model_separation_init_CIELAB:nnnnn #1#2#3#4#5
+  { \cs_gset_protected:Npn \@@_model_separation_init_cielab:n #1 { } }
+\cs_new_protected:Npn \@@_model_separation_init_cielab:nnnnn #1#2#3#4#5
   {
     \@@_model_separation_init:nnnnn
       {#2}
-      { \pdf_object_ref:n { @@_illuminant_CIELAB_ #1 } }
+      { \pdf_object_ref:n { @@_illuminant_cielab_ #1 } }
       { \c_@@_model_range_lab_tl }
       { 100 ~ 0 ~ 0 }
       { #3 ~ #4 ~ #5 }
@@ -1714,7 +1714,7 @@
 % \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~
@@ -1784,7 +1784,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~
diff --git a/l3experimental/l3color/testfiles/m3color003.lvt b/l3experimental/l3color/testfiles/m3color003.lvt
index d5a6e3a54..3b08f9497 100644
--- a/l3experimental/l3color/testfiles/m3color003.lvt
+++ b/l3experimental/l3color/testfiles/m3color003.lvt
@@ -164,7 +164,7 @@
     \color_model_new:nnn { BarToneLab } { Separation }
       {
         name = BarTone~555~GN ,
-        alternative-model = CIELAB ,
+        alternative-model = cielab ,
         alternative-values = {50, -30, -40},
         illuminant = d65
       }
@@ -183,9 +183,9 @@
     \color_model_new:nnn { foo4 } { separation }
       { name = BarTone~555~GN , alternative-model = foo }
     \color_model_new:nnn { foo5 } { separation }
-      { name = BarTone~555~GN , alternative-model = CIELAB }
+      { name = BarTone~555~GN , alternative-model = cielab }
     \color_model_new:nnn { foo5 } { separation }
-      { name = BarTone~555~GN , alternative-model = CIELAB , illuminant = dave }
+      { name = BarTone~555~GN , alternative-model = cielab , illuminant = dave }
   }
 
 \TEST { Converting~new~models }





More information about the latex3-commits mailing list.