Debian Codegraph @

texmf-dist/tex/latex/tkz-base/tkz-tools-colors.tex

raw
1 % tkz-tools-colors
2 % Copyright 2024 Alain Matthes
3 % This work may be distributed and/or modified under the
4 % conditions of the LaTeX Project Public License, either version 1.3
5 % of this license or (at your option) any later version.
6 % The latest version of this license is in
7 % http://www.latex-project.org/lppl.txt
8 % and version 1.3 or later is part of all distributions of LaTeX
9 % version 2005/12/01 or later.
10 % This work has the LPPL maintenance status “maintained”.
11 % The Current Maintainer of this work is Alain Matthes.
12
13 \def\fileversion{4.21c}
14 \def\filedate{2024/01/16}
15 \typeout{2024/01/16 4.21c tkz-tools-colors}
16 \makeatletter
17
18 %<------ Initialisation of the colors with tkzSetUpColors ----------------->
19 % Première macro SetUpColors %%%%%%%%%%%%%%%%%%%%%
20 %Possible
21 \pgfkeys{/tkzsucolor/.is family}
22 \def\setupcolorkeys#1{%
23 \pgfkeys{/tkzsucolor,#1}}
24 \setupcolorkeys{
25 background/.estore in = \setupcolor@background,
26 text/.estore in = \setupcolor@text,
27 @initial/.style = {background=white,text=black},
28 @apply/.code = {\pagecolor{\setupcolor@background}%
29 \color{\setupcolor@text}%
30 },
31 }
32 \def\tkzSetUpColors{\pgfutil@ifnextchar[{\tkz@SetUpColors}{\tkz@SetUpColors[]}}
33 \def\tkz@SetUpColors[#1]{\setupcolorkeys{@initial,#1,@apply}}
34
35 %<------ Initialisation of all colors ----------------->
36 \pgfkeys{/tkzsupallcol/.cd,
37 background/.store in = \tkz@suac@bkc,
38 text/.store in = \tkz@suac@txt,
39 background = \tkz@backgroundcolor,% see tkz-base.cfg
40 text = \tkz@textcolor% idem
41 }
42 \def\tkzSetUpAllColors{\pgfutil@ifnextchar[{\tkz@SetUpAllColors}{%
43 \tkz@SetUpAllColors[]}}
44 \def\tkz@SetUpAllColors[#1]{%
45 \pgfqkeys{/tkzsupallcol}{#1} % now we redine the based colors
46 \def\tkz@fillcolor{\tkz@suac@bkc}
47 \def\tkz@mainlinecolor{\tkz@suac@txt}
48 \def\tkz@textcolor{\tkz@suac@txt}
49 \def\tkz@otherlinecolor{\tkz@suac@txt!50}
50 \def\tkz@sua@color{\tkz@suac@txt}
51 \tkzSetUpAxis[color=\tkz@suac@txt]
52 \tkzSetUpGrid[color=\tkz@suac@txt]
53 \pagecolor{\tkz@suac@bkc}
54 \color{\tkz@suac@txt}
55 }
56 \makeatother
57 \endinput