summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/l3backend/l3backend-color.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/l3backend/l3backend-color.dtx')
-rw-r--r--macros/latex/contrib/l3backend/l3backend-color.dtx14
1 files changed, 12 insertions, 2 deletions
diff --git a/macros/latex/contrib/l3backend/l3backend-color.dtx b/macros/latex/contrib/l3backend/l3backend-color.dtx
index 9b662307ed..cca4f54383 100644
--- a/macros/latex/contrib/l3backend/l3backend-color.dtx
+++ b/macros/latex/contrib/l3backend/l3backend-color.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2023-11-04}
+% \date{Released 2023-11-09}
%
% \maketitle
%
@@ -1297,7 +1297,7 @@ if luaotfload and luaotfload.set_transparent_colorstack then
token.new(0, 2),
token.create'l_tmpa_tl',
token.create'exp_after:wN',
- token.create'__color_select:nn',
+ token.create'@@_select:nn',
token.create'l_tmpa_tl',
token.new(0, 2),
}
@@ -1308,6 +1308,16 @@ if luaotfload and luaotfload.set_transparent_colorstack then
local html = htmlcolor:match(value)
if html then return html end
+% If no l3color named color with this name is known, check for defined xcolor colors
+ local l3color_prop = token.get_macro(string.format('l_@@_named_%s_prop', value))
+ if l3color_prop == nil or l3color_prop == '' then
+ local legacy_color_macro = token.create(string.format('\\color@%s', value))
+ if legacy_color_macro.cmdname ~= 'undefined_cs' then
+ token.put_next(legacy_color_macro)
+ return token.scan_argument()
+ end
+ end
+
tex.runtoks(function()
token.get_next()
color_export[6] = value