summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/tkz/tkz-euclide/latex/tools/tkz-tools-eu-colors.tex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/tkz/tkz-euclide/latex/tools/tkz-tools-eu-colors.tex')
-rw-r--r--macros/latex/contrib/tkz/tkz-euclide/latex/tools/tkz-tools-eu-colors.tex57
1 files changed, 57 insertions, 0 deletions
diff --git a/macros/latex/contrib/tkz/tkz-euclide/latex/tools/tkz-tools-eu-colors.tex b/macros/latex/contrib/tkz/tkz-euclide/latex/tools/tkz-tools-eu-colors.tex
new file mode 100644
index 0000000000..94995906f9
--- /dev/null
+++ b/macros/latex/contrib/tkz/tkz-euclide/latex/tools/tkz-tools-eu-colors.tex
@@ -0,0 +1,57 @@
+% tkz-tools-eu-colors
+% Copyright 2023 Alain Matthes
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+% This work has the LPPL maintenance status “maintained”.
+% The Current Maintainer of this work is Alain Matthes.
+
+\def\fileversion{5.00c}
+\def\filedate{2023/01/23}
+\typeout{2023/01/23 5.00c tkz-tools-eu-colors}
+\makeatletter
+
+%<------ Initialisation of the colors with tkzSetUpColors ----------------->
+% Première macro SetUpColors %%%%%%%%%%%%%%%%%%%%%
+%Possible
+\pgfkeys{/tkzsucolor/.is family}
+\def\setupcolorkeys#1{%
+ \pgfkeys{/tkzsucolor,#1}}
+\setupcolorkeys{
+ background/.estore in = \setupcolor@background,
+ text/.estore in = \setupcolor@text,
+ @initial/.style = {background=white,text=black},
+ @apply/.code = {\pagecolor{\setupcolor@background}%
+ \color{\setupcolor@text}%
+ },
+}
+\def\tkzSetUpColors{\pgfutil@ifnextchar[{\tkz@SetUpColors}{\tkz@SetUpColors[]}}
+\def\tkz@SetUpColors[#1]{\setupcolorkeys{@initial,#1,@apply}}
+
+%<------ Initialisation of all colors ----------------->
+\pgfkeys{/tkzsupallcol/.cd,
+ background/.store in = \tkz@suac@bkc,
+ text/.store in = \tkz@suac@txt,
+ background = \tkz@backgroundcolor,% see tkz-euclide.cfg
+ text = \tkz@textcolor% idem
+ }
+\def\tkzSetUpAllColors{\pgfutil@ifnextchar[{\tkz@SetUpAllColors}{%
+ \tkz@SetUpAllColors[]}}
+\def\tkz@SetUpAllColors[#1]{%
+ \pgfqkeys{/tkzsupallcol}{#1} % now we redine the based colors
+ \def\tkz@fillcolor{\tkz@suac@bkc}
+ \def\tkz@mainlinecolor{\tkz@suac@txt}
+ \def\tkz@textcolor{\tkz@suac@txt}
+ \def\tkz@otherlinecolor{\tkz@suac@txt!50}
+ \def\tkz@sua@color{\tkz@suac@txt}
+ \tkzSetUpAxis[color=\tkz@suac@txt]
+ \tkzSetUpGrid[color=\tkz@suac@txt]
+ \pagecolor{\tkz@suac@bkc}
+ \color{\tkz@suac@txt}
+}
+\makeatother
+\endinput \ No newline at end of file