diff options
author | Karl Berry <karl@freefriends.org> | 2022-01-04 22:30:53 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-01-04 22:30:53 +0000 |
commit | 2826ceba9c796e6ec935ff71098328b0042b3ff3 (patch) | |
tree | 254ae6dcd883e55308b733164f8e0445590e3ea6 /Master/texmf-dist/tex/latex/tkz-base/tkz-tools-colors.tex | |
parent | 3886457c768d0a6fd86ca3aa7139026e39ef5724 (diff) |
tkz-base (4jan22)
git-svn-id: svn://tug.org/texlive/trunk@61495 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/tkz-base/tkz-tools-colors.tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/tkz-base/tkz-tools-colors.tex | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/tkz-base/tkz-tools-colors.tex b/Master/texmf-dist/tex/latex/tkz-base/tkz-tools-colors.tex new file mode 100644 index 00000000000..7f8a0d7a643 --- /dev/null +++ b/Master/texmf-dist/tex/latex/tkz-base/tkz-tools-colors.tex @@ -0,0 +1,57 @@ +% tkz-tools-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.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-tools-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-base.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 |