summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/tuda-ci/tex/tudacolors.sty
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-04-26 03:02:04 +0000
committerNorbert Preining <norbert@preining.info>2022-04-26 03:02:04 +0000
commit6f7554fc6cab67e3dc397ce7a942889eedbc4967 (patch)
treecd63f9ed43b147e44b3f1981bf7bda23680416b1 /macros/latex/contrib/tuda-ci/tex/tudacolors.sty
parent4688b855bb6f8b817901a7c777e8aecd1a189622 (diff)
CTAN sync 202204260302
Diffstat (limited to 'macros/latex/contrib/tuda-ci/tex/tudacolors.sty')
-rw-r--r--macros/latex/contrib/tuda-ci/tex/tudacolors.sty49
1 files changed, 25 insertions, 24 deletions
diff --git a/macros/latex/contrib/tuda-ci/tex/tudacolors.sty b/macros/latex/contrib/tuda-ci/tex/tudacolors.sty
index 71e5dc0911..702fe20837 100644
--- a/macros/latex/contrib/tuda-ci/tex/tudacolors.sty
+++ b/macros/latex/contrib/tuda-ci/tex/tudacolors.sty
@@ -1,4 +1,4 @@
-%% This is file `tudacolors.sty' version 3.24 (2022/04/20),
+%% This is file `tudacolors.sty' version 3.25 (2022/04/25),
%% it is part of
%% TUDa-CI -- Corporate Design for TU Darmstadt
%% ----------------------------------------------------------------------------
@@ -26,8 +26,8 @@
%%
%% ============================================================================
%%
-\def\fileversion{3.24}
-\def\filedate{2022/04/20}
+\def\fileversion{3.25}
+\def\filedate{2022/04/25}
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
\ProvidesExplPackage{tudacolors}{\filedate}{\fileversion}{Color definition for TU Darmstadt's tuda-ci bundle}
@@ -64,7 +64,6 @@
department / unknown .code:n = {
\str_gset:Nx \g_ptxcd_department_str {\l_keys_value_tl}
},
- department .initial:V = \g_ptxcd_department_str,
mecheng .meta:n = {department=mecheng},
}
@@ -102,34 +101,36 @@
\msg_new:nnnn{tudacolors} {undefined-color} {The~ color~ #1~ you~ selected~ is~ not~ defined.} {See~ the~ tuda-ci~ manual~ for~ a~ list~ of~ available~ colors.}
\msg_new:nnnn{tudacolors} {unselectable-color} {The~ color~ you~ selected~ (#1)~ must~ not~ be~ choosen~ for~ #2.} {See~ the~ Corporate~ Design~ Guidelines~ for~ further~ information.}
-%select accentcolor
-\exp_args:Nnx \colorlet{accentcolor}{\g_ptxcd_color_accent_tl}
-\bool_if:NTF \g_ptxcd_color_whitetext_bool {
- \clist_if_in:NVTF \c_ptxcd_color_allow_whitetext_clist \g_ptxcd_color_accent_tl {
- \colorlet{textonaccentcolor}{white}
+\hook_new:n {ptxcd/init-colors}
+\hook_gput_code:nnn {ptxcd/init-colors} {tudacolors} {
+ \exp_args:Nnx \colorlet{accentcolor}{\g_ptxcd_color_accent_tl}
+ \bool_if:NTF \g_ptxcd_color_whitetext_bool {
+ \clist_if_in:NVTF \c_ptxcd_color_allow_whitetext_clist \g_ptxcd_color_accent_tl {
+ \colorlet{textonaccentcolor}{white}
+ } {
+ \colorlet{textonaccentcolor}{black}
+ \tl_if_in:NnT \g_ptxcd_color_accent_tl {TUDa} {\msg_warning:nnxx{tudacolors} {unselectable-color} {white} {textonaccentcolor}}
+ }
} {
- \colorlet{textonaccentcolor}{black}
- \tl_if_in:NnT \g_ptxcd_color_accent_tl {TUDa} {\msg_warning:nnxx{tudacolors} {unselectable-color} {white} {textonaccentcolor}}
+ \clist_if_in:NVTF \c_ptxcd_color_allow_blacktext_clist \g_ptxcd_color_accent_tl {
+ \colorlet{textonaccentcolor}{black}
+ } {
+ \colorlet{textonaccentcolor}{white}
+ \tl_if_in:NnT \g_ptxcd_color_accent_tl {TUDa} {msg_warning:nnxx{tudacolors} {unselectable-color} {black} {textonaccentcolor}}
+ }
}
-} {
- \clist_if_in:NVTF \c_ptxcd_color_allow_blacktext_clist \g_ptxcd_color_accent_tl {
- \colorlet{textonaccentcolor}{black}
+ \colorlet{identbarcolor}{\g_ptxcd_color_identbar_tl}
+ \exp_args:NNx \clist_if_in:NnTF \c_ptxcd_color_forbid_textaccent_clist {\g_ptxcd_color_textaccent_tl} {
+ \msg_warning:nnxx{tudacolors} {unselectable-color} {\g_ptxcd_color_textaccent_tl} {textaccentcolor}
+ \colorlet{textaccentcolor}{black}
} {
- \colorlet{textonaccentcolor}{white}
- \tl_if_in:NnT \g_ptxcd_color_accent_tl {TUDa} {msg_warning:nnxx{tudacolors} {unselectable-color} {black} {textonaccentcolor}}
+ \colorlet{textaccentcolor}{\g_ptxcd_color_textaccent_tl}
}
}
-\colorlet{identbarcolor}{\g_ptxcd_color_identbar_tl}
+\hook_use:n {ptxcd/init-colors}
-\exp_args:NNx \clist_if_in:NnTF \c_ptxcd_color_forbid_textaccent_clist {\g_ptxcd_color_textaccent_tl} {
- \msg_warning:nnxx{tudacolors} {unselectable-color} {\g_ptxcd_color_textaccent_tl} {textaccentcolor}
- \colorlet{textaccentcolor}{black}
-} {
- \colorlet{textaccentcolor}{\g_ptxcd_color_textaccent_tl}
-}
-
\colorlet{InfoBox}{white}
\endinput \ No newline at end of file