summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-tools-eu-colors.tex
blob: d0a921c99361015e8c43c1dfd0c2cf0c80cfa36f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
% tkz-tools-eu-colors
% Copyright 2022  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{4.25c}
\def\filedate{2022/09/23} 
\typeout{2022/09/23 4.25c  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