Debian Codegraph @

texmf-dist/tex/latex/tkz-euclide/tkz-tools-eu-colors.tex

raw
1 % tkz-tools-eu-colors
2 % Copyright 2011-2026 Alain Matthes
3 % SPDX-License-Identifier: LPPL-1.3c
4 % Maintainer: Alain Matthes
5
6 \typeout{2026/01/25 5.13c tkz-tools-eu-colors}
7 \makeatletter
8
9 %<------ Initialisation of the colors with tkzSetUpColors ----------------->
10 % Première macro SetUpColors %%%%%%%%%%%%%%%%%%%%%
11 %Possible
12 \pgfkeys{/tkzsucolor/.is family}
13 \def\setupcolorkeys#1{%
14 \pgfkeys{/tkzsucolor,#1}}
15 \setupcolorkeys{
16 background/.estore in = \setupcolor@background,
17 text/.estore in = \setupcolor@text,
18 @initial/.style = {background=white,text=black},
19 @apply/.code = {\pagecolor{\setupcolor@background}%
20 \color{\setupcolor@text}%
21 },
22 }
23 \def\tkzSetUpColors{\pgfutil@ifnextchar[{\tkz@SetUpColors}{\tkz@SetUpColors[]}}
24 \def\tkz@SetUpColors[#1]{\setupcolorkeys{@initial,#1,@apply}}
25
26 %<------ Initialisation of all colors ----------------->
27 \pgfkeys{/tkzsupallcol/.cd,
28 background/.store in = \tkz@suac@bkc,
29 text/.store in = \tkz@suac@txt,
30 background = \tkz@backgroundcolor,% see tkz-euclide.cfg
31 text = \tkz@textcolor% idem
32 }
33 \def\tkzSetUpAllColors{\pgfutil@ifnextchar[{\tkz@SetUpAllColors}{%
34 \tkz@SetUpAllColors[]}}
35 \def\tkz@SetUpAllColors[#1]{%
36 \pgfqkeys{/tkzsupallcol}{#1} % now we redefines the based colors
37 \def\tkz@fillcolor{\tkz@suac@bkc}
38 \def\tkz@mainlinecolor{\tkz@suac@txt}
39 \def\tkz@textcolor{\tkz@suac@txt}
40 \def\tkz@otherlinecolor{\tkz@suac@txt!50}
41 \def\tkz@sua@color{\tkz@suac@txt}
42 \tkzSetUpAxis[color=\tkz@suac@txt]
43 \tkzSetUpGrid[color=\tkz@suac@txt]
44 \pagecolor{\tkz@suac@bkc}
45 \color{\tkz@suac@txt}
46 }
47 \makeatother
48 \endinput