[latex3-commits] [latex3/fontspec] l3color: correction if opacity is set with hex and key (039923d)
github at latex-project.org
github at latex-project.org
Sun Nov 5 20:48:07 CET 2023
Repository : https://github.com/latex3/fontspec
On branch : l3color
Link : https://github.com/latex3/fontspec/commit/039923d14abd8dcef61720322c5589df61ab69eb
>---------------------------------------------------------------
commit 039923d14abd8dcef61720322c5589df61ab69eb
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Sun Nov 5 20:48:07 2023 +0100
correction if opacity is set with hex and key
>---------------------------------------------------------------
039923d14abd8dcef61720322c5589df61ab69eb
fontspec-code-keyval.dtx | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/fontspec-code-keyval.dtx b/fontspec-code-keyval.dtx
index 84bb91a..f962c11 100644
--- a/fontspec-code-keyval.dtx
+++ b/fontspec-code-keyval.dtx
@@ -739,7 +739,16 @@
\convertcolorspec{named}{#1}{HTML}\l_@@_hexcol_tl
}
{
- \tl_set:Nn \l_@@_hexcol_tl {#1}
+ \int_compare:nTF { \tl_count:n {#1} == 6 }
+ { \tl_set:Nn \l_@@_hexcol_tl {#1} }
+ {
+ \int_compare:nTF { \tl_count:n {#1} == 8 }
+ { \fontspec_parse_colour:viii #1 }
+ {
+ \bool_if:NF \l_@@_firsttime_bool
+ { \@@_warning:nx {bad-colour} {#1} }
+ }
+ }
}
}
%</LU>
More information about the latex3-commits
mailing list.