texlive[66035] branches/branch2022.final/Master/texmf-dist:

commits+karl at tug.org commits+karl at tug.org
Tue Feb 21 21:53:00 CET 2023


Revision: 66035
          http://tug.org/svn/texlive?view=revision&revision=66035
Author:   karl
Date:     2023-02-21 21:53:00 +0100 (Tue, 21 Feb 2023)
Log Message:
-----------
pgf-periodictable (21feb23) (branch)

Modified Paths:
--------------
    branches/branch2022.final/Master/texmf-dist/doc/latex/pgf-periodictable/README
    branches/branch2022.final/Master/texmf-dist/doc/latex/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_DesignCS.tex
    branches/branch2022.final/Master/texmf-dist/doc/latex/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_Examples.tex
    branches/branch2022.final/Master/texmf-dist/doc/latex/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_OtherCont.tex
    branches/branch2022.final/Master/texmf-dist/doc/latex/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_commands.tex
    branches/branch2022.final/Master/texmf-dist/doc/latex/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_generallayout.tex
    branches/branch2022.final/Master/texmf-dist/doc/latex/pgf-periodictable/manualfiles/pgfPTmanual.macros.tex
    branches/branch2022.final/Master/texmf-dist/doc/latex/pgf-periodictable/pgf-PeriodicTableManual.pdf
    branches/branch2022.final/Master/texmf-dist/doc/latex/pgf-periodictable/pgf-PeriodicTableManual.tex
    branches/branch2022.final/Master/texmf-dist/tex/latex/pgf-periodictable/pgf-PeriodicTable.sty
    branches/branch2022.final/Master/texmf-dist/tex/latex/pgf-periodictable/pgfPT.backcolors.keys.tex

Added Paths:
-----------
    branches/branch2022.final/Master/texmf-dist/doc/latex/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_libCS.tex
    branches/branch2022.final/Master/texmf-dist/doc/latex/pgf-periodictable/pgfPT.input.library.tex
    branches/branch2022.final/Master/texmf-dist/doc/latex/pgf-periodictable/pgfPTlibrary.colorschemes.tex

Modified: branches/branch2022.final/Master/texmf-dist/doc/latex/pgf-periodictable/README
===================================================================
--- branches/branch2022.final/Master/texmf-dist/doc/latex/pgf-periodictable/README	2023-02-21 20:52:23 UTC (rev 66034)
+++ branches/branch2022.final/Master/texmf-dist/doc/latex/pgf-periodictable/README	2023-02-21 20:53:00 UTC (rev 66035)
@@ -1,4 +1,4 @@
-This is pgf-PeriodicTable, version 1.0.1 (2022/11/08).
+This is pgf-PeriodicTable, version 2.0.0 (2023/02/20).
 
 The purpose of this package is to provide the Periodic Table of Elements in
 a simple way. It relies on pgf/TikZ to offer a full or partial periodic table with
@@ -20,6 +20,13 @@
 ____________________________________________________________
 
 Major changes:
+*** v2.0.0 (20/02/2023) ***
+New command \usepgfPTlibrary
+New library 'colorschemes' for easy creation of color schemes with the commands:
+- \pgfPTGroupColors
+- \pgfPTPeriodColors
+- \pgfPTCScombine
+- \pgfPTCSwrite
 *** v1.0.1 (08/11/2022) ***
 Now compatible with pdfLaTex, LuaLaTeX and XeLaTeX engines.
 Fixed the 'String contains an invalid utf-8 sequence...' error.

Modified: branches/branch2022.final/Master/texmf-dist/doc/latex/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_DesignCS.tex
===================================================================
--- branches/branch2022.final/Master/texmf-dist/doc/latex/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_DesignCS.tex	2023-02-21 20:52:23 UTC (rev 66034)
+++ branches/branch2022.final/Master/texmf-dist/doc/latex/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_DesignCS.tex	2023-02-21 20:53:00 UTC (rev 66035)
@@ -1,7 +1,8 @@
-\hypertarget{colorscheme}{There are two} ways to make a new color scheme:
+\hypertarget{colorscheme}{There are three} ways to make a new color scheme:
 \begin{itemize}
 \item[--]with the command \pgfPTMmacro{pgfPTnewColorScheme}[]
-\item[--]and using the \textit{script} in the file \mbox{\href{run:pgfPTcolorSchemes.html}{pgfPTcolorSchemes.html}}
+\item[--]using the \textit{script} in the file \mbox{\href{run:pgfPTcolorSchemes.html}{pgfPTcolorSchemes.html}}
+\item[--]with the commands provided by the \hyperlink{lib:colorschemes}{colorschemes library} (see the \hyperlink{sec:lib}{libraries section}).
 \end{itemize}\ %
 \\ [-44pt]\ %
 \def\tmpSection{\textcolor{blue!50!black}{\textbackslash pgfPTnewColorScheme}}%

Modified: branches/branch2022.final/Master/texmf-dist/doc/latex/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_Examples.tex
===================================================================
--- branches/branch2022.final/Master/texmf-dist/doc/latex/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_Examples.tex	2023-02-21 20:52:23 UTC (rev 66034)
+++ branches/branch2022.final/Master/texmf-dist/doc/latex/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_Examples.tex	2023-02-21 20:53:00 UTC (rev 66035)
@@ -42,6 +42,21 @@
 ]%
 \\ [-4pt]\pgfPTMmacrobox{pgfPT}[eConfignl color=blue!70!black,Ar precision=2,DiscC font=\string\fontsize{4}{4}\string\selectfont,DiscY font=\string\fontsize{4}{4}\string\selectfont\string\bfseries]%
 \\ [10pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[eConfignl color=blue!70!black,Ar precision=2,DiscC font=\fontsize{4}{4}\selectfont,DiscY font=\fontsize{4}{4}\selectfont\bfseries]}}%
+\newpage%
+\pgfPTresetcell%
+\pgfPTPeriodColors{period}{P5=red!20}%
+\pgfPTGroupColors{group}{G14=green!20}%
+\pgfPTCScombine{period,group,mix}%
+\pgfPTMlibexample{%
+\textbf{\bs{usepgfPTlibrary}\lb\red{colorschemes}\rb}%
+\\ \bs{pgfPTPeriodColors}\lb\red{period}\rb\lb\red{P5=red!20}\rb%
+\\ \bs{pgfPTGroupColors}\lb\red{group}\rb\lb\red{G14=green!20}\rb%
+\\ \bs{pgfPTCScombine}\lb\red{period,group,mix}\rb%
+\\ \pgfPTMmacro{pgfPT}[back color scheme=mix,show title=false]%
+}{%
+\scalebox{.6}{\pgfPT[back color scheme=mix,show title=false]}%
+\\ In the Periodic Table, a row is called a \textbf{\textcolor{red!40}{period}} and a column is called a \textbf{\textcolor{green!40}{group}}.
+}% -----
 \newpage\ %
 \vfill%
 \pgfPTbuildcell(8,3)[%

Modified: branches/branch2022.final/Master/texmf-dist/doc/latex/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_OtherCont.tex
===================================================================
--- branches/branch2022.final/Master/texmf-dist/doc/latex/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_OtherCont.tex	2023-02-21 20:52:23 UTC (rev 66034)
+++ branches/branch2022.final/Master/texmf-dist/doc/latex/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_OtherCont.tex	2023-02-21 20:53:00 UTC (rev 66035)
@@ -73,7 +73,7 @@
 \\ \textit{Therefore the values provided to this key should be any integer between -1 and 2, \ie, -1, 0, 1 or 2. Any other integer provided will be processed as -1.}};}
 }
 \vfill%\\ [10pt]
-\pgfPTMbuildcellstyle{myE}(5,3)[(1;1-2;Z),(1;3;radio),(2-3;1.5-3.5;CS),(4;1-3;name),(5;1-2.5;Ei), %
+\pgfPTresetstyle\pgfPTMbuildcellstyle{myE}(5,3)[(1;1-2;Z),(1;3;radio),(2-3;1.5-3.5;CS),(4;1-3;name),(5;1-2.5;Ei), %
 (5;2.5-3;eaff)]%
 \pgfPTbuildcellstyle{myE}(5,3)[(1;1-2;Z),(1;3;radio),(2-3;1.5-3.5;CS),(4;1-3;name),(5;1-2.5;Ei),(5;2.5-3;eaff)]%
 \\ [-4pt]\pgfPTMmacrobox[l]{pgfPTstyle}[Z list={1,...,54},cell style=myE,show title=false]%

Modified: branches/branch2022.final/Master/texmf-dist/doc/latex/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_commands.tex
===================================================================
--- branches/branch2022.final/Master/texmf-dist/doc/latex/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_commands.tex	2023-02-21 20:52:23 UTC (rev 66034)
+++ branches/branch2022.final/Master/texmf-dist/doc/latex/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_commands.tex	2023-02-21 20:53:00 UTC (rev 66035)
@@ -132,7 +132,7 @@
 \\ [5pt]\pgfPTMline%
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \\ [-32pt]\ %
-\def\tmpSection{\bs{pgfPTnewColorScheme}\lb\red{name}\rb\lp\red{color list}\rp}%
+\def\tmpSection{\bs{pgfPTnewColorScheme}\lb\red{name}\rb\lb\red{color list}\rb}%
 \subsection*{}{\normalfont\large\bfseries\raisebox{1.25pt}{$\mathbf{\blacktriangleright}$}\ Utilization of \tmpSection}%
 \label{command:pgfPTnewColorScheme}\addcontentsline{toc}{subsection}{\texorpdfstring{\tmpSection{}}{\textbackslash pgfPTnewColorScheme}}%
 \index{COMMANDS@\textbf{COMMANDS}!\textbackslash pgfPTnewColorScheme}%

Modified: branches/branch2022.final/Master/texmf-dist/doc/latex/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_generallayout.tex
===================================================================
--- branches/branch2022.final/Master/texmf-dist/doc/latex/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_generallayout.tex	2023-02-21 20:52:23 UTC (rev 66034)
+++ branches/branch2022.final/Master/texmf-dist/doc/latex/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_generallayout.tex	2023-02-21 20:53:00 UTC (rev 66035)
@@ -162,7 +162,7 @@
 \item[\raisebox{1pt}{\scriptsize$\vartriangleright\,$}]\sq{Blocks}, for showing the elements in each block of the Periodic Table with the same color.
 \item[\raisebox{1pt}{\scriptsize$\vartriangleright\,$}]\sq{solid}, to show the background of each cell of the Periodic Table with the same color specified by the key \sq{\red{back color}}.
 \end{itemize}
-\item any \textbf{user defined} name via \bs{pgfPTnewColorScheme}\lb\red{name}\rb\lp\red{color list}\rp%
+\item any \textbf{user defined} name via \bs{pgfPTnewColorScheme}\lb\red{name}\rb\lb\red{color list}\rb%
 \end{itembar}%
 }%
 \\ [-5pt]\pgfPTendoption%

Added: branches/branch2022.final/Master/texmf-dist/doc/latex/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_libCS.tex
===================================================================
--- branches/branch2022.final/Master/texmf-dist/doc/latex/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_libCS.tex	                        (rev 0)
+++ branches/branch2022.final/Master/texmf-dist/doc/latex/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_libCS.tex	2023-02-21 20:53:00 UTC (rev 66035)
@@ -0,0 +1,353 @@
+%\subsection{\texorpdfstring{\ding{224} Color Schemes Library}{colorschemes}}
+\subsection*{}{\normalfont\large\bfseries\raisebox{1.25pt}{$\mathbf{\blacktriangleright}$}\ Color Schemes Library}%
+\label{command:pgfPTpreviewcell}\addcontentsline{toc}{subsection}{\texorpdfstring{Color Schemes Library}{colorschemes}}%
+\index{LIBRARIES@\textbf{\cyan{LIBRARIES}}!colorschemes@\textbf{\red{Color Schemes Library}}}%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Color Schemes Library
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\\ [4pt]\pgfPTlib{colorschemes}{This library extends the features provided by the command \bs{\mbox{pgfPTnewColorScheme}}.
+It defines a set of commands that automatically generate a new color scheme.
+\begin{itemize}
+\item\bs{pgfPTGroupColors}\lb\red{name of the new color scheme}\rb\lb\red{list of colors,options}\rb%
+\item\bs{pgfPTPeriodColors}\lb\red{name of the new color scheme}\rb\lb\red{list of colors,options}\rb%
+\item\bs{pgfPTCScombine}\lp\red{proportion,mode}\rp\lb\red{name of the first color scheme,name of the second color scheme,name of the new color scheme}\rb%
+\item\bs{pgfPTCSwrite}\lp\red{filename}\rp\lb\red{list of color schemes names}\rb%
+\end{itemize}
+Color arguments for this library's commands can use both the base package syntax -- \red{namedColor} or \red{namedColorA!\#\#!namedColorB<!\#\#><!named\myldots>} -- or any color model supported by the \txttt{xcolor} package\footnote{See \textit{Table 3: Supported color models} on page 10 of the documentation of \href{https://ctan.org/pkg/xcolor}{xcolor} v2.14 2022/06/12} using the \textit{special syntax} \red{*[model:values]}, \eg, \red{*[rgb:.5;.2;.3]} or \red{*[cmyk:.5;.2;.3;.3]} or \red{*[HTML:5FA287]}. \textbf{The values for the individual color components of a color specified this way must be separated by semicolons instead of commas}, except for the HTML, Gray and wave color models as explained in the \txttt{xcolor} package.
+}% \pgfPTlib
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\def\tmpSectionI{\bs{pgfPTGroupColors}}%
+\def\tmpSection{\bs{pgfPTGroupColors}\lp\red{default group color}\rp\lb\red{name of the new color scheme}\rb\lb\red{list of \mbox{colors},options}\rb}%
+\subsubsection*{}{\pgfPTMlibsubsubsection{\tmpSection}}%
+\label{command:pgfPTGroupColors}\addcontentsline{toc}{subsubsection}{\texorpdfstring{\tmpSectionI{}}{\textbackslash pgfPTGroupColors}}%
+\index{LIBRARIES@\textbf{\cyan{LIBRARIES}}!colorschemes@\textbf{\red{Color Schemes Library}}!\tmpSectionI}%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\\ [10pt]This command \textbf{creates a Color Scheme} with the name \red{name of the new color scheme}. \textbf{Group colors} can be configured in three different ways:
+\vspace{4pt}
+\begin{itemlist}
+\item\textbf{setting the colors one by one}, using the \textit{\red{key=value}} mechanism in the \red{list of colors}. For example:
+\mymfbox{\bs{pgfPTGroupColors}\lb\red{name of the new color scheme}\rb\gray{\%}
+\\ \lb\red{\textbf{G1=red,G2=red!50,G3=orange,<\myldots>,G18=blue},options}\rb}
+\dcyan{\textit{This will set the specified color for each group. If no color is specified for a group, \red{default group color} will be used}.}
+\\ [3pt]\blue{\textbf{NOTE}}: \red{default group color} is initially set to white.
+\item\textbf{defining a gradient} using the keys \red{left color=<color>}, \red{middle color=<color>} and \red{right color=<color>} as the \red{list of colors}. Note that all the keys are optional, but at least one of them is required. This produces a gradient starting from group 1, with \textit{left color}, to group 18, with \textit{right color}. If the \textit{middle color} key is used then the gradient starts at group 1 with \textit{left color}, goes to the middle position of the groups (between groups 9 and 10) with \textit{middle color} and ends at group 18 with \textit{right color}. For example:
+\mymfbox{\bs{pgfPTGroupColors}\lb\red{name of the new color scheme}\rb\gray{\%}
+\\ \lb\red{\textbf{left color=red,right color=blue},options}\rb}
+\dcyan{\textit{defines a gradient from red (group 1) to blue (group 18)}.}
+\item\textbf{defining a custom gradient} as the \red{list of colors} by using the \textit{\red{key=value}} mechanism inside the \red{gradient} key. For example:
+\mymfbox{\bs{pgfPTGroupColors}\lb\red{name of the new color scheme}\rb\gray{\%}
+\\ \lb\red{\textbf{gradient=\{G1=red,G4=red!50,G18=blue\}},options\rb}}
+\dcyan{\textit{defines a gradient from red (group 1) to red!50 (group 4) and to blue (group 18)}.}
+\end{itemlist}
+\vspace{10pt}
+The \red{options} available to this command are:
+\vspace{4pt}
+\begin{itemlist}
+\item\red{H=<color>}, sets the color of the \textit{hydrogen} cell. If not set, group 1's color will be used. If set, the color of the \textit{hydrogen} cell won't be affected by period blending.
+\item\red{La=<color>}, sets the color of the \textit{lanthanum} cell. If not set, group 3's color will be used.
+\item\red{Lanta=<color>}, sets the color of the \textit{lanthanoids} cells. If not set, \textit{lanthanum}'s color will be used.
+\item\red{Ac=<color>}, sets the color of the \textit{actinium} cell. If not set, group 3's color will be used.
+\item\red{Actin=<color>}, sets the color of the \textit{actinoids} cells. If not set, \textit{actinium}'s color will be used.
+\item\red{period blending=\{color=<color>, percentage=<positive or negative integer>, mode=<add|sub|linear>\}}, performs a \textit{mode} blend over the periods up to the specified percentage with the provided color.
+\\ [3pt]\blue{\textbf{NOTES}}:
+\begin{itembar}
+\item \red{percentage} refers to how much of the color, in total, was mixed over the 7 periods. For example 60\% adds 10\% to each period: P1\raisebox{.8pt}{$\blacktriangleright$}0\% $\rightsquigarrow$ P2\raisebox{.8pt}{$\blacktriangleright$}10\% $\rightsquigarrow$ P3\raisebox{.8pt}{$\blacktriangleright$}20\% $\rightsquigarrow$ \myldots\ $\rightsquigarrow$ P7\raisebox{.8pt}{$\blacktriangleright$}60\%. If the percentage is positive, the mixing is done in descending order (from P1 to P7); if the percentage is negative, the mixing is done in ascending order (from P7 to P1).
+\item The \red{mode}'s values are \red{add} for \textit{additive} blending, \red{sub} for \textit{subtractive} blending and \red{linear} for \textit{linear} blending (as in the \texttt{\small xcolor} package).
+\item \textbf{If \red{period blending} is used without further options} all the default values are used, so \red{period blending} is equivalent to \red{period blending=\{color=white,percentage=60,mode=linear\}}.
+\item None of the keys \red{color}, \red{percentage} and \red{mode} are mandatory. If omitted the default value is used.
+\end{itembar}
+\end{itemlist}
+\newpage%
+% examples --------
+\pgfPTGroupColors{example}{G1=purple!10,G3=red!10}%
+\pgfPTMlibexample{%
+\bs{pgfPTGroupColors}\lb\red{example}\rb\lb\red{G1=purple!10,G3=red!10}\rb%
+\\ \pgfPTMmacro{pgfPT}[back color scheme=example,show title=false]%
+}{%
+\scalebox{.425}{\pgfPT[back color scheme=example,show title=false]}%
+}% -----
+\\ \pgfPTGroupColors[black!10]{example}{G1=purple!10,G3=red!10}%
+\pgfPTMlibexample{%
+\bs{pgfPTGroupColors}\lp\red{black!10}\rp\lb\red{example}\rb\lb\red{G1=purple!10,G3=red!10}\rb%
+\\ \pgfPTMmacro{pgfPT}[back color scheme=example,show title=false]%
+}{%
+\scalebox{.425}{\pgfPT[back color scheme=example,show title=false]}%
+}% -----
+\\ \pgfPTGroupColors{example}{G1=*[HTML:FFAAAA],G2=*[HTML:AA3939],G3=*[HTML:FFD1AA],G4=*[HTML:D49A6A],G5=*[HTML:AA6C39],G6=*[HTML:804515],G7=*[HTML:552700],G8=*[HTML:003333],G9=*[HTML:0D4D4D],G10=*[HTML:226666],G11=*[HTML:407F7F],G12=*[HTML:669999],G13=*[HTML:88CC88],G14=*[HTML:55AA55],G15=*[HTML:2D882D],G16=*[HTML:116611],G17=*[HTML:004400],G18=*[HTML:801515]}%
+\pgfPTMlibexample{%
+\bs{pgfPTGroupColors}\lb\red{example}\rb\lb\red{G1=*[HTML:FFAAAA],G2=*[HTML:AA3939],
+G3=*[HTML:FFD1AA],G4=*[HTML:D49A6A],G5=*[HTML:AA6C39],
+G6=*[HTML:804515],G7=*[HTML:552700],G8=*[HTML:003333],
+G9=*[HTML:0D4D4D],G10=*[HTML:226666],G11=*[HTML:407F7F],
+G12=*[HTML:669999],G13=*[HTML:88CC88],G14=*[HTML:55AA55],
+G15=*[HTML:2D882D],G16=*[HTML:116611],G17=*[HTML:004400],
+G18=*[HTML:801515]
+}\rb%
+\\ \pgfPTMmacro{pgfPT}[back color scheme=example,show title=false]%
+}{%
+\scalebox{.425}{\pgfPT[back color scheme=example,show title=false]}%
+}% -----
+\newpage\pgfPTGroupColors{example}{left color=teal!70,right color=cyan!30}%
+\pgfPTMlibexample{%
+\bs{pgfPTGroupColors}\lb\red{example}\rb\lb\red{left color=teal!70,right color=cyan!30}\rb%
+\\ \pgfPTMmacro{pgfPT}[back color scheme=example,show title=false]%
+}{%
+\scalebox{.425}{\pgfPT[back color scheme=example,show title=false]}%
+}% -----
+\vfill\pgfPTGroupColors{example}{left color=teal!70,middle color=yellow!30,right color=cyan!30,La=teal!70!yellow!50,%
+Ac=teal!60!yellow!50,Lanta=teal!70!yellow!50!white!50,Actin=teal!60!yellow!50!white!50}%
+\pgfPTGroupColors{example}{left color=teal!70,right color=cyan!30,period blending}%
+\pgfPTMlibexample{%
+\bs{pgfPTGroupColors}\lb\red{example}\rb\lb\red{left color=teal!70,right color=cyan!30,period blending}\rb%
+\\ \pgfPTMmacro{pgfPT}[back color scheme=example,show title=false]%
+}{%
+\scalebox{.425}{\pgfPT[back color scheme=example,show title=false]}%
+}% -----
+\vfill\pgfPTGroupColors{example}{left color=teal!70,right color=cyan!30,period blending={color=orange!50,percentage=-40}}%
+\pgfPTMlibexample{%
+\bs{pgfPTGroupColors}\lb\red{example}\rb\lb\red{left color=teal!70,right color=cyan!30,\\ %
+period blending=\{color=orange!50,percentage=-40\}}\rb%
+\\ \pgfPTMmacro{pgfPT}[back color scheme=example,show title=false]%
+}{%
+\scalebox{.425}{\pgfPT[back color scheme=example,show title=false]}%
+}% -----
+\newpage\pgfPTGroupColors{example}{left color=teal!70,right color=cyan!30,period blending={color=orange!50,percentage=-40,mode=add},H={*[cmyk:.071,0,.055,.035]}}%
+\pgfPTMlibexample{%
+\bs{pgfPTGroupColors}\lb\red{example}\rb\lb\red{left color=teal!70,right color=cyan!30,\\ %
+period blending=\{color=orange!50,percentage=-40,mode=add\},\\ %
+H=\{*[cmyk:.071,0,.055,.035]\}}\rb%
+\\ \pgfPTMmacro{pgfPT}[back color scheme=example,show title=false]%
+}{%
+\scalebox{.425}{\pgfPT[back color scheme=example,show title=false]}%
+}% -----
+\pgfPTGroupColors{example}{left color=teal!70,right color=cyan!30,period blending={color=orange!50,percentage=-40,mode=sub},H=*[cmyk:.071;0;.055;.035]}%
+\pgfPTMlibexample{%
+\bs{pgfPTGroupColors}\lb\red{example}\rb\lb\red{left color=teal!70,right color=cyan!30,\\ %
+period blending=\{color=orange!50,percentage=-40,mode=sub\},\\ %
+H=*[cmyk:.071;0;.055;.035]}\rb%
+\\ \pgfPTMmacro{pgfPT}[back color scheme=example,show title=false]%
+}{%
+\scalebox{.425}{\pgfPT[back color scheme=example,show title=false]}%
+}% -----
+\\ \pgfPTGroupColors{example}{left color=teal!70,middle color=yellow!30,right color=cyan!30,La=teal!70!yellow!50,%
+Ac=teal!60!yellow!50,Lanta=teal!70!yellow!50!white!50,Actin=teal!60!yellow!50!white!50}%
+\pgfPTMlibexample{%
+\bs{pgfPTGroupColors}\lb\red{example}\rb\lb\red{left color=teal!70,middle color=yellow!30,right color=cyan!30,%
+La=teal!70!yellow!50,Ac=teal!60!yellow!50, Lanta=teal!70!yellow!50!white!50,Actin=teal!60!yellow!50!white!50}\rb%
+\\ \pgfPTMmacro{pgfPT}[back color scheme=example,show title=false]%
+}{%
+\scalebox{.425}{\pgfPT[back color scheme=example,show title=false]}%
+}% -----
+\newpage%
+\pgfPTGroupColors{example}{gradient={G1=teal!50!black,G2=teal,G10=green,G14=orange,G18=blue},period blending={mode=add}}%
+\pgfPTMlibexample{%
+\bs{pgfPTGroupColors}\lb\red{example}\rb\lb\red{gradient=\{G1=teal!50!black,G2=teal,G10=green,
+G14=orange,G18=blue\},period blending=\{mode=add\}}\rb%
+\\ \pgfPTMmacro{pgfPT}[back color scheme=example,show title=false]%
+}{%
+\scalebox{.425}{\pgfPT[back color scheme=example,show title=false]}%
+}% -----
+\vfill\pgfPTGroupColors{example}{gradient={G3=teal!80!black,G16=teal!80!black,G8=green}}%
+\pgfPTMlibexample{%
+\bs{pgfPTGroupColors}\lb\red{example}\rb\lb\red{gradient=\{G3=teal!80!black,G16=teal!80!black,
+G8=green\}}\rb%
+\\ \pgfPTMmacro{pgfPT}[back color scheme=example,show title=false]%
+}{%
+\scalebox{.425}{\pgfPT[back color scheme=example,show title=false]}%
+\\ [6pt]\tikz{\node[text width=\linewidth-.6666em,text justified,font=\small\itshape] {\textbf{Note: the group numbers can be specified in any order and the gradient can start or end in any group}. In this example, the smallest group number is 3 and the greatest is 16, so the gradient is built from group 3 to group 16 and the colors from group 1 to 3 are equal to group 3's color, just like the colors from group 16 to 18 are equal to group 16's color.
+};}
+}% -----
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\def\tmpSectionII{\bs{pgfPTPeriodColors}}%
+\def\tmpSection{\bs{pgfPTPeriodColors}\lp\red{default period color}\rp\lb\red{name of the new color scheme}\rb\lb\red{list of \mbox{colors},options}\rb}%
+\subsubsection*{}{\pgfPTMlibsubsubsection{\tmpSection}}%
+\label{command:pgfPTPeriodColors}\addcontentsline{toc}{subsubsection}{\texorpdfstring{\tmpSectionII{}}{\textbackslash pgfPTPeriodColors}}%
+\index{LIBRARIES@\textbf{\cyan{LIBRARIES}}!colorschemes@\textbf{\red{Color Schemes Library}}!\tmpSectionII}%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\\ [10pt]This command \textbf{creates a Color Scheme} with the name \red{name of the new color scheme}. \textbf{Period colors} can be configured in three different ways:
+\vspace{4pt}
+\begin{itemlist}
+\item\textbf{setting the colors one by one}, using the \textit{\red{key=value}} mechanism in the \red{list of colors}. For example:
+\mymfbox{\bs{pgfPTPeriodColors}\lb\red{name of the new color scheme}\rb\gray{\%}
+\\ \lb\red{\textbf{P1=red,P2=red!50,<\myldots>,P7=blue},options}\rb}
+\dcyan{\textit{This will set the specified color for each period. If no color is specified for a period, \red{default period color} will be used}.}
+\\ [3pt]\blue{\textbf{NOTE}}: \red{default period color} is initially set to white.
+\item\textbf{defining a gradient} using the keys \red{top color=<color>}, \red{middle color=<color>} and \red{bottom color=<color>} as the \red{list of colors}. Note that all the keys are optional, but at least one of them is required. This produces a gradient starting from period 1, with \textit{top color}, to period 7, with \textit{bottom color}. If the \textit{middle color} key is used then the gradient starts at period 1 with \textit{top color}, goes to the middle position of the periods (period 4) with \textit{middle color} and ends at period 7 with \textit{bottom color}. For example:
+\mymfbox{\bs{pgfPTPeriodColors}\lb\red{name of the new color scheme}\rb\gray{\%}
+\\ \lb\red{\textbf{top color=red,middle color=yellow,bottom color=blue},options}\rb}
+\dcyan{\textit{defines a gradient from red (period 1) to yellow (period 4) and from yellow (period 4) to blue (period 7)}.}
+\item\textbf{defining a custom gradient} as the \red{list of colors} by using the \textit{\red{key=value}} mechanism inside the \red{gradient} key. For example:
+\mymfbox{\bs{pgfPTPeriodColors}\lb\red{name of the new color scheme}\rb\gray{\%}
+\\ \lb\red{\textbf{gradient=\{P1=red,P3=red!50,P7=blue\}},options\rb}}
+\dcyan{\textit{defines a gradient from red (period 1) to red!50 (period 3) and to blue (period 7)}.}
+\end{itemlist}
+\vspace{10pt}
+The \red{options} available to this command are:
+\vspace{4pt}
+\begin{itemlist}
+\item\red{H=<color>}, sets the color of the \textit{hydrogen} cell. If not set, period 1's color will be used. If set, the color of the \textit{hydrogen} cell won't be affected by group blending.
+\item\red{La=<color>}, sets the color of the \textit{lanthanum} cell. If not set, period 6's color will be used.
+\item\red{Lanta=<color>}, sets the color of the \textit{lanthanoids} cells. If not set, \textit{lanthanum}'s color will be used.
+\item\red{Ac=<color>}, sets the color of the \textit{actinium} cell. If not set, period 7's color will be used.
+\item\red{Actin=<color>}, sets the color of the \textit{actinoids} cells. If not set, \textit{actinium}'s color will be used.
+\item\red{group blending=\{color=<color>, percentage=<positive or negative integer>, mode=<add|sub|linear>\}}, performs a \textit{mode} blend over the groups up to the specified percentage with the provided color.
+\\ [3pt]\blue{\textbf{NOTES}}:
+\begin{itembar}
+\item \red{percentage} refers to how much of the color, in total, was mixed over the 18 groups. For example 68\% adds 4\% to each period: G1\raisebox{.8pt}{$\blacktriangleright$}0\% $\rightsquigarrow$ G2\raisebox{.8pt}{$\blacktriangleright$}4\% $\rightsquigarrow$ G3\raisebox{.8pt}{$\blacktriangleright$}8\% $\rightsquigarrow$ \myldots\ $\rightsquigarrow$ G18\raisebox{.8pt}{$\blacktriangleright$}68\%. If the percentage is positive, the mixing is done from left to right (from G1 to G18); if the percentage is negative, the mixing is done from right to left (from G18 to G1).
+\item The \red{mode}'s values are \red{add} for \textit{additive} blending, \red{sub} for \textit{subtractive} blending and \red{linear} for \textit{linear} blending (as in the \texttt{\small xcolor} package).
+\item \textbf{If \red{group blending} is used without further options} all the default values are used, so \red{group blending} is equivalent to \red{group blending=\{color=white,percentage=68,mode=linear\}}.
+\item None of the keys \red{color}, \red{percentage} and \red{mode} are mandatory. If omitted the default value is used.
+\end{itembar}
+\end{itemlist}
+\newpage
+% examples --------
+\pgfPTPeriodColors{example}{P1=*[RGB:86;139;137],P2=*[RGB:49;114;112],P3=*[RGB:23;91;88],P4=*[RGB:5;67;64],P5=*[RGB:35;54;100],P6=*[RGB:62;82;126],P7=*[RGB:101;117;153]}%
+\pgfPTMlibexample{%
+\bs{pgfPTPeriodColors}\lb\red{example}\rb\lb\red{P1=*[RGB:86;139;137],P2=*[RGB:49;114;112],
+P3=*[RGB:23;91;88],P4=*[RGB:5;67;64],P5=*[RGB:35;54;100],
+P6=*[RGB:62;82;126],P7=*[RGB:101;117;153]}\rb%
+\\ \pgfPTMmacro{pgfPT}[back color scheme=example,show title=false]%
+}{%
+\scalebox{.425}{\pgfPT[back color scheme=example,show title=false]}%
+}% -----
+\vfill\pgfPTPeriodColors{example}{top color=*[Hsb:117;.57;.6]}%
+\pgfPTMlibexample{%
+\bs{pgfPTPeriodColors}\lb\red{example}\rb\lb\red{top color=*[Hsb:117;.57;.6]}\rb%
+\\ \pgfPTMmacro{pgfPT}[back color scheme=example,show title=false]%
+}{%
+\scalebox{.425}{\pgfPT[back color scheme=example,show title=false]}%
+}% -----
+\vfill\pgfPTPeriodColors{example}{gradient={P1=*[Hsb:117;.57;.6],P5=*[Hsb:178;.57;.45]}}%
+\pgfPTMlibexample{%
+\bs{pgfPTPeriodColors}\lb\red{example}\rb\lb\red{gradient=\{P1=*[Hsb:117;.57;.6], P5=*[Hsb:178;.57;.45]\}}\rb%
+\\ \pgfPTMmacro{pgfPT}[back color scheme=example,show title=false]%
+}{%
+\scalebox{.425}{\pgfPT[back color scheme=example,show title=false]}%
+}% -----
+\newpage%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\def\tmpSectionIII{\bs{pgfPTCScombine}}%
+\def\tmpSection{\bs{pgfPTCScombine}\lp\red{prop1:prop2,mode}\rp\lb\red{name of color scheme one,name of color\\ \hfill scheme two,name of the new color scheme}\rb}%
+\subsubsection*{}{\pgfPTMlibsubsubsection{\tmpSection}}%
+\label{command:pgfPTCScombine}\addcontentsline{toc}{subsubsection}{\texorpdfstring{\tmpSectionIII{}}{\textbackslash pgfPTCScombine}}%
+\index{LIBRARIES@\textbf{\cyan{LIBRARIES}}!colorschemes@\textbf{\red{Color Schemes Library}}!\tmpSectionIII}%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\\ [10pt]This command \textbf{combines two named Color Schemes} and merges the result in a new Color Scheme with \red{name of the new color scheme}.
+\\ For example \bs{pgfPTCScombine}\lb\red{myCSA,myCSB,myCSC}\rb\ adds the color scheme \red{myCSA} to the color scheme \red{myCSB} and their sum will be available as the color scheme \red{myCSC}.
+\\ [3pt]\blue{\textbf{NOTE}}: if the Color Schemes have different sizes (\ie, different number of colors), the last color from the color scheme that ends first will be used until the other color scheme also ends.
+\\ [3pt]The optional parameters \lp\red{prop1:prop2,mode}\rp\ are for controlling how the two Color Schemes are combined:
+\vspace{4pt}%
+\begin{itemlist}
+\item The first parameter -- \red{prop1:prop2} -- controls the proportions used to mix the color schemes: \red{prop1} parts of \red{name of color scheme one} and \red{prop2} parts of \red{name of color} \red{scheme two}.  Both \red{prop1} and \red{prop2} must be integer values between 1 and 999.
+\\ [3pt]\blue{\textbf{NOTE}}: default proportion is \red{1:1}.
+\\ For example, \red{1:4} \dcyan{\textit{will mix each color in the ratio of 1 to 4, \ie, the nth-color from the first color scheme is used as 1/5 of the mixed color and the nth-color from the second color scheme is used as 4/5 of the mixed color}}.
+\item The \red{mode} refers to how the colors are mixed: use \red{add} for \textit{additive} mixing, \red{sub} for \textit{subtractive} mixing and \red{linear} for \textit{linear} mixing (as in the \texttt{\large xcolor} package).
+\\ [3pt]\blue{\textbf{NOTE}}: default mode is \red{linear}.
+\end{itemlist}
+\vspace{4pt}%
+% examples --------
+\pgfPTPeriodColors{period}{top color=red}%
+\pgfPTGroupColors{group}{right color=green}%
+\pgfPTCScombine{period,group,mix}%
+\pgfPTMlibexample{%
+\bs{pgfPTPeriodColors}\lb\red{period}\rb\lb\red{top color=red}\rb%
+\\ \bs{pgfPTGroupColors}\lb\red{group}\rb\lb\red{right color=green}\rb%
+\\ \bs{pgfPTCScombine}\lb\red{period,group,mix}\rb%
+\\ \pgfPTMmacro{pgfPT}[back color scheme=mix,show title=false]%
+}{%
+\scalebox{.425}{\pgfPT[back color scheme=mix,show title=false]}%
+}% -----
+\newpage\pgfPTCScombine[sub]{period,group,mix}%
+\pgfPTMlibexample{%
+\bs{pgfPTCScombine}\lp\red{sub}\rp\lb\red{period,group,mix}\rb%
+\\ \pgfPTMmacro{pgfPT}[back color scheme=mix,show title=false]%
+}{%
+\scalebox{.425}{\pgfPT[back color scheme=mix,show title=false]}%
+}% -----
+\vfill\pgfPTCScombine[add]{period,group,mix}%
+\pgfPTMlibexample{%
+\bs{pgfPTCScombine}\lp\red{add}\rp\lb\red{period,group,mix}\rb%
+\\ \pgfPTMmacro{pgfPT}[back color scheme=mix,show title=false]%
+}{%
+\scalebox{.425}{\pgfPT[back color scheme=mix,show title=false]}%
+}% -----
+\vfill\pgfPTCScombine[3:1]{period,group,mix}%
+\pgfPTMlibexample{%
+\bs{pgfPTCScombine}\lp\red{3:1}\rp\lb\red{period,group,mix}\rb%
+\\ \pgfPTMmacro{pgfPT}[back color scheme=mix,show title=false]%
+}{%
+\scalebox{.425}{\pgfPT[back color scheme=mix,show title=false]}%
+}% -----
+\newpage\pgfPTCScombine[3:1,add]{period,group,mix}%
+\pgfPTMlibexample{%
+\bs{pgfPTCScombine}\lp\red{3:1,add}\rp\lb\red{period,group,mix}\rb%
+\\ \pgfPTMmacro{pgfPT}[back color scheme=mix,show title=false]%
+}{%
+\scalebox{.425}{\pgfPT[back color scheme=mix,show title=false]}%
+}% -----
+\vfill\pgfPTCScombine[add,2:3]{period,group,mix}%
+\pgfPTMlibexample{%
+\bs{pgfPTCScombine}\lp\red{add,2:3}\rp\lb\red{period,group,mix}\rb%
+\\ \pgfPTMmacro{pgfPT}[back color scheme=mix,show title=false]%
+}{%
+\scalebox{.425}{\pgfPT[back color scheme=mix,show title=false]}%
+}% -----
+\vfill\pgfPTCScombine[add]{Soft,group,mix}%
+\textit{Built-in color schemes can also be mixed}:
+\\ [10pt]\pgfPTMlibexample{%
+\bs{pgfPTCScombine}\lp\red{add}\rp\lb\red{Soft,group,mix}\rb%
+\\ \pgfPTMmacro{pgfPT}[back color scheme=mix,show title=false]%
+}{%
+\scalebox{.425}{\pgfPT[back color scheme=mix,show title=false]}%
+}% -----
+\newpage\pgfPTCScombine[add,3:1]{Soft,PS,mix}%
+\pgfPTMlibexample{%
+\bs{pgfPTCScombine}\lp\red{add,3:1}\rp\lb\red{Soft,PS,mix}\rb%
+\\ \pgfPTMmacro{pgfPT}[back color scheme=mix,show title=false]%
+}{%
+\scalebox{.425}{\pgfPT[back color scheme=mix,show title=false]}%
+}% -----
+\\ [4pt]\pgfPTCScombine{Radio,Wikipedia,mix}%
+\pgfPTMlibexample{%
+\bs{pgfPTCScombine}\lp\red{add}\rp\lb\red{Radio,Wikipedia,mix}\rb%
+\\ \pgfPTMmacro{pgfPT}[back color scheme=mix,show title=false]%
+}{%
+\scalebox{.425}{\pgfPT[back color scheme=mix,show title=false]}%
+}% -----
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\def\tmpSectionIV{\bs{pgfPTCSwrite}}%
+\def\tmpSection{\bs{pgfPTCSwrite}\lp\red{filename}\rp\lb\red{list of color schemes names}\rb}%
+\subsubsection*{}{\pgfPTMlibsubsubsection{\tmpSection}}%
+\label{command:pgfPTGroupColors}\addcontentsline{toc}{subsubsection}{\texorpdfstring{\tmpSectionIV{}}{\textbackslash pgfPTCSwrite}}%
+\index{LIBRARIES@\textbf{\cyan{LIBRARIES}}!colorschemes@\textbf{\red{Color Schemes Library}}!\tmpSectionIV}%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\\ [10pt]This command \textbf{writes the provided Color Schemes to a file} for later use without loading this library. It has a mandatory argument, the \red{list of the color schemes names} to be written and an optional argument, the \red{filename}. If no \red{filename} is provided the first name on the \red{list of the color schemes names} is used.
+\\ For example, \bs{pgfPTCSwrite}\lp\red{myGroupColors}\rp\lb\red{myGroupGradGreenToRed,myGroupGreens, myGroupGradYellowToRed}\rb, \dcyan{\textit{will create (or overwrite), in the current working directory, a file with name} \texttt{\large myGroupColors.tex} \textit{with the follwing contents}}:
+\mymfbox{\textsf{%
+\textbackslash pgfPTnewColorScheme\{myGroupGradGreenToRed\}\{0/1/0,\myldots%
+\\ \textbackslash pgfPTnewColorScheme\{myGroupGreens\}\{0/1/.1,\myldots%
+\\ \textbackslash pgfPTnewColorScheme\{myGroupGradYellowToRed\}\{1/1/0,\myldots}%
+}%
+After that, it's possible to use \texttt{\large\textbackslash input\{myGroupColors.tex\}}, anywhere in any document (in the same working directory). The named color schemes defined in the loaded file are now available for use as usual:
+% examples --------
+\\ \pgfPTGroupColors{myGroupGradGreenToRed}{gradient={G1=green!50!black,G18=red!30!black},H=green!40!white}%
+\pgfPTGroupColors{myGroupGreens}{gradient={G1=green!50!black,G18=green!50!white},H=green!40!white}%
+\pgfPTGroupColors{myGroupGradYellowToRed}{gradient={G1=yellow!50!white,G18=red!30!black},H=yellow!40!white}%
+\pgfPTCSwrite[myGroupColors]{myGroupGradGreenToRed,myGroupGreens,myGroupGradYellowToRed}%
+\begin{tikzpicture}%
+\node[below right,text width=\textwidth-.6666em,draw=cyan!50!black,rounded corners=2pt,left color=black!10,right color=black!14] (a) at (0,0) {%
+\bs{pgfPTPeriodColors}\lb\red{myGroupGradGreenToRed}\rb\lb\red{gradient=\{G1=green!50!black, G18=red!30!black\},H=green!40!white}\rb%
+\\ \bs{pgfPTPeriodColors}\lb\red{myGroupGreens}\rb\lb\red{gradient=\{G1=green!50!black, G18=green!50!white\},H=green!40!white}\rb%
+\\ \bs{pgfPTPeriodColors}\lb\red{myGroupGradYellowToRed}\rb\lb\red{gradient=\{G1=yellow!50!white, G18=red!30!black\},H=yellow!40!white}\rb%
+\\ \bs{pgfPTCSwrite}\lp\red{myGroupColors}\rp\lb\red{myGroupGradGreenToRed,myGroupGreens, myGroupGradYellowToRed}\rb
+};%
+\end{tikzpicture}%
+\\ [4pt]\pgfPTMlibexample{%
+\gray{\%\textbackslash usepgfPTlibrary\{colorschemes\}}%
+\\ \bs{input}\lb\dcyan{myGroupColors.tex}\rb\gray{\%}%
+\\ \pgfPTMmacro{pgfPT}[back color scheme=myGroupGreens,show title=false]%
+}{%
+\scalebox{.5}{\pgfPT[back color scheme=myGroupGreens,show title=false]}%
+}%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\endinput


Property changes on: branches/branch2022.final/Master/texmf-dist/doc/latex/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_libCS.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: branches/branch2022.final/Master/texmf-dist/doc/latex/pgf-periodictable/manualfiles/pgfPTmanual.macros.tex
===================================================================
--- branches/branch2022.final/Master/texmf-dist/doc/latex/pgf-periodictable/manualfiles/pgfPTmanual.macros.tex	2023-02-21 20:52:23 UTC (rev 66034)
+++ branches/branch2022.final/Master/texmf-dist/doc/latex/pgf-periodictable/manualfiles/pgfPTmanual.macros.tex	2023-02-21 20:53:00 UTC (rev 66035)
@@ -2,7 +2,7 @@
 % Definitions for pgf-PeriodicTable Manual
 % Hugo Gomes @ 08/11/2022 v1.0.1
 % Hugo Gomes @ 10/10/2022 v1.0.0
-\def\pgfPTversion{1.0.1}%
+\def\pgfPTversion{2.0.0}%
 \def\pgfPTnewinversion#1{new in v#1}%
 \def\pgfPTchangedinversion#1{changed in v#1}%
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -65,6 +65,7 @@
 \usepackage{amssymb}
 \usepackage{amsmath}
 \usepackage{tabularx}
+\usepackage{calc}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \makeatletter%
 \renewenvironment{theindex}%
@@ -85,9 +86,14 @@
                {\if at restonecol\onecolumn\else\clearpage\fi}%
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \def\pack{\large\texttt{\color{blue!70!black}pgf-PeriodicTable}\normalsize}%
+\def\txttt#1{\large\texttt{#1}\normalsize}%
 \def\txttikz{{\fontfamily{cmr}\selectfont Ti\emph{k}Z}}%
-\def\ie{\textit{i.e.\/}}
+\def\ie{\textit{i.e.\/}}%
+\def\eg{\textit{e.g.\/}}%
 \def\myldots{\tikz{\fill (0,0) circle(.6pt);\fill (2.4pt,0) circle(.6pt);\fill (4.8pt,0) circle(.6pt);}}%
+\def\cyan#1{\textcolor{cyan!50!black}{#1}}%
+\def\dcyan#1{\textcolor{cyan!30!black}{#1}}%
+\def\gray#1{\textcolor{black!50}{#1}}%
 \def\blue#1{\textcolor{blue!50!black}{#1}}%
 \def\lblue#1{\textcolor{blue!70!black}{#1}}%
 \def\green#1{\textcolor{green!50!black}{#1}}%
@@ -163,6 +169,11 @@
   colframe=cyan!50!black,coltext=cyan!25!black,colback=cyan!10!white,fontupper=\scriptsize,%
   overlay={\begin{tcbclipinterior}\fill[cyan!50!white] (frame.south west)%
     rectangle node[text=white,font=\scriptsize\bfseries,anchor=mid] {USAGE:} ([xshift=15mm]frame.north west);\end{tcbclipinterior}}}
+\newtcbox{\uselib}{enhanced,nobeforeafter,tcbox raise base,boxrule=0.4pt,top=0mm,bottom=0mm,%
+  right=0mm,left=15mm,arc=1pt,boxsep=2pt,%
+  colframe=cyan!50!black,coltext=cyan!25!black,colback=cyan!10!white,fontupper=\small,%
+  overlay={\begin{tcbclipinterior}\fill[cyan!50!white] (frame.south west)%
+    rectangle node[text=white,font=\small\bfseries,anchor=mid] {USAGE: } ([xshift=15mm]frame.north west);\end{tcbclipinterior}}}%
 \newcommand\mymfbox[2][gray]{\begin{tcolorbox}
 [breakable,enhanced,arc=2.5pt,outer arc=2.5pt,colback=#1!10!white,colframe=#1!50!black,boxsep=3pt,left=3pt,right=3pt,top=3pt,bottom=3pt,boxrule=1pt]
 #2\end{tcolorbox}}
@@ -362,6 +373,42 @@
 \node[text width=\wdbiv+.55\boxinnersep] at ([xshift=-1pt]unit.north east) {\usebox3};
 \end{tikzpicture}%
 }%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% LIBRARIES
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\def\pgfPTlib#1#2{\begingroup\renewcommand{\hrulefill}{\leavevmode\leaders\hrule height 1pt\hfill\kern0pt}%
+\renewcommand{\dotfill}{\leavevmode\cleaders\hbox to 1.0em{\hss --\hss }\hfill\kern0pt}%
+\setbox0=\hbox{\ pgf-PeriodicTable Library \red{\hypertarget{lib:#1}{#1}}\ }%
+\raisebox{.25\ht0}{\makebox[.1125\linewidth][s]{\color{cyan!50!black}\hrulefill}}%
+\hspace{-.1125\linewidth}\raisebox{.25\ht0+1.75pt}{\makebox[.1125\linewidth][s]{\color{cyan!70!black}\hrulefill}}%
+\usebox0%
+\raisebox{.25\ht0}{\makebox[.8875\linewidth-\wd0][s]{\color{cyan!50!black}\hrulefill}}%
+\hspace{-.8875\linewidth}\hspace{\wd0}\raisebox{.25\ht0+1.75pt}{\makebox[.8875\linewidth-\wd0][s]{\color{cyan!70!black}\hrulefill}}%
+\\ [12pt]\makebox[8pt][s]{}\uselib{\bs{usepgfPTlibrary}\lb\red{#1}\rb}%
+\\ [12pt]\makebox[\linewidth][s]{\color{cyan!50!black}\dotfill}%
+\\ [6pt]\makebox[8pt][s]{}\begin{minipage}{\linewidth-16pt}#2\end{minipage}%
+\\ [6pt]\makebox[\linewidth][s]{\color{cyan!70!black}\hrulefill}\hspace{-\linewidth}%
+\raisebox{1.75pt}{\makebox[\linewidth][s]{\color{cyan!50!black}\hrulefill}}\endgroup%
+}%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\def\pgfPTMlibsubsubsection#1{%
+\tikz{\node[cyan!50!black,font=\large] (ding) at (0,0) {\ding{224} };%
+\node[fill=cyan!5!white,text width={\linewidth-14.68799pt-1em},below right] (txt) at ([yshift=1pt]ding.north east) {#1};%
+\draw[cyan!50!black] (txt.north west) -- (txt.north east);%
+\draw[cyan!50!black] (txt.south west) -- (txt.south east);%
+}}%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \pgfPTMlibexample{codetxt}{code}
+\def\pgfPTMlibexample#1#2{\ignorespaces%
+\begin{tikzpicture}%
+\node[below right,text width=\textwidth-.6666em,rounded corners=2pt,left color=black!10,right color=black!14] (a) at (0,0) {#1};%
+\node[below right,text width=\textwidth-.6666em,text centered] (c) at (a.south west) {#2};%
+\begin{pgfonlayer}{back}%
+%\path[left color=black!5!cyan!12,right color=teal!12!white,draw=cyan!50!black,rounded corners=2pt] (a.north west) rectangle (c.south east);%
+\path[left color=white,right color=cyan!4,draw=cyan!50!black,rounded corners=2pt] (a.north west) rectangle (c.south east);%
+\end{pgfonlayer}%
+\end{tikzpicture}%
+}%
 \makeatother%
 %
 \endinput%

Modified: branches/branch2022.final/Master/texmf-dist/doc/latex/pgf-periodictable/pgf-PeriodicTableManual.pdf
===================================================================
(Binary files differ)

Modified: branches/branch2022.final/Master/texmf-dist/doc/latex/pgf-periodictable/pgf-PeriodicTableManual.tex
===================================================================
--- branches/branch2022.final/Master/texmf-dist/doc/latex/pgf-periodictable/pgf-PeriodicTableManual.tex	2023-02-21 20:52:23 UTC (rev 66034)
+++ branches/branch2022.final/Master/texmf-dist/doc/latex/pgf-periodictable/pgf-PeriodicTableManual.tex	2023-02-21 20:53:00 UTC (rev 66035)
@@ -1,6 +1,7 @@
 \documentclass[a4paper,10pt,oneside,openany,fleqno]{article}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \usepackage{pgf-PeriodicTable}
+\usepgfPTlibrary{colorschemes}%
 \input{manualfiles/pgfPTmanual.macros.tex}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \title{Manual for pgf-PeriodicTable \pgfPTversion}
@@ -115,6 +116,7 @@
 \newpage%
 \label{file:variations}%
 \input{manualfiles/pgf-PeriodicTableManual_variations.tex}%
+\newpage%
 \label{file:DarkMode}%
 \input{manualfiles/pgf-PeriodicTableManual_DarkMode.tex}%
 \label{file:exerciselayout}%
@@ -149,6 +151,11 @@
 \section{\texorpdfstring{Designing color schemes}{Designing color schemes}}
 \label{file:DesignCS}%
 \input{manualfiles/pgf-PeriodicTableManual_DesignCS.tex}%
+\newpage\ \vspace{1.5cm}%
+\section{Libraries}
+In this part the \hypertarget{sec:lib}{library} packages are documented. They provide additional commands to extend the capabilities provided by this package out of the box. The libraries are not loaded by default since many users will not need them.
+\\ [1.5cm]%
+\input{manualfiles/pgf-PeriodicTableManual_libCS.tex}%
 \newpage%
 \section{A few more examples}
 \input{manualfiles/pgf-PeriodicTableManual_Examples.tex}%

Added: branches/branch2022.final/Master/texmf-dist/doc/latex/pgf-periodictable/pgfPT.input.library.tex
===================================================================
--- branches/branch2022.final/Master/texmf-dist/doc/latex/pgf-periodictable/pgfPT.input.library.tex	                        (rev 0)
+++ branches/branch2022.final/Master/texmf-dist/doc/latex/pgf-periodictable/pgfPT.input.library.tex	2023-02-21 20:53:00 UTC (rev 66035)
@@ -0,0 +1,52 @@
+% --------------------------------------------------------------------------------------------------
+% subfile of pgf-PeriodicTable package ----------------------------------------------------------
+% --------------------------------------------------------------------------------------------------
+% Macro for loading pgf-PeriodicTable libraries --------------------------------------------------
+% --------------------------------------------------------------------------------------------------
+% --------------------------------------------------------------------------------------------------
+% --------------------------------------------------------------------------------------------------
+%
+%
+% Taken and adapted from pgf ---------------->
+% Library files inclusion
+% Include a library file.
+%
+% #1 = List of names of library file.
+%
+% Description:
+%
+% This command includes a list of library files. For each file X in the
+% list, the file pgfPTlibrary.X.tex is included, provided this has
+% not been done earlier.
+%
+% \usepgfPTlibrary{elements}
+% \usepgflPTibrary[elements,plot]
+%
+\def\usepgfPTlibrary#1{\ignorespaces%
+  \edef\pgfPT at list{#1}%
+  \@for\pgfPT at temp:=\pgfPT at list\do{%
+    \ifx\pgfPT at temp\@empty\relax%
+    \else%
+      \expandafter\ifx\csname pgfPT at library@\pgfPT at temp @loaded\endcsname\relax%
+      \expandafter\let\csname pgfPT at library@\pgfPT at temp @loaded\endcsname=\@empty%
+      \expandafter\edef\csname pgfPT at library@#1 at atcode\endcsname{\the\catcode`\@}%
+      \expandafter\edef\csname pgfPT at library@#1 at barcode\endcsname{\the\catcode`\|}%
+      \expandafter\edef\csname pgfPT at library@#1 at dollarcode\endcsname{\the\catcode`\$}%
+      \catcode`\@=11%
+      \catcode`\|=12%
+      \catcode`\$=3%
+      \pgfutil at InputIfFileExists{pgfPTlibrary.\pgfPT at temp.tex}{}{%
+          \PackageError{pgfPT}{I did not find the pgfPT library
+            '\pgfPT at temp'. I looked for the file named
+            pgfPTlibrary.\pgfPT at temp.tex, but could not find it in in
+            the current texmf trees.}
+        }%
+      \catcode`\@=\csname pgfPT at library@#1 at atcode\endcsname%
+      \catcode`\|=\csname pgfPT at library@#1 at barcode\endcsname%
+      \catcode`\$=\csname pgfPT at library@#1 at dollarcode\endcsname%
+      \fi%
+    \fi%
+  }%
+}%
+% <---------------- Taken and adapted from pgf (pgfutil-common.tex)
+\endinput


Property changes on: branches/branch2022.final/Master/texmf-dist/doc/latex/pgf-periodictable/pgfPT.input.library.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: branches/branch2022.final/Master/texmf-dist/doc/latex/pgf-periodictable/pgfPTlibrary.colorschemes.tex
===================================================================
--- branches/branch2022.final/Master/texmf-dist/doc/latex/pgf-periodictable/pgfPTlibrary.colorschemes.tex	                        (rev 0)
+++ branches/branch2022.final/Master/texmf-dist/doc/latex/pgf-periodictable/pgfPTlibrary.colorschemes.tex	2023-02-21 20:53:00 UTC (rev 66035)
@@ -0,0 +1,1257 @@
+% ---------------------------------------------------------------------------------------
+% subfile of pgf-PeriodicTable package -----------------------------------------------
+% ---------------------------------------------------------------------------------------
+\def\pgfPT at library@colorschemes at loaded{}%
+\message{pgfPT color schemes library loaded!}%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% provide the macros
+%       \pgfPTGroupColors[name of color scheme]{list}
+%       \pgfPTPeriodColors[name of color scheme]{list}
+%       \pgfPTCScombine[prop,mode]{CS one,CS two,CS new}
+%       \pgfPTCSwrite[name]{CSName's list}
+%
+% support for colors -> named color OR named color a!##!named color b OR *[model:values], e.g. *[rgb:.5;.2,;3] ->
+%                             --> (see Table 3: Supported color models on page 10 of the documentation of xcolor v2.14 (2022/06/12)
+%
+% BUBBLE SORT
+% adapted from https://tex.stackexchange.com/questions/481678/apply-a-numeric-bubble-sort-to-output-strings-which-are-specified-by-names-code
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\makeatletter%
+%\pgfPTGroupColors{name of color scheme}{list}
+% ---------------------------------------------------------------------------------------
+% list:
+% left color=<color>,right color=<color>,middle color=<color>
+% or
+% G1=<color>,G2=<color>, ... , G18=<color>
+% or
+% gradient={G<n>=<color>,G<n>=<color>,...,G<n>=<color>}
+%
+% with options:
+%    -> period blending={color=<color>,percentage=<positive or negative integer>,mode=<add,sub,linear>}
+%                   NOTES: the percentage refers to how much of the color, in total, was mixed at the end of the 7 periods;
+%                                               for example 60% adds 10% to each period (P1:0% -> P2:10% -> P3:20% -> ... -> P7:60%)
+%                               if the percentage is positive, the order of the mixture is from P1 to P7
+%                               if the percentage is negative, the mixing order is from P7 to P1
+%    -> H=<color>,La=<color>,Lanta=<color>,Ac=<color>,Actin=<color>
+% ---------------------------------------------------------------------------------------
+\newif\ifpgfPTgradient at TI\newif\ifpgfPTgradient at TII%
+\newif\ifpgfPTusecolor at H%
+\newif\ifpgfPTusecolor at La\newif\ifpgfPTusecolor at Lanta%
+\newif\ifpgfPTusecolor at Ac\newif\ifpgfPTusecolor at Actin%
+\newif\ifpgfPT at blending%
+%
+\def\pgfPTGroupColors{\@ifnextchar[\pgfPT at GroupColors{\pgfPT at GroupColors[white]}}%
+\def\pgfPT at GroupColors[#1]#2#3{\ignorespaces%
+\pgfPTgradient at TIfalse\pgfPTgradient at TIIfalse%
+\pgfPTusecolor at Hfalse%
+\pgfPTusecolor at Lafalse\pgfPTusecolor at Lantafalse%
+\pgfPTusecolor at Acfalse\pgfPTusecolor at Actinfalse%
+\pgfPT at blendingfalse%
+\edef\pgfPTCScolorLEFT{#1}%
+\edef\pgfPTCScolorMIDDLE{}%
+\edef\pgfPTCScolorRIGHT{#1}%
+\edef\pgfPTCScolorH{#1}%
+\edef\pgfPTCScolorGI{#1}%
+\edef\pgfPTCScolorGII{#1}%
+\edef\pgfPTCScolorGIII{#1}%
+\edef\pgfPTCScolorGIV{#1}%
+\edef\pgfPTCScolorGV{#1}%
+\edef\pgfPTCScolorGVI{#1}%
+\edef\pgfPTCScolorGVII{#1}%
+\edef\pgfPTCScolorGVIII{#1}%
+\edef\pgfPTCScolorGIX{#1}%
+\edef\pgfPTCScolorGX{#1}%
+\edef\pgfPTCScolorGXI{#1}%
+\edef\pgfPTCScolorGXII{#1}%
+\edef\pgfPTCScolorGXIII{#1}%
+\edef\pgfPTCScolorGXIV{#1}%
+\edef\pgfPTCScolorGXV{#1}%
+\edef\pgfPTCScolorGXVI{#1}%
+\edef\pgfPTCScolorGXVII{#1}%
+\edef\pgfPTCScolorGXVIII{#1}%
+\edef\pgfPTCScolorLa{#1}%
+\edef\pgfPTCScolorLanta{#1}%
+\edef\pgfPTCScolorAc{#1}%
+\edef\pgfPTCScolorActin{#1}%
+\@for\@pgfPT at tmp:=#3\do{%
+\ifx\@pgfPT at tmp\pgfPT at relax\relax\else\ifx\@pgfPT at tmp\pgfPT at space\relax\else%
+    \edef\pgfPT at handlert@test{period blending}\ifx\@pgfPT at tmp\pgfPT at handlert@test\edef\@pgfPT at tmp{period blending={}}\fi%
+    \pgfPT at temptrue% se acabar os ifx sem encontrar o handler gera a msg de erro...
+    \expandafter\pgfPT at keys@setNameValue\@pgfPT at tmp\relax%
+        \edef\pgfPT at handlert@test{gradient}% gradient... type 1
+        \ifx\pgfPT at handler\pgfPT at handlert@test\pgfPT at tempfalse%
+            \pgfPTgradient at TItrue\pgfPTgradient at TIIfalse\edef\pgfPTCScolorGRADIENT{\pgfPT at handlervalue}%
+        \else%
+        \edef\pgfPT at handlert@test{leftcolor}% gradient... type 2
+        \ifx\pgfPT at handler\pgfPT at handlert@test\pgfPT at tempfalse%
+            \pgfPTgradient at TIItrue\pgfPTgradient at TIfalse\edef\pgfPTCScolorLEFT{\pgfPT at handlervalue}%
+        \else%
+        \edef\pgfPT at handlert@test{middlecolor}% gradient... type 2
+        \ifx\pgfPT at handler\pgfPT at handlert@test\pgfPT at tempfalse%
+            \pgfPTgradient at TIItrue\pgfPTgradient at TIfalse\edef\pgfPTCScolorMIDDLE{\pgfPT at handlervalue}%
+        \else%
+        \edef\pgfPT at handlert@test{rightcolor}% gradient... type 2
+        \ifx\pgfPT at handler\pgfPT at handlert@test\pgfPT at tempfalse%
+            \pgfPTgradient at TIItrue\pgfPTgradient at TIfalse\edef\pgfPTCScolorRIGHT{\pgfPT at handlervalue}%
+        \else%
+        \edef\pgfPT at handlert@test{G1}%
+        \ifx\pgfPT at handler\pgfPT at handlert@test\pgfPT at tempfalse%
+            \edef\pgfPTCScolorGI{\pgfPT at handlervalue}%
+        \else%
+        \edef\pgfPT at handlert@test{G2}%
+        \ifx\pgfPT at handler\pgfPT at handlert@test\pgfPT at tempfalse%
+            \edef\pgfPTCScolorGII{\pgfPT at handlervalue}%
+        \else%
+        \edef\pgfPT at handlert@test{G3}%
+        \ifx\pgfPT at handler\pgfPT at handlert@test\pgfPT at tempfalse%
+            \edef\pgfPTCScolorGIII{\pgfPT at handlervalue}%
+        \else%
+        \edef\pgfPT at handlert@test{G4}%
+        \ifx\pgfPT at handler\pgfPT at handlert@test\pgfPT at tempfalse%
+            \edef\pgfPTCScolorGIV{\pgfPT at handlervalue}%
+        \else%
+        \edef\pgfPT at handlert@test{G5}%
+        \ifx\pgfPT at handler\pgfPT at handlert@test\pgfPT at tempfalse%
+            \edef\pgfPTCScolorGV{\pgfPT at handlervalue}%
+        \else%
+        \edef\pgfPT at handlert@test{G6}%
+        \ifx\pgfPT at handler\pgfPT at handlert@test\pgfPT at tempfalse%
+            \edef\pgfPTCScolorGVI{\pgfPT at handlervalue}%
+        \else%
+        \edef\pgfPT at handlert@test{G7}%
+        \ifx\pgfPT at handler\pgfPT at handlert@test\pgfPT at tempfalse%
+            \edef\pgfPTCScolorGVII{\pgfPT at handlervalue}%
+        \else%
+        \edef\pgfPT at handlert@test{G8}%
+        \ifx\pgfPT at handler\pgfPT at handlert@test\pgfPT at tempfalse%
+            \edef\pgfPTCScolorGVIII{\pgfPT at handlervalue}%
+        \else%
+        \edef\pgfPT at handlert@test{G9}%
+        \ifx\pgfPT at handler\pgfPT at handlert@test\pgfPT at tempfalse%
+            \edef\pgfPTCScolorGIX{\pgfPT at handlervalue}%
+        \else%
+        \edef\pgfPT at handlert@test{G10}%
+        \ifx\pgfPT at handler\pgfPT at handlert@test\pgfPT at tempfalse%
+            \edef\pgfPTCScolorGX{\pgfPT at handlervalue}%
+        \else%
+        \edef\pgfPT at handlert@test{G11}%
+        \ifx\pgfPT at handler\pgfPT at handlert@test\pgfPT at tempfalse%
+            \edef\pgfPTCScolorGXI{\pgfPT at handlervalue}%
+        \else%
+        \edef\pgfPT at handlert@test{G12}%
+        \ifx\pgfPT at handler\pgfPT at handlert@test\pgfPT at tempfalse%
+            \edef\pgfPTCScolorGXII{\pgfPT at handlervalue}%
+        \else%
+        \edef\pgfPT at handlert@test{G13}%
+        \ifx\pgfPT at handler\pgfPT at handlert@test\pgfPT at tempfalse%
+            \edef\pgfPTCScolorGXIII{\pgfPT at handlervalue}%
+        \else%
+        \edef\pgfPT at handlert@test{G14}%
+        \ifx\pgfPT at handler\pgfPT at handlert@test\pgfPT at tempfalse%
+            \edef\pgfPTCScolorGXIV{\pgfPT at handlervalue}%
+        \else%
+        \edef\pgfPT at handlert@test{G15}%
+        \ifx\pgfPT at handler\pgfPT at handlert@test\pgfPT at tempfalse%
+            \edef\pgfPTCScolorGXV{\pgfPT at handlervalue}%
+        \else%
+        \edef\pgfPT at handlert@test{G16}%
+        \ifx\pgfPT at handler\pgfPT at handlert@test\pgfPT at tempfalse%
+            \edef\pgfPTCScolorGXVI{\pgfPT at handlervalue}%
+        \else%
+        \edef\pgfPT at handlert@test{G17}%
+        \ifx\pgfPT at handler\pgfPT at handlert@test\pgfPT at tempfalse%
+            \edef\pgfPTCScolorGXVII{\pgfPT at handlervalue}%
+        \else%
+        \edef\pgfPT at handlert@test{G18}%
+        \ifx\pgfPT at handler\pgfPT at handlert@test\pgfPT at tempfalse%
+            \edef\pgfPTCScolorGXVIII{\pgfPT at handlervalue}%
+        \else%
+        \edef\pgfPT at handlert@test{H}%
+        \ifx\pgfPT at handler\pgfPT at handlert@test\pgfPT at tempfalse%
+            \pgfPTusecolor at Htrue\edef\pgfPTCScolorH{\pgfPT at handlervalue}%
+        \else%
+        \edef\pgfPT at handlert@test{La}%
+        \ifx\pgfPT at handler\pgfPT at handlert@test\pgfPT at tempfalse%
+            \pgfPTusecolor at Latrue\edef\pgfPTCScolorLa{\pgfPT at handlervalue}%
+        \else%
+        \edef\pgfPT at handlert@test{Lanta}%
+        \ifx\pgfPT at handler\pgfPT at handlert@test\pgfPT at tempfalse%
+            \pgfPTusecolor at Lantatrue\edef\pgfPTCScolorLanta{\pgfPT at handlervalue}%
+        \else%
+        \edef\pgfPT at handlert@test{Ac}%
+        \ifx\pgfPT at handler\pgfPT at handlert@test\pgfPT at tempfalse%
+            \pgfPTusecolor at Actrue\edef\pgfPTCScolorAc{\pgfPT at handlervalue}%
+        \else%
+        \edef\pgfPT at handlert@test{Actin}%
+        \ifx\pgfPT at handler\pgfPT at handlert@test\pgfPT at tempfalse%
+            \pgfPTusecolor at Actintrue\edef\pgfPTCScolorActin{\pgfPT at handlervalue}%
+        \else%
+        \edef\pgfPT at handlert@test{periodblending}%
+        \ifx\pgfPT at handler\pgfPT at handlert@test\pgfPT at tempfalse%
+            \pgfPT at blendingtrue\edef\pgfPTblending{\pgfPT at handlervalue}%
+        \else%handler not found
+        \ifpgfPT at temp\PackageError{pgfPT}{\textbackslash pgfPTGroupColors: '\pgfPT at handler'\space in '\detokenize{#3}'\space not known! It will be ignored...}{}\fi\relax%
+        \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
+\fi\fi}% end do
+\ifpgfPTgradient at TI\relax%
+\expandafter\pgfPT at dogradient@TI[1]\pgfPTCScolorGRADIENT\relax%
+\else\ifpgfPTgradient at TII\relax%
+\pgfPT at dogradient@TII[1](\pgfPTCScolorLEFT,\pgfPTCScolorMIDDLE,\pgfPTCScolorRIGHT)%
+\fi\fi%
+\pgfPT at assign@color{\pgfPTCScolorGI}\colorlet{pgfPTinnerGcolorI}{pgfPTassignedcolor}%
+\pgfPT at assign@color{\pgfPTCScolorGII}\colorlet{pgfPTinnerGcolorII}{pgfPTassignedcolor}%
+\pgfPT at assign@color{\pgfPTCScolorGIII}\colorlet{pgfPTinnerGcolorIII}{pgfPTassignedcolor}%
+\pgfPT at assign@color{\pgfPTCScolorGIV}\colorlet{pgfPTinnerGcolorIV}{pgfPTassignedcolor}%
+\pgfPT at assign@color{\pgfPTCScolorGV}\colorlet{pgfPTinnerGcolorV}{pgfPTassignedcolor}%
+\pgfPT at assign@color{\pgfPTCScolorGVI}\colorlet{pgfPTinnerGcolorVI}{pgfPTassignedcolor}%
+\pgfPT at assign@color{\pgfPTCScolorGVII}\colorlet{pgfPTinnerGcolorVII}{pgfPTassignedcolor}%
+\pgfPT at assign@color{\pgfPTCScolorGVIII}\colorlet{pgfPTinnerGcolorVIII}{pgfPTassignedcolor}%
+\pgfPT at assign@color{\pgfPTCScolorGIX}\colorlet{pgfPTinnerGcolorIX}{pgfPTassignedcolor}%
+\pgfPT at assign@color{\pgfPTCScolorGX}\colorlet{pgfPTinnerGcolorX}{pgfPTassignedcolor}%
+\pgfPT at assign@color{\pgfPTCScolorGXI}\colorlet{pgfPTinnerGcolorXI}{pgfPTassignedcolor}%
+\pgfPT at assign@color{\pgfPTCScolorGXII}\colorlet{pgfPTinnerGcolorXII}{pgfPTassignedcolor}%
+\pgfPT at assign@color{\pgfPTCScolorGXIII}\colorlet{pgfPTinnerGcolorXIII}{pgfPTassignedcolor}%
+\pgfPT at assign@color{\pgfPTCScolorGXIV}\colorlet{pgfPTinnerGcolorXIV}{pgfPTassignedcolor}%
+\pgfPT at assign@color{\pgfPTCScolorGXV}\colorlet{pgfPTinnerGcolorXV}{pgfPTassignedcolor}%
+\pgfPT at assign@color{\pgfPTCScolorGXVI}\colorlet{pgfPTinnerGcolorXVI}{pgfPTassignedcolor}%
+\pgfPT at assign@color{\pgfPTCScolorGXVII}\colorlet{pgfPTinnerGcolorXVII}{pgfPTassignedcolor}%
+\pgfPT at assign@color{\pgfPTCScolorGXVIII}\colorlet{pgfPTinnerGcolorXVIII}{pgfPTassignedcolor}%
+\ifpgfPTusecolor at H\pgfPT at assign@color{\pgfPTCScolorH}\else\pgfPT at assign@color{\pgfPTCScolorGI}\fi%
+\colorlet{pgfPTinnerGcolorH}{pgfPTassignedcolor}%
+\ifpgfPTusecolor at La\pgfPT at assign@color{\pgfPTCScolorLa}\else\pgfPT at assign@color{\pgfPTCScolorGIII}\fi%
+\colorlet{pgfPTinnerGcolorLa}{pgfPTassignedcolor}%
+\ifpgfPTusecolor at Lanta\pgfPT at assign@color{\pgfPTCScolorLanta}\else\pgfPT at assign@color{\pgfPTCScolorGIII}\fi%
+\colorlet{pgfPTinnerGcolorLanta}{pgfPTassignedcolor}%
+\ifpgfPTusecolor at Ac\pgfPT at assign@color{\pgfPTCScolorAc}\else\pgfPT at assign@color{\pgfPTCScolorGIII}\fi%
+\colorlet{pgfPTinnerGcolorAc}{pgfPTassignedcolor}%
+\ifpgfPTusecolor at Actin\pgfPT at assign@color{\pgfPTCScolorActin}\else\pgfPT at assign@color{\pgfPTCScolorGIII}\fi%
+\colorlet{pgfPTinnerGcolorActin}{pgfPTassignedcolor}%
+\ifpgfPT at blending%
+    % blending={color=<color>,percentage=<positive or negative integer>,mode=<add|sub|linear>}
+    \edef\pgfPTblending at color@r{1}%
+    \edef\pgfPTblending at color@g{1}%
+    \edef\pgfPTblending at color@b{1}%
+    \edef\pgfPTblending at percentage@step{10}%
+    \edef\pgfPTblending at percentage@sign{1}%
+    \edef\pgfPTblending at mode{2}%
+    \ifx\pgfPTblending\pgfPT at relax\relax\else%
+    \@for\@pgfPT at tmp:=\pgfPTblending\do{%
+                \pgfPT at temptrue% se acabar os ifx sem encontrar o handler gera a msg de erro...
+                \expandafter\pgfPT at keys@setNameValue\@pgfPT at tmp\relax%
+                \edef\pgfPT at handlert@test{color}%
+                \ifx\pgfPT at handler\pgfPT at handlert@test\pgfPT at tempfalse%
+                    \colorlet{pgfPTtmpc at lor}[rgb]{\pgfPT at handlervalue}
+                    \pgfPT at extract@rgb at fill{pgfPTtmpc at lor}%
+                    \edef\pgfPTblending at color@r{\pgfPT at rf}%
+                    \edef\pgfPTblending at color@g{\pgfPT at gf}%
+                    \edef\pgfPTblending at color@b{\pgfPT at bf}%
+                \else%
+                \edef\pgfPT at handlert@test{percentage}%
+                \ifx\pgfPT at handler\pgfPT at handlert@test\pgfPT at tempfalse%
+                    \pgfmathparse{int(abs(\pgfPT at handlervalue))}\edef\pgfPTblending at percentage{\pgfmathresult}%
+                    \ifnum\pgfPTblending at percentage>100\relax%
+                        \PackageError{pgfPT}{\textbackslash pgfPTGroupColors::period blending percentage: '\pgfPT at handlervalue'\space in '\detokenize{\pgfPTblending}'\space to high! Default blending percentage (60) will be used...}{}\relax%
+                        \edef\pgfPT at handlervalue{60}%
+                    \fi%
+                    \pgfmathparse{int(abs(\pgfPT at handlervalue/6))}\edef\pgfPTblending at percentage@step{\pgfmathresult}%
+                    \pgfmathparse{sign(\pgfPT at handlervalue)}\edef\pgfPTblending at percentage@sign{\pgfmathresult}%
+                \else%
+                \edef\pgfPT at handlert@test{mode}%
+                \ifx\pgfPT at handler\pgfPT at handlert@test\pgfPT at tempfalse%
+                    \edef\pgfPTblending at mode@tmp{add}%
+                    \ifx\pgfPTblending at mode@tmp\pgfPT at handlervalue%
+                        \edef\pgfPTblending at mode{0}%
+                    \else%
+                    \edef\pgfPTblending at mode@tmp{sub}%
+                    \ifx\pgfPTblending at mode@tmp\pgfPT at handlervalue%
+                        \edef\pgfPTblending at mode{1}%
+                    \else%
+                    \edef\pgfPTblending at mode@tmp{linear}%
+                    \ifx\pgfPTblending at mode@tmp\pgfPT at handlervalue%
+                        \edef\pgfPTblending at mode{2}%
+                    \else%
+                        \PackageError{pgfPT}{\textbackslash pgfPTGroupColors::period blending mode: '\pgfPT at handlervalue'\space in '\detokenize{\pgfPTblending}'\space not known! Default blending mode (add) will be used...}{}\relax%
+                    \fi\fi\fi%
+                \else%handler not found
+                    \ifpgfPT at temp\PackageError{pgfPT}{\textbackslash pgfPTGroupColors::period blending: '\pgfPT at handler'\space in '\detokenize{\pgfPTblending}'\space not known! Default value will be used...}{}\fi\relax%
+                \fi\fi\fi%
+                }% end do
+    \fi% \ifx\pgfPTblending\pgfPT at relax
+\fi%
+\@for\@pgfPT at tmp:={I,II,III,IV,V,VI,VII,VIII,IX,X,XI,XII,XIII,XIV,XV,XVI,XVII,XVIII,H,La,Lanta,Ac,Actin}%
+\do{%
+        \pgfPT at extract@rgb at fill{pgfPTinnerGcolor\@pgfPT at tmp}%
+        \edef\pgfPTinnercolor at r{\pgfPT at rf}%
+        \edef\pgfPTinnercolor at g{\pgfPT at gf}%
+        \edef\pgfPTinnercolor at b{\pgfPT at bf}%
+        \expandafter\edef\csname pgfPTinnerGcolor\@pgfPT at tmp\endcsname{\pgfPTinnercolor at r/\pgfPTinnercolor at g/\pgfPTinnercolor at b}%
+        }%
+\edef\pgfPT at backCS@GroupColorsList{BEGIN}%
+\pgfPT at countf=1%
+\def\pgfPT at get@rgb##1/##2/##3\relax{\edef\pgfPT at tmpc@lor at r{##1}\edef\pgfPT at tmpc@lor at g{##2}\edef\pgfPT at tmpc@lor at b{##3}}%
+\@for\@pgfPT at tmp:={H,XVIII,I,II,XIII,XIV,XV,XVI,XVII,XVIII,I,II,XIII,XIV,XV,XVI,XVII,XVIII,I,II,III,IV,V,VI,VII,VIII,IX,X,XI,XII,XIII,XIV,XV,XVI,XVII,XVIII,I,II,III,IV,V,VI,VII,VIII,IX,X,XI,XII,XIII,XIV,XV,XVI,XVII,XVIII,I,II,La,Lanta,Lanta,Lanta,Lanta,Lanta,Lanta,Lanta,Lanta,Lanta,Lanta,Lanta,Lanta,Lanta,Lanta,IV,V,VI,VII,VIII,IX,X,XI,XII,XIII,XIV,XV,XVI,XVII,XVIII,I,II,Ac,Actin,Actin,Actin,Actin,Actin,Actin,Actin,Actin,Actin,Actin,Actin,Actin,Actin,Actin,IV,V,VI,VII,VIII,IX,X,XI,XII,XIII,XIV,XV,XVI,XVII,XVIII}%
+\do{%
+    \ifpgfPT at blending\relax% blending
+        \ifnum\pgfPTblending at percentage@sign=1\relax%
+            \ifnum\pgfPT at countf<3\relax% P1
+                \edef\pgfPT at blending@prop at i{100}%
+                \edef\pgfPT at blending@prop at ii{0}%
+            \else\ifnum\pgfPT at countf<11\relax% P2
+                \pgfmathparse{int(100-\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at i{\pgfmathresult}%
+                \edef\pgfPT at blending@prop at ii{\pgfPTblending at percentage@step}%
+            \else\ifnum\pgfPT at countf<19\relax% P3
+                \pgfmathparse{int(100-2*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at i{\pgfmathresult}%
+                \pgfmathparse{int(2*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at ii{\pgfmathresult}%
+            \else\ifnum\pgfPT at countf<37\relax% P4
+                \pgfmathparse{int(100-3*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at i{\pgfmathresult}%
+                \pgfmathparse{int(3*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at ii{\pgfmathresult}%
+            \else\ifnum\pgfPT at countf<55\relax% P5
+                \pgfmathparse{int(100-4*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at i{\pgfmathresult}%
+                \pgfmathparse{int(4*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at ii{\pgfmathresult}%
+            \else\ifnum\pgfPT at countf<87\relax% P6
+                \ifnum\pgfPT at countf<57\relax%
+                \pgfmathparse{int(100-5*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at i{\pgfmathresult}%
+                \pgfmathparse{int(5*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at ii{\pgfmathresult}%
+                \else\ifnum\pgfPT at countf=57\relax% La
+                    \ifpgfPTusecolor at La%
+                        \edef\pgfPT at blending@prop at i{100}%
+                        \edef\pgfPT at blending@prop at ii{0}%
+                    \else%
+                        \pgfmathparse{int(100-5*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at i{\pgfmathresult}%
+                        \pgfmathparse{int(5*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at ii{\pgfmathresult}%
+                    \fi%
+                \else\ifnum\pgfPT at countf<72\relax% Lanta
+                    \ifpgfPTusecolor at Lanta%
+                        \edef\pgfPT at blending@prop at i{100}%
+                        \edef\pgfPT at blending@prop at ii{0}%
+                    \else%
+                        \pgfmathparse{int(100-5*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at i{\pgfmathresult}%
+                        \pgfmathparse{int(5*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at ii{\pgfmathresult}%
+                    \fi%
+                \else%
+                \pgfmathparse{int(100-5*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at i{\pgfmathresult}%
+                \pgfmathparse{int(5*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at ii{\pgfmathresult}%
+                \fi\fi\fi%
+            \else% P7
+                \ifnum\pgfPT at countf<89\relax%
+                \pgfmathparse{int(100-6*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at i{\pgfmathresult}%
+                \pgfmathparse{int(6*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at ii{\pgfmathresult}%
+                \else\ifnum\pgfPT at countf=89\relax% Ac
+                    \ifpgfPTusecolor at Ac%
+                        \edef\pgfPT at blending@prop at i{100}%
+                        \edef\pgfPT at blending@prop at ii{0}%
+                    \else%
+                        \pgfmathparse{int(100-6*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at i{\pgfmathresult}%
+                        \pgfmathparse{int(6*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at ii{\pgfmathresult}%
+                    \fi%
+                \else\ifnum\pgfPT at countf<104\relax% Actin
+                    \ifpgfPTusecolor at Actin%
+                        \edef\pgfPT at blending@prop at i{100}%
+                        \edef\pgfPT at blending@prop at ii{0}%
+                    \else%
+                        \pgfmathparse{int(100-6*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at i{\pgfmathresult}%
+                        \pgfmathparse{int(6*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at ii{\pgfmathresult}%
+                    \fi%
+                \else%
+                \pgfmathparse{int(100-6*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at i{\pgfmathresult}%
+                \pgfmathparse{int(6*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at ii{\pgfmathresult}%
+                \fi\fi\fi%
+                \fi\fi\fi\fi\fi\fi%
+        \else% \pgfPTblending at percentage@sign=-1
+            \ifnum\pgfPT at countf<3\relax% P1
+                \ifnum\pgfPT at countf<2\relax% H
+                    \ifpgfPTusecolor at H%
+                    \edef\pgfPT at blending@prop at i{100}%
+                    \edef\pgfPT at blending@prop at ii{0}%
+                    \else%
+                    \pgfmathparse{int(100-6*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at i{\pgfmathresult}%
+                    \pgfmathparse{int(6*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at ii{\pgfmathresult}%
+                    \fi%
+                \else%
+                \pgfmathparse{int(100-6*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at i{\pgfmathresult}%
+                \pgfmathparse{int(6*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at ii{\pgfmathresult}%
+                \fi%
+            \else\ifnum\pgfPT at countf<11\relax% P2
+                \pgfmathparse{int(100-5*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at i{\pgfmathresult}%
+                \pgfmathparse{int(5*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at ii{\pgfmathresult}%
+            \else\ifnum\pgfPT at countf<19\relax% P3
+                \pgfmathparse{int(100-4*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at i{\pgfmathresult}%
+                \pgfmathparse{int(4*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at ii{\pgfmathresult}%
+            \else\ifnum\pgfPT at countf<37\relax% P4
+                \pgfmathparse{int(100-3*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at i{\pgfmathresult}%
+                \pgfmathparse{int(3*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at ii{\pgfmathresult}%
+            \else\ifnum\pgfPT at countf<55\relax% P5
+                \pgfmathparse{int(100-2*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at i{\pgfmathresult}%
+                \pgfmathparse{int(2*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at ii{\pgfmathresult}%
+            \else\ifnum\pgfPT at countf<87\relax% P6
+                \ifnum\pgfPT at countf<57\relax%
+                \pgfmathparse{int(100-\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at i{\pgfmathresult}%
+                \pgfmathparse{int(\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at ii{\pgfmathresult}%
+                \else\ifnum\pgfPT at countf=57\relax% La
+                    \ifpgfPTusecolor at La%
+                        \edef\pgfPT at blending@prop at i{100}%
+                        \edef\pgfPT at blending@prop at ii{0}%
+                    \else%
+                        \pgfmathparse{int(100-\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at i{\pgfmathresult}%
+                        \pgfmathparse{int(\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at ii{\pgfmathresult}%
+                    \fi%
+                \else\ifnum\pgfPT at countf<72\relax% Lanta
+                    \ifpgfPTusecolor at Lanta%
+                        \edef\pgfPT at blending@prop at i{100}%
+                        \edef\pgfPT at blending@prop at ii{0}%
+                    \else%
+                        \pgfmathparse{int(100-\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at i{\pgfmathresult}%
+                        \pgfmathparse{int(\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at ii{\pgfmathresult}%
+                    \fi%
+                \else%
+                \pgfmathparse{int(100-\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at i{\pgfmathresult}%
+                \pgfmathparse{int(\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at ii{\pgfmathresult}%
+                \fi\fi\fi%
+            \else% P7
+                \edef\pgfPT at blending@prop at i{100}%
+                \edef\pgfPT at blending@prop at ii{0}%
+            \fi\fi\fi\fi\fi\fi%
+        \fi% END \pgfPTblending at percentage@sign
+        \edef\pgfPT at tmpc@lor{\csname pgfPTinnerGcolor\@pgfPT at tmp\endcsname}%
+        \expandafter\pgfPT at get@rgb\pgfPT at tmpc@lor\relax%
+        \ifcase\pgfPTblending at mode\relax%
+        % 0 -> add
+            \@pgfPT at mix@additive[\pgfPT at blending@prop at i:\pgfPT at blending@prop at ii](\pgfPT at tmpc@lor at r/\pgfPT at tmpc@lor at g/\pgfPT at tmpc@lor at b,\pgfPTblending at color@r/\pgfPTblending at color@g/\pgfPTblending at color@b)%
+        \or% 1 -> sub
+            \@pgfPT at mix@subtractive[\pgfPT at blending@prop at i:\pgfPT at blending@prop at ii](\pgfPT at tmpc@lor at r/\pgfPT at tmpc@lor at g/\pgfPT at tmpc@lor at b,\pgfPTblending at color@r/\pgfPTblending at color@g/\pgfPTblending at color@b)%
+        \or% 2 -> linear
+            \@pgfPT at mix@linear[\pgfPT at blending@prop at i:\pgfPT at blending@prop at ii](\pgfPT at tmpc@lor at r/\pgfPT at tmpc@lor at g/\pgfPT at tmpc@lor at b,\pgfPTblending at color@r/\pgfPTblending at color@g/\pgfPTblending at color@b)%
+        \fi% end ifcase
+        \pgfPT at extract@rgb at fill{pgfPTmixedcolor}%
+        \edef\pgfPT at backCS@GroupColorsList{\pgfPT at backCS@GroupColorsList,\pgfPT at rf/\pgfPT at gf/\pgfPT at bf}%
+    \else% no blending
+        \edef\pgfPT at backCS@GroupColorsList{\pgfPT at backCS@GroupColorsList,\csname pgfPTinnerGcolor\@pgfPT at tmp\endcsname}%
+    \fi%
+    \advance\pgfPT at countf by1\relax%
+    }% end do
+\expandafter\@pgfPT at list@purge \pgfPT at backCS@GroupColorsList[pgfPT at backCS@GroupColorsList]\relax%
+\pgfPTnewColorScheme{#2}{\pgfPT at backCS@GroupColorsList}%
+}% END \pgfPTGroupColors
+%
+%\pgfPTPeriodColors{name of color scheme}{list}
+% ---------------------------------------------------------------------------------------
+% list:
+% top color=<color>,bottom color=<color>,middle color=<color>
+% or
+% P1=<color>,P2=<color>, ... , P7=<color>
+% or
+% gradient={P<n>=<color>,P<n>=<color>,...,P<n>=<color>}
+%
+% with options:
+%    -> group blending={color=<color>,percentage=<positive or negative integer>,mode=<add|sub|linear>}
+%                   NOTES: the percentage refers to how much of the color, in total, was mixed at the end of the 7 periods;
+%                                               for example 68% adds 4% to each period (G1:0% -> G2:4% -> G3:8% -> ... -> G18:68%)
+%                               if the percentage is positive, the order of the mixture is from G1 to G18
+%                               if the percentage is negative, the mixing order is from G18 to G1
+%    -> H=<color>,La=<color>,Lanta=<color>,Ac=<color>,Actin=<color>
+% ---------------------------------------------------------------------------------------
+\def\pgfPTPeriodColors{\@ifnextchar[\pgfPT at PeriodColors{\pgfPT at PeriodColors[white]}}%
+\def\pgfPT at PeriodColors[#1]#2#3{\ignorespaces%
+\pgfPTgradient at TIfalse\pgfPTgradient at TIIfalse%
+\pgfPTusecolor at Hfalse%
+\pgfPTusecolor at Lafalse\pgfPTusecolor at Lantafalse%
+\pgfPTusecolor at Acfalse\pgfPTusecolor at Actinfalse%
+\edef\pgfPTCScolorTOP{#1}%
+\edef\pgfPTCScolorMIDDLE{}%
+\edef\pgfPTCScolorBOTTOM{#1}%
+\edef\pgfPTCScolorH{#1}%
+\edef\pgfPTCScolorPI{#1}%
+\edef\pgfPTCScolorPII{#1}%
+\edef\pgfPTCScolorPIII{#1}%
+\edef\pgfPTCScolorPIV{#1}%
+\edef\pgfPTCScolorPV{#1}%
+\edef\pgfPTCScolorPVI{#1}%
+\edef\pgfPTCScolorPVII{#1}%
+\edef\pgfPTCScolorLa{#1}%
+\edef\pgfPTCScolorLanta{#1}%
+\edef\pgfPTCScolorAc{#1}%
+\edef\pgfPTCScolorActin{#1}%
+\@for\@pgfPT at tmp:=#3\do{%
+\ifx\@pgfPT at tmp\pgfPT at relax\relax\else\ifx\@pgfPT at tmp\pgfPT at space\relax\else%
+    \edef\pgfPT at handlert@test{group blending}\ifx\@pgfPT at tmp\pgfPT at handlert@test\edef\@pgfPT at tmp{group blending={}}\fi%
+    \pgfPT at temptrue% se acabar os ifx sem encontrar o handler gera a msg de erro...
+    \expandafter\pgfPT at keys@setNameValue\@pgfPT at tmp\relax%
+        \edef\pgfPT at handlert@test{gradient}% gradient... type 1
+        \ifx\pgfPT at handler\pgfPT at handlert@test\pgfPT at tempfalse%
+            \pgfPTgradient at TItrue\pgfPTgradient at TIIfalse\edef\pgfPTCScolorGRADIENT{\pgfPT at handlervalue}%
+        \else%
+        \edef\pgfPT at handlert@test{topcolor}% gradient... type 2
+        \ifx\pgfPT at handler\pgfPT at handlert@test\pgfPT at tempfalse%
+            \pgfPTgradient at TIItrue\pgfPTgradient at TIfalse\edef\pgfPTCScolorTOP{\pgfPT at handlervalue}%
+        \else%
+        \edef\pgfPT at handlert@test{middlecolor}% gradient... type 2
+        \ifx\pgfPT at handler\pgfPT at handlert@test\pgfPT at tempfalse%
+            \pgfPTgradient at TIItrue\pgfPTgradient at TIfalse\edef\pgfPTCScolorMIDDLE{\pgfPT at handlervalue}%
+        \else%
+        \edef\pgfPT at handlert@test{bottomcolor}% gradient... type 2
+        \ifx\pgfPT at handler\pgfPT at handlert@test\pgfPT at tempfalse%
+            \pgfPTgradient at TIItrue\pgfPTgradient at TIfalse\edef\pgfPTCScolorBOTTOM{\pgfPT at handlervalue}%
+        \else%
+        \edef\pgfPT at handlert@test{P1}%
+        \ifx\pgfPT at handler\pgfPT at handlert@test\pgfPT at tempfalse%
+            \edef\pgfPTCScolorPI{\pgfPT at handlervalue}%
+        \else%
+        \edef\pgfPT at handlert@test{P2}%
+        \ifx\pgfPT at handler\pgfPT at handlert@test\pgfPT at tempfalse%
+            \edef\pgfPTCScolorPII{\pgfPT at handlervalue}%
+        \else%
+        \edef\pgfPT at handlert@test{P3}%
+        \ifx\pgfPT at handler\pgfPT at handlert@test\pgfPT at tempfalse%
+            \edef\pgfPTCScolorPIII{\pgfPT at handlervalue}%
+        \else%
+        \edef\pgfPT at handlert@test{P4}%
+        \ifx\pgfPT at handler\pgfPT at handlert@test\pgfPT at tempfalse%
+            \edef\pgfPTCScolorPIV{\pgfPT at handlervalue}%
+        \else%
+        \edef\pgfPT at handlert@test{P5}%
+        \ifx\pgfPT at handler\pgfPT at handlert@test\pgfPT at tempfalse%
+            \edef\pgfPTCScolorPV{\pgfPT at handlervalue}%
+        \else%
+        \edef\pgfPT at handlert@test{P6}%
+        \ifx\pgfPT at handler\pgfPT at handlert@test\pgfPT at tempfalse%
+            \edef\pgfPTCScolorPVI{\pgfPT at handlervalue}%
+        \else%
+        \edef\pgfPT at handlert@test{P7}%
+        \ifx\pgfPT at handler\pgfPT at handlert@test\pgfPT at tempfalse%
+            \edef\pgfPTCScolorPVII{\pgfPT at handlervalue}%
+        \else%
+        \edef\pgfPT at handlert@test{H}%
+        \ifx\pgfPT at handler\pgfPT at handlert@test\pgfPT at tempfalse%
+            \pgfPTusecolor at Htrue\edef\pgfPTCScolorH{\pgfPT at handlervalue}%
+        \else%
+        \edef\pgfPT at handlert@test{La}%
+        \ifx\pgfPT at handler\pgfPT at handlert@test\pgfPT at tempfalse%
+            \pgfPTusecolor at Latrue\edef\pgfPTCScolorLa{\pgfPT at handlervalue}%
+        \else%
+        \edef\pgfPT at handlert@test{Lanta}%
+        \ifx\pgfPT at handler\pgfPT at handlert@test\pgfPT at tempfalse%
+            \pgfPTusecolor at Lantatrue\edef\pgfPTCScolorLanta{\pgfPT at handlervalue}%
+        \else%
+        \edef\pgfPT at handlert@test{Ac}%
+        \ifx\pgfPT at handler\pgfPT at handlert@test\pgfPT at tempfalse%
+            \pgfPTusecolor at Actrue\edef\pgfPTCScolorAc{\pgfPT at handlervalue}%
+        \else%
+        \edef\pgfPT at handlert@test{Actin}%
+        \ifx\pgfPT at handler\pgfPT at handlert@test\pgfPT at tempfalse%
+            \pgfPTusecolor at Actintrue\edef\pgfPTCScolorActin{\pgfPT at handlervalue}%
+        \else%
+        \edef\pgfPT at handlert@test{groupblending}%
+        \ifx\pgfPT at handler\pgfPT at handlert@test\pgfPT at tempfalse%
+            \pgfPT at blendingtrue\edef\pgfPTblending{\pgfPT at handlervalue}%
+        \else%handler not found
+        \ifpgfPT at temp\PackageError{pgfPT}{\textbackslash pgfPTGroupColors: '\pgfPT at handler'\space in '\detokenize{#2}'\space not known! It will be ignored...}{}\fi\relax%
+        \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
+\fi\fi}% end do
+\ifpgfPTgradient at TI\relax%
+\expandafter\pgfPT at dogradient@TI[0]\pgfPTCScolorGRADIENT\relax%
+\else\ifpgfPTgradient at TII\relax%
+\pgfPT at dogradient@TII[0](\pgfPTCScolorTOP,\pgfPTCScolorMIDDLE,\pgfPTCScolorBOTTOM)%
+\fi\fi%
+\pgfPT at assign@color{\pgfPTCScolorPI}\colorlet{pgfPTinnerPcolorI}{pgfPTassignedcolor}%
+\pgfPT at assign@color{\pgfPTCScolorPII}\colorlet{pgfPTinnerPcolorII}{pgfPTassignedcolor}%
+\pgfPT at assign@color{\pgfPTCScolorPIII}\colorlet{pgfPTinnerPcolorIII}{pgfPTassignedcolor}%
+\pgfPT at assign@color{\pgfPTCScolorPIV}\colorlet{pgfPTinnerPcolorIV}{pgfPTassignedcolor}%
+\pgfPT at assign@color{\pgfPTCScolorPV}\colorlet{pgfPTinnerPcolorV}{pgfPTassignedcolor}%
+\pgfPT at assign@color{\pgfPTCScolorPVI}\colorlet{pgfPTinnerPcolorVI}{pgfPTassignedcolor}%
+\pgfPT at assign@color{\pgfPTCScolorPVII}\colorlet{pgfPTinnerPcolorVII}{pgfPTassignedcolor}%
+\ifpgfPTusecolor at H\pgfPT at assign@color{\pgfPTCScolorH}\else\pgfPT at assign@color{\pgfPTCScolorPI}\fi%
+\colorlet{pgfPTinnerPcolorH}{pgfPTassignedcolor}%
+\ifpgfPTusecolor at La\pgfPT at assign@color{\pgfPTCScolorLa}\else\pgfPT at assign@color{\pgfPTCScolorPVI}\fi%
+\colorlet{pgfPTinnerPcolorLa}{pgfPTassignedcolor}%
+\ifpgfPTusecolor at Lanta\pgfPT at assign@color{\pgfPTCScolorLanta}\else\pgfPT at assign@color{\pgfPTCScolorPVI}\fi%
+\colorlet{pgfPTinnerPcolorLanta}{pgfPTassignedcolor}%
+\ifpgfPTusecolor at Ac\pgfPT at assign@color{\pgfPTCScolorAc}\else\pgfPT at assign@color{\pgfPTCScolorPVII}\fi%
+\colorlet{pgfPTinnerPcolorAc}{pgfPTassignedcolor}%
+\ifpgfPTusecolor at Actin\pgfPT at assign@color{\pgfPTCScolorActin}\else\pgfPT at assign@color{\pgfPTCScolorPVII}\fi%
+\colorlet{pgfPTinnerPcolorActin}{pgfPTassignedcolor}%
+\ifpgfPT at blending%
+    % blending={color=<color>,percentage=<positive or negative integer>,mode=<add|sub|linear>}
+    \edef\pgfPTblending at color@r{1}%
+    \edef\pgfPTblending at color@g{1}%
+    \edef\pgfPTblending at color@b{1}%
+    \edef\pgfPTblending at percentage@step{4}%
+    \edef\pgfPTblending at percentage@sign{1}%
+    \edef\pgfPTblending at mode{2}%
+    \ifx\pgfPTblending\pgfPT at relax\relax\else%
+    \@for\@pgfPT at tmp:=\pgfPTblending\do{%
+                \pgfPT at temptrue% se acabar os ifx sem encontrar o handler gera a msg de erro...
+                \expandafter\pgfPT at keys@setNameValue\@pgfPT at tmp\relax%
+                \edef\pgfPT at handlert@test{color}%
+                \ifx\pgfPT at handler\pgfPT at handlert@test\pgfPT at tempfalse%
+                    \colorlet{pgfPTtmpc at lor}[rgb]{\pgfPT at handlervalue}
+                    \pgfPT at extract@rgb at fill{pgfPTtmpc at lor}%
+                    \edef\pgfPTblending at color@r{\pgfPT at rf}%
+                    \edef\pgfPTblending at color@g{\pgfPT at gf}%
+                    \edef\pgfPTblending at color@b{\pgfPT at bf}%
+                \else%
+                \edef\pgfPT at handlert@test{percentage}%
+                \ifx\pgfPT at handler\pgfPT at handlert@test\pgfPT at tempfalse%
+                    \pgfmathparse{int(abs(\pgfPT at handlervalue))}\edef\pgfPTblending at percentage{\pgfmathresult}%
+                    \ifnum\pgfPTblending at percentage>100\relax%
+                        \PackageError{pgfPT}{\textbackslash pgfPTPeriodColors::group blending percentage: '\pgfPT at handlervalue'\space in '\detokenize{\pgfPTblending}'\space to high! Default blending percentage (68) will be used...}{}\relax%
+                        \edef\pgfPT at handlervalue{68}%
+                    \fi%
+                    \pgfmathparse{int(abs(\pgfPT at handlervalue/17))}\edef\pgfPTblending at percentage@step{\pgfmathresult}%
+                    \pgfmathparse{sign(\pgfPT at handlervalue)}\edef\pgfPTblending at percentage@sign{\pgfmathresult}%
+                \else%
+                \edef\pgfPT at handlert@test{mode}%
+                \ifx\pgfPT at handler\pgfPT at handlert@test\pgfPT at tempfalse%
+                    \edef\pgfPTblending at mode@tmp{add}%
+                    \ifx\pgfPTblending at mode@tmp\pgfPT at handlervalue%
+                        \edef\pgfPTblending at mode{0}%
+                    \else%
+                    \edef\pgfPTblending at mode@tmp{sub}%
+                    \ifx\pgfPTblending at mode@tmp\pgfPT at handlervalue%
+                        \edef\pgfPTblending at mode{1}%
+                    \else%
+                    \edef\pgfPTblending at mode@tmp{linear}%
+                    \ifx\pgfPTblending at mode@tmp\pgfPT at handlervalue%
+                        \edef\pgfPTblending at mode{2}%
+                    \else%
+                        \PackageError{pgfPT}{\textbackslash pgfPTPeriodColors::group blending mode: '\pgfPT at handlervalue'\space in '\detokenize{\pgfPTblending}'\space not known! Default blending mode (add) will be used...}{}\relax%
+                    \fi\fi\fi%
+                \else%handler not found
+                    \ifpgfPT at temp\PackageError{pgfPT}{\textbackslash pgfPTPeriodColors::group blending: '\pgfPT at handler'\space in '\detokenize{\pgfPTblending}'\space not known! Default value will be used...}{}\fi\relax%
+                \fi\fi\fi%
+                }% end do
+    \fi% \ifx\pgfPTblending\pgfPT at relax
+\fi%
+\@for\@pgfPT at tmp:={I,II,III,IV,V,VI,VII,H,La,Lanta,Ac,Actin}%
+\do{%
+        \pgfPT at extract@rgb at fill{pgfPTinnerPcolor\@pgfPT at tmp}%
+        \edef\pgfPTinnercolor at r{\pgfPT at rf}%
+        \edef\pgfPTinnercolor at g{\pgfPT at gf}%
+        \edef\pgfPTinnercolor at b{\pgfPT at bf}%
+        \expandafter\edef\csname pgfPTinnerPcolor\@pgfPT at tmp\endcsname{\pgfPTinnercolor at r/\pgfPTinnercolor at g/\pgfPTinnercolor at b}%
+        }%
+\edef\pgfPT at backCS@PeriodColorsList{BEGIN}%
+\pgfPT at countf=1%
+\def\pgfPT at get@rgb##1/##2/##3\relax{\edef\pgfPT at tmpc@lor at r{##1}\edef\pgfPT at tmpc@lor at g{##2}\edef\pgfPT at tmpc@lor at b{##3}}%
+\@for\@pgfPT at tmp:={H,I,II,II,II,II,II,II,II,II,III,III,III,III,III,III,III,III,IV,IV,IV,IV,IV,IV,IV,IV,IV,IV,IV,IV,IV,IV,IV,IV,IV,IV,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,VI,VI,La,Lanta,Lanta,Lanta,Lanta,Lanta,Lanta,Lanta,Lanta,Lanta,Lanta,Lanta,Lanta,Lanta,Lanta,VI,VI,VI,VI,VI,VI,VI,VI,VI,VI,VI,VI,VI,VI,VI,VII,VII,Ac,Actin,Actin,Actin,Actin,Actin,Actin,Actin,Actin,Actin,Actin,Actin,Actin,Actin,Actin,VII,VII,VII,VII,VII,VII,VII,VII,VII,VII,VII,VII,VII,VII,VII}%
+\do{%
+    \ifpgfPT at blending\relax% blending
+        \ifnum\pgfPTblending at percentage@sign=1\relax%
+            \ifnum\pgfPT at countf<3\relax% P1
+                \ifnum\pgfPT at countf=1\relax% H
+                    \ifpgfPTusecolor at H%
+                    \edef\pgfPT at blending@prop at i{100}%
+                    \edef\pgfPT at blending@prop at ii{0}%
+                    \else%
+                    \pgfmathparse{int(100-17*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at i{\pgfmathresult}%
+                    \pgfmathparse{int(17*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at ii{\pgfmathresult}%
+                    \fi%
+                \else% He
+                \pgfmathparse{int(100-17*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at i{\pgfmathresult}%
+                \pgfmathparse{int(17*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at ii{\pgfmathresult}%
+                \fi%
+            \else\ifnum\pgfPT at countf<11\relax% P2
+                \ifnum\pgfPT at countf<5\relax%
+                \pgfmathparse{int(100-(\the\pgfPT at countf-3)*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at i{\pgfmathresult}%
+                \pgfmathparse{int((\the\pgfPT at countf-3)*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at ii{\pgfmathresult}%
+                \else%
+                \pgfmathparse{int(100-(7+\the\pgfPT at countf)*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at i{\pgfmathresult}%
+                \pgfmathparse{int((7+\the\pgfPT at countf)*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at ii{\pgfmathresult}%
+                \fi%
+            \else\ifnum\pgfPT at countf<19\relax% P3
+                \ifnum\pgfPT at countf<13\relax%
+                \pgfmathparse{int(100-(\the\pgfPT at countf-11)*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at i{\pgfmathresult}%
+                \pgfmathparse{int((\the\pgfPT at countf-11)*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at ii{\pgfmathresult}%
+                \else%
+                \pgfmathparse{int(100-(\the\pgfPT at countf-1)*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at i{\pgfmathresult}%
+                \pgfmathparse{int((\the\pgfPT at countf-1)*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at ii{\pgfmathresult}%
+                \fi%
+            \else\ifnum\pgfPT at countf<37\relax% P4
+                \pgfmathparse{int(100-(\the\pgfPT at countf-19)*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at i{\pgfmathresult}%
+                \pgfmathparse{int((\the\pgfPT at countf-19)*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at ii{\pgfmathresult}%
+            \else\ifnum\pgfPT at countf<55\relax% P5
+                \pgfmathparse{int(100-(\the\pgfPT at countf-37)*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at i{\pgfmathresult}%
+                \pgfmathparse{int((\the\pgfPT at countf-37)*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at ii{\pgfmathresult}%
+            \else\ifnum\pgfPT at countf<87\relax% P6
+                \ifnum\pgfPT at countf<57\relax%
+                \pgfmathparse{int(100-(\the\pgfPT at countf-55)*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at i{\pgfmathresult}%
+                \pgfmathparse{int((\the\pgfPT at countf-55)*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at ii{\pgfmathresult}%
+                \else\ifnum\pgfPT at countf>71\relax%
+                \pgfmathparse{int(100-(\the\pgfPT at countf-68)*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at i{\pgfmathresult}%
+                \pgfmathparse{int((\the\pgfPT at countf-68)*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at ii{\pgfmathresult}%
+                \else\ifnum\pgfPT at countf=57\relax% La
+                \ifpgfPTusecolor at La%
+                    \edef\pgfPT at blending@prop at i{100}%
+                    \edef\pgfPT at blending@prop at ii{0}%
+                \else%
+                    \pgfmathparse{int(100-3*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at i{\pgfmathresult}%
+                    \pgfmathparse{int(3*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at ii{\pgfmathresult}%
+                \fi%
+                \else% lanthanoids
+                \ifpgfPTusecolor at Lanta%
+                    \edef\pgfPT at blending@prop at i{100}%
+                    \edef\pgfPT at blending@prop at ii{0}%
+                \else%
+                    \pgfmathparse{int(100-3*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at i{\pgfmathresult}%
+                    \pgfmathparse{int(3*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at ii{\pgfmathresult}%
+                \fi%
+                \fi\fi\fi%
+            \else% P7
+                \ifnum\pgfPT at countf<89\relax%
+                \pgfmathparse{int(100-(\the\pgfPT at countf-87)*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at i{\pgfmathresult}%
+                \pgfmathparse{int((\the\pgfPT at countf-87)*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at ii{\pgfmathresult}%
+                \else\ifnum\pgfPT at countf>103\relax%
+                \pgfmathparse{int(100-(\the\pgfPT at countf-100)*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at i{\pgfmathresult}%
+                \pgfmathparse{int((\the\pgfPT at countf-100)*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at ii{\pgfmathresult}%
+                \else\ifnum\pgfPT at countf=89\relax% Ac
+                \ifpgfPTusecolor at Ac%
+                    \edef\pgfPT at blending@prop at i{100}%
+                    \edef\pgfPT at blending@prop at ii{0}%
+                \else%
+                    \pgfmathparse{int(100-3*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at i{\pgfmathresult}%
+                    \pgfmathparse{int(3*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at ii{\pgfmathresult}%
+                \fi%
+                \else% actinoids
+                \ifpgfPTusecolor at Actin%
+                    \edef\pgfPT at blending@prop at i{100}%
+                    \edef\pgfPT at blending@prop at ii{0}%
+                \else%
+                    \pgfmathparse{int(100-3*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at i{\pgfmathresult}%
+                    \pgfmathparse{int(3*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at ii{\pgfmathresult}%
+                \fi%
+                \fi\fi\fi%
+            \fi\fi\fi\fi\fi\fi%
+        \else% \pgfPTblending at percentage@sign=-1
+            \ifnum\pgfPT at countf<3\relax% P1
+                \edef\pgfPT at blending@prop at i{100}%
+                \edef\pgfPT at blending@prop at ii{0}%
+            \else\ifnum\pgfPT at countf<11\relax% P2
+                \ifnum\pgfPT at countf<5\relax%
+                \pgfmathparse{int(100-(20-\the\pgfPT at countf)*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at i{\pgfmathresult}%
+                \pgfmathparse{int((20-\the\pgfPT at countf)*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at ii{\pgfmathresult}%
+                \else%
+                \pgfmathparse{int(100-(10-\the\pgfPT at countf)*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at i{\pgfmathresult}%
+                \pgfmathparse{int((10-\the\pgfPT at countf)*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at ii{\pgfmathresult}%
+                \fi%
+            \else\ifnum\pgfPT at countf<19\relax% P3
+                \ifnum\pgfPT at countf<13\relax%
+                \pgfmathparse{int(100-(28-\the\pgfPT at countf)*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at i{\pgfmathresult}%
+                \pgfmathparse{int((28-\the\pgfPT at countf)*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at ii{\pgfmathresult}%
+                \else%
+                \pgfmathparse{int(100-(18-\the\pgfPT at countf)*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at i{\pgfmathresult}%
+                \pgfmathparse{int((18-\the\pgfPT at countf)*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at ii{\pgfmathresult}%
+                \fi%
+            \else\ifnum\pgfPT at countf<37\relax% P4
+                \pgfmathparse{int(100-(36-\the\pgfPT at countf)*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at i{\pgfmathresult}%
+                \pgfmathparse{int((36-\the\pgfPT at countf)*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at ii{\pgfmathresult}%
+            \else\ifnum\pgfPT at countf<55\relax% P5
+                \pgfmathparse{int(100-(54-\the\pgfPT at countf)*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at i{\pgfmathresult}%
+                \pgfmathparse{int((54-\the\pgfPT at countf)*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at ii{\pgfmathresult}%
+            \else\ifnum\pgfPT at countf<87\relax% P6
+                \ifnum\pgfPT at countf<57\relax%
+                \pgfmathparse{int(100-(72-\the\pgfPT at countf)*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at i{\pgfmathresult}%
+                \pgfmathparse{int((72-\the\pgfPT at countf)*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at ii{\pgfmathresult}%
+                \else\ifnum\pgfPT at countf>71\relax%
+                \pgfmathparse{int(100-(85-\the\pgfPT at countf)*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at i{\pgfmathresult}%
+                \pgfmathparse{int((85-\the\pgfPT at countf)*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at ii{\pgfmathresult}%
+                \else\ifnum\pgfPT at countf=57\relax% La
+                \ifpgfPTusecolor at La%
+                    \edef\pgfPT at blending@prop at i{100}%
+                    \edef\pgfPT at blending@prop at ii{0}%
+                \else%
+                    \pgfmathparse{int(100-14*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at i{\pgfmathresult}%
+                    \pgfmathparse{int(14*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at ii{\pgfmathresult}%
+                \fi%
+                \else% lanthanoids
+                \ifpgfPTusecolor at Lanta%
+                    \edef\pgfPT at blending@prop at i{100}%
+                    \edef\pgfPT at blending@prop at ii{0}%
+                \else%
+                    \pgfmathparse{int(100-14*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at i{\pgfmathresult}%
+                    \pgfmathparse{int(14*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at ii{\pgfmathresult}%
+                \fi%
+                \fi\fi\fi%
+            \else% P7
+                \ifnum\pgfPT at countf<89\relax%
+                \pgfmathparse{int(100-(104-\the\pgfPT at countf)*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at i{\pgfmathresult}%
+                \pgfmathparse{int((104-\the\pgfPT at countf)*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at ii{\pgfmathresult}%
+                \else\ifnum\pgfPT at countf>103\relax%
+                \pgfmathparse{int(100-(118-\the\pgfPT at countf)*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at i{\pgfmathresult}%
+                \pgfmathparse{int((118-\the\pgfPT at countf)*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at ii{\pgfmathresult}%
+                \else\ifnum\pgfPT at countf=89\relax% Ac
+                \ifpgfPTusecolor at Ac%
+                    \edef\pgfPT at blending@prop at i{100}%
+                    \edef\pgfPT at blending@prop at ii{0}%
+                \else%
+                    \pgfmathparse{int(100-14*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at i{\pgfmathresult}%
+                    \pgfmathparse{int(14*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at ii{\pgfmathresult}%
+                \fi%
+                \else% actinoids
+                \ifpgfPTusecolor at Actin%
+                    \edef\pgfPT at blending@prop at i{100}%
+                    \edef\pgfPT at blending@prop at ii{0}%
+                \else%
+                    \pgfmathparse{int(100-14*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at i{\pgfmathresult}%
+                    \pgfmathparse{int(14*\pgfPTblending at percentage@step)}\edef\pgfPT at blending@prop at ii{\pgfmathresult}%
+                \fi%
+                \fi\fi\fi%
+            \fi\fi\fi\fi\fi\fi%
+        \fi% END \pgfPTblending at percentage@sign
+        \edef\pgfPT at tmpc@lor{\csname pgfPTinnerPcolor\@pgfPT at tmp\endcsname}%
+        \expandafter\pgfPT at get@rgb\pgfPT at tmpc@lor\relax%
+        \ifcase\pgfPTblending at mode\relax%
+        % 0 -> add
+            \@pgfPT at mix@additive[\pgfPT at blending@prop at i:\pgfPT at blending@prop at ii](\pgfPT at tmpc@lor at r/\pgfPT at tmpc@lor at g/\pgfPT at tmpc@lor at b,\pgfPTblending at color@r/\pgfPTblending at color@g/\pgfPTblending at color@b)%
+        \or% 1 -> sub
+            \@pgfPT at mix@subtractive[\pgfPT at blending@prop at i:\pgfPT at blending@prop at ii](\pgfPT at tmpc@lor at r/\pgfPT at tmpc@lor at g/\pgfPT at tmpc@lor at b,\pgfPTblending at color@r/\pgfPTblending at color@g/\pgfPTblending at color@b)%
+        \or% 2 -> linear
+            \@pgfPT at mix@linear[\pgfPT at blending@prop at i:\pgfPT at blending@prop at ii](\pgfPT at tmpc@lor at r/\pgfPT at tmpc@lor at g/\pgfPT at tmpc@lor at b,\pgfPTblending at color@r/\pgfPTblending at color@g/\pgfPTblending at color@b)%
+        \fi% end ifcase
+        \pgfPT at extract@rgb at fill{pgfPTmixedcolor}%
+        \edef\pgfPT at backCS@PeriodColorsList{\pgfPT at backCS@PeriodColorsList,\pgfPT at rf/\pgfPT at gf/\pgfPT at bf}%
+    \else% no blending
+        \edef\pgfPT at backCS@PeriodColorsList{\pgfPT at backCS@PeriodColorsList,\csname pgfPTinnerPcolor\@pgfPT at tmp\endcsname}%
+    \fi%
+    \advance\pgfPT at countf by1\relax%
+    }% end do
+\expandafter\@pgfPT at list@purge \pgfPT at backCS@PeriodColorsList[pgfPT at backCS@PeriodColorsList]\relax%
+\pgfPTnewColorScheme{#2}{\pgfPT at backCS@PeriodColorsList}%
+}% END \pgfPTPeriodColors
+%
+%
+% THE GRADIENT MACROS
+% \pgfPT at dogradient@TI[0 or 1]{list}\relax % 0->P or 1->G
+\def\pgfPT at dogradient@TI[#1]#2\relax{%
+\ignorespaces%
+\pgfPT at counta=0\pgfPT at countb=0\pgfPT at countc=0%
+\def\@pgfPT at gradientTI@list{BEGIN}%
+\ifnum#1=0\relax% Period
+    \edef\@pgfPT at gradientTI@PorG{7}%
+    \@for\@pgfPT at tmp:=#2\do{%
+        \expandafter\@pgfPT at grad@get at n@Pcolor \@pgfPT at tmp\relax%
+        \advance\pgfPT at counta by1\relax%
+        \edef\@pgfPT at gradientTI@list{\@pgfPT at gradientTI@list,\@pgfPT at grad@ntmp}%
+        \expandafter\edef\csname @pgfPT at gradientTI@color\@Roman\@pgfPT at grad@ntmp\endcsname{\@pgfPT at grad@colortmp}%
+        \expandafter\edef\csname @pgfPT at gradientTI@n\@Roman\@pgfPT at grad@ntmp\endcsname{\@pgfPT at grad@ntmp}%
+        }%
+\else% Group
+    \edef\@pgfPT at gradientTI@PorG{18}%
+    \@for\@pgfPT at tmp:=#2\do{%
+        \expandafter\@pgfPT at grad@get at n@Gcolor \@pgfPT at tmp\relax%
+        \advance\pgfPT at counta by1\relax%
+        \edef\@pgfPT at gradientTI@list{\@pgfPT at gradientTI@list,\@pgfPT at grad@ntmp}%
+        \expandafter\edef\csname @pgfPT at gradientTI@color\@Roman\@pgfPT at grad@ntmp\endcsname{\@pgfPT at grad@colortmp}%
+        \expandafter\edef\csname @pgfPT at gradientTI@n\@Roman\@pgfPT at grad@ntmp\endcsname{\@pgfPT at grad@ntmp}%
+        }%
+\fi%
+\expandafter\@pgfPT at list@purge \@pgfPT at gradientTI@list[@pgfPT at gradientTI@list]\relax%
+\edef\@pgfPT at gradientTI@unsortedlist{\@pgfPT at gradientTI@list}%
+\expandafter\pgfPT at bubblesort\@pgfPT at gradientTI@list\relax%
+\pgfPT at countc=0\pgfPT at counte=0%
+\@for\@pgfPT at tmp:=\pgfPT at sortedlist\do{%
+\pgfmathparse{array({\pgfPT at sortedlist},\the\pgfPT at countc)}%
+\ifnum\pgfPT at countc=0\relax\edef\pgfPT at sortedlist@first{\pgfmathresult}\fi%
+\advance\pgfPT at countc by1\relax%
+\ifnum\pgfPT at countc=\pgfPT at counta\relax\edef\pgfPT at sortedlist@last{\pgfmathresult}\fi%
+\expandafter\edef\csname @pgfPT at gradientTI@n\@Roman\pgfPT at countc\endcsname{\csname @pgfPT at gradientTI@n\@Roman\pgfmathresult\endcsname}%
+\expandafter\edef\csname @pgfPT at gradientTI@color\@Roman\pgfPT at countc\endcsname{\csname @pgfPT at gradientTI@color\@Roman\pgfmathresult\endcsname}%
+}%
+\ifnum\pgfPT at sortedlist@first>1\relax%
+\pgfPT at countc=1%
+\@for\@pgfPT at tmp:=\pgfPT at sortedlist\do{%
+\expandafter\edef\csname @pgfPT at gradientTI@ncopy\@Roman\pgfPT at countc\endcsname{\csname @pgfPT at gradientTI@n\@Roman\pgfPT at countc\endcsname}%
+\expandafter\edef\csname @pgfPT at gradientTI@colorcopy\@Roman\pgfPT at countc\endcsname{\csname @pgfPT at gradientTI@color\@Roman\pgfPT at countc\endcsname}%
+\advance\pgfPT at countc by1\relax%
+}%
+\pgfPT at countc=1\pgfPT at countd=1%
+\@for\@pgfPT at tmp:=\pgfPT at sortedlist\do{%
+\ifnum\pgfPT at countd=1\relax%
+\expandafter\edef\csname @pgfPT at gradientTI@n\@Roman\pgfPT at countc\endcsname{1}%
+\expandafter\edef\csname @pgfPT at gradientTI@color\@Roman\pgfPT at countc\endcsname{\csname @pgfPT at gradientTI@colorcopy\@Roman\pgfPT at countd\endcsname}%
+\advance\pgfPT at countd by1\relax%
+\expandafter\edef\csname @pgfPT at gradientTI@n\@Roman\pgfPT at countd\endcsname{\csname @pgfPT at gradientTI@ncopy\@Roman\pgfPT at countc\endcsname}%
+\expandafter\edef\csname @pgfPT at gradientTI@color\@Roman\pgfPT at countd\endcsname{\csname @pgfPT at gradientTI@colorcopy\@Roman\pgfPT at countc\endcsname}%
+\else%
+\expandafter\edef\csname @pgfPT at gradientTI@n\@Roman\pgfPT at countd\endcsname{\csname @pgfPT at gradientTI@ncopy\@Roman\pgfPT at countc\endcsname}%
+\expandafter\edef\csname @pgfPT at gradientTI@color\@Roman\pgfPT at countd\endcsname{\csname @pgfPT at gradientTI@colorcopy\@Roman\pgfPT at countc\endcsname}%
+\fi%
+\advance\pgfPT at countd by1\relax%
+\advance\pgfPT at countc by1\relax%
+}%
+\advance\pgfPT at counta by1\relax%
+\pgfPT at counte=1\relax%
+\edef\pgfPT at sortedlist{1,\pgfPT at sortedlist}%
+\fi% \ifnum\pgfPT at sortedlist@first>1
+\ifnum\pgfPT at sortedlist@last<\@pgfPT at gradientTI@PorG\relax%
+\ifnum\pgfPT at sortedlist@first=1\relax%
+\pgfPT at countc=1%
+\@for\@pgfPT at tmp:=\pgfPT at sortedlist\do{%
+\expandafter\edef\csname @pgfPT at gradientTI@ncopy\@Roman\pgfPT at countc\endcsname{\csname @pgfPT at gradientTI@n\@Roman\pgfPT at countc\endcsname}%
+\expandafter\edef\csname @pgfPT at gradientTI@colorcopy\@Roman\pgfPT at countc\endcsname{\csname @pgfPT at gradientTI@color\@Roman\pgfPT at countc\endcsname}%
+\advance\pgfPT at countc by1\relax%
+}%
+\fi%
+\pgfPT at countc=\pgfPT at counta\ifnum\pgfPT at counte=1\relax\advance\pgfPT at countc by-1\relax\fi%
+\pgfPT at countd=\pgfPT at counta\advance\pgfPT at countd by1\relax%
+\expandafter\edef\csname @pgfPT at gradientTI@n\@Roman\pgfPT at countd\endcsname{\@pgfPT at gradientTI@PorG}%
+\expandafter\edef\csname @pgfPT at gradientTI@color\@Roman\pgfPT at countd\endcsname{\csname @pgfPT at gradientTI@colorcopy\@Roman\pgfPT at countc\endcsname}%
+\edef\pgfPT at sortedlist{\pgfPT at sortedlist,\@pgfPT at gradientTI@PorG}%
+\advance\pgfPT at counta by1\relax%
+\fi% \ifnum\pgfPT at sortedlist@last<\@pgfPT at gradientTI@PorG
+\edef\@pgfPT at gradientTI@list{\pgfPT at sortedlist}%
+\edef\@pgfPT at gradientTI@foreachlist{}%
+\@for\@pgfPT at tmp:=\@pgfPT at gradientTI@list\do{%
+        \advance\pgfPT at countb by1\relax%
+        \ifnum\pgfPT at countb<\pgfPT at counta\relax%
+            \edef\@pgfPT at gradientTI@foreachlist at n{\csname @pgfPT at gradientTI@n\@Roman\pgfPT at countb\endcsname}%
+            \pgfmathsetcount{\pgfPT at countc}{\pgfPT at countb+1}%
+            \edef\@pgfPT at gradientTI@foreachlist at nf{\csname @pgfPT at gradientTI@n\@Roman\pgfPT at countc\endcsname}%
+            \pgfmathparse{int(\@pgfPT at gradientTI@foreachlist at nf-\@pgfPT at gradientTI@foreachlist at n+1)}%
+            \edef\@pgfPT at gradientTI@foreachlist at steps{\pgfmathresult}%
+            \edef\@pgfPT at gradientTI@foreachlist at coli{\csname @pgfPT at gradientTI@color\@Roman\pgfPT at countb\endcsname}%
+            \edef\@pgfPT at gradientTI@foreachlist at colf{\csname @pgfPT at gradientTI@color\@Roman\pgfPT at countc\endcsname}%
+            \edef\@pgfPT at gradientTI@foreachlist{\@pgfPT at gradientTI@foreachlist\@pgfPT at gradientTI@foreachlist at n/\@pgfPT at gradientTI@foreachlist at steps/\@pgfPT at gradientTI@foreachlist at coli/\@pgfPT at gradientTI@foreachlist at colf,}%
+        \else%
+            \edef\@pgfPT at gradientTI@foreachlist at n{\@pgfPT at gradientTI@PorG}%
+            \edef\@pgfPT at gradientTI@foreachlist at steps{2}%
+            \edef\@pgfPT at gradientTI@foreachlist at coli{\csname @pgfPT at gradientTI@color\@Roman\pgfPT at countb\endcsname}%
+            \edef\@pgfPT at gradientTI@foreachlist at colf{\@pgfPT at gradientTI@foreachlist at coli}%
+            \edef\@pgfPT at gradientTI@foreachlist{\@pgfPT at gradientTI@foreachlist\@pgfPT at gradientTI@foreachlist at n/\@pgfPT at gradientTI@foreachlist at steps/\@pgfPT at gradientTI@foreachlist at coli/\@pgfPT at gradientTI@foreachlist at colf}%
+        \fi%
+        }% end do
+\ifnum#1=0\relax\def\@pgfPT at PorG{P}\else\def\@pgfPT at PorG{G}\fi%
+\foreach \pgfPTx/\pgfPTsteps/\pgfPTcoli/\pgfPTcolf in \@pgfPT at gradientTI@foreachlist {%
+        \@pgfPT at gradient[\@pgfPT at PorG,\pgfPTx,\pgfPTsteps](\pgfPTcoli;\pgfPTcolf)%
+        }%
+}% end \pgfPT at dogradient@TI
+%
+% \pgfPT at dogradient@TII[0 or 1](top or left color,middle color,bottom or right color)
+\def\pgfPT at dogradient@TII[#1](#2,#3,#4){%
+\edef\pgfPT at test{#3}%
+\ifx\pgfPT at test\pgfPT at relax\relax%
+\ifnum#1=0\relax\@pgfPT at gradient[P,1,7](#2;#4)\else\@pgfPT at gradient[G,1,18](#2;#4)\fi%
+\else%
+\ifnum#1=0\relax\@pgfPT at gradient[P,1,4](#2;#3)\@pgfPT at gradient[P,4,4](#3;#4)%
+\else\@pgfPT at gradient[G,1,9](#2;#3)\@pgfPT at gradient[G,9,10](#3;#4)\fi%
+\fi%
+}%
+%
+% \@pgfPT at gradient[P or G,n_initial,steps](start_color; end_color)
+% color-> named color OR named color a!##!named color b OR *[model:values], e.g. *[rgb:.5;.2;.3] ->
+%                             --> (see Table 3: Supported color models on page 10 of the documentation of xcolor v2.14 (2022/06/12)
+\def\@pgfPT at gradient[#1,#2,#3](#4;#5){\ignorespaces%
+\edef\pgfPTgrad at steps{#3}%
+\pgfPT at assign@color{#4}%
+\colorlet{pgfPTgradstartcolor}[rgb]{pgfPTassignedcolor}%
+\pgfPT at assign@color{#5}%
+\colorlet{pgfPTgradendcolor}[rgb]{pgfPTassignedcolor}%
+\pgfPT at extract@rgb at fill{pgfPTgradstartcolor}%
+\edef\pgfPTgradstartcolor at r{\pgfPT at rf}%
+\edef\pgfPTgradstartcolor at g{\pgfPT at gf}%
+\edef\pgfPTgradstartcolor at b{\pgfPT at bf}%
+\pgfPT at extract@rgb at fill{pgfPTgradendcolor}%
+\edef\pgfPTgradendcolor at r{\pgfPT at rf}%
+\edef\pgfPTgradendcolor at g{\pgfPT at gf}%
+\edef\pgfPTgradendcolor at b{\pgfPT at bf}%
+\pgfmathparse{\pgfPTgradendcolor at r-\pgfPTgradstartcolor at r}\edef\pgfPTgrad at delta@r{\pgfmathresult}%
+\pgfmathparse{\pgfPTgradendcolor at g-\pgfPTgradstartcolor at g}\edef\pgfPTgrad at delta@g{\pgfmathresult}%
+\pgfmathparse{\pgfPTgradendcolor at b-\pgfPTgradstartcolor at b}\edef\pgfPTgrad at delta@b{\pgfmathresult}%
+\pgfmathparse{sign(\pgfPTgrad at delta@r)}\edef\pgfPTgrad at delta@r at sign{\pgfmathresult}%
+\pgfmathparse{sign(\pgfPTgrad at delta@g)}\edef\pgfPTgrad at delta@g at sign{\pgfmathresult}%
+\pgfmathparse{sign(\pgfPTgrad at delta@b)}\edef\pgfPTgrad at delta@b at sign{\pgfmathresult}%
+\foreach \n in {1,...,\pgfPTgrad at steps}{%
+    \pgfmathparse{\pgfPTgradstartcolor at r+\pgfPTgrad at delta@r*(\n-1)/(\pgfPTgrad at steps-1)}\edef\pgfPTgrad at red{\pgfmathresult}%
+    \pgfmathparse{\pgfPTgradstartcolor at g+\pgfPTgrad at delta@g*(\n-1)/(\pgfPTgrad at steps-1)}\edef\pgfPTgrad at green{\pgfmathresult}%
+    \pgfmathparse{\pgfPTgradstartcolor at b+\pgfPTgrad at delta@b*(\n-1)/(\pgfPTgrad at steps-1)}\edef\pgfPTgrad at blue{\pgfmathresult}%
+    \pgfmathparse{int(\n-1+#2)}\edef\pgfPT at niplusstep{\pgfmathresult}%
+    \expandafter\xdef\csname pgfPTCScolor#1\@Roman\pgfPT at niplusstep\endcsname{*[rgb:\pgfPTgrad at red,\pgfPTgrad at green,\pgfPTgrad at blue]}%
+    }%
+}%
+%
+%
+% AUX MACRO FOR \xABCLEANING\xBB LISTS
+\def\@pgfPT at list@purge BEGIN,#1[#2]\relax{\expandafter\edef\csname#2\endcsname{#1}}%
+%
+%
+% BUBBLE SORT
+% adapted from https://tex.stackexchange.com/questions/481678/apply-a-numeric-bubble-sort-to-output-strings-which-are-specified-by-names-code
+\def\pgfPT at listterminator{-1}%
+\def\pgfPT at bubblesort#1\relax{\def\pgfPT at sortedlist{}\pgfPT at sortlist#1,\pgfPT at listterminator,\relax}%
+\def\pgfPT at sortlist#1,#2,#3\relax{%
+  \ifnum#2=\pgfPT at listterminator\relax%
+    \edef\pgfPT at sortedlist{\pgfPT at sortedlist#1}%
+  \else
+    \ifnum#1<#2\relax%
+      \edef\pgfPT at sortedlist{\pgfPT at sortedlist#1,}%
+      \pgfPT at sortlist#2,#3\relax%
+    \else%
+      \let\pgfPT at tmplist\pgfPT at sortedlist%
+      \def\pgfPT at sortedlist{}%
+      \expandafter\pgfPT at sortlist\pgfPT at tmplist#2,#1,#3\relax%
+    \fi%
+  \fi%
+}%
+%
+%
+% THE COLOR MACROS
+\def\@pgfPT at grad@get at n@Gcolor G#1=#2\relax{\edef\@pgfPT at grad@ntmp{#1}\edef\@pgfPT at grad@colortmp{#2}}%
+\def\@pgfPT at grad@get at n@Pcolor P#1=#2\relax{\edef\@pgfPT at grad@ntmp{#1}\edef\@pgfPT at grad@colortmp{#2}}%
+%
+\def\pgfPT at assign@color#1{\expandafter\pgfPT at teststar#1\relax}%
+\def\pgfPT at teststar#1#2\relax{\edef\pgfPT at test{#1}\edef\pgfPT at charstar{*}%
+\ifx\pgfPT at test\pgfPT at charstar\relax\pgfPT at assign@color at bymodel{#2}\else\pgfPT at assign@color at byname{#1#2}\fi%
+}%
+\def\pgfPT at assign@color at bymodel#1{\expandafter\@pgfPT at assign@color at bymodel#1\relax}%
+\def\@pgfPT at assign@color at bymodel[#1:#2]\relax{%
+\edef\@pgfPT at assign@color at bymodel@arg{BEGIN}\expandafter\@pgfPT at assign@color at bymodel@process at arg#2;\relax%
+\expandafter\@pgfPT at list@purge \@pgfPT at assign@color at bymodel@arg[@pgfPT at assign@color at bymodel@arg]\relax%
+\definecolor{pgfPTtmpassignedcolor}{#1}{\@pgfPT at assign@color at bymodel@arg}\colorlet{pgfPTassignedcolor}[rgb]{pgfPTtmpassignedcolor}%
+}%
+\def\@pgfPT at assign@color at bymodel@process at arg#1;#2\relax{%
+\edef\teste{#2}%
+\ifx\teste\pgfPT at relax\edef\@pgfPT at assign@color at bymodel@arg{\@pgfPT at assign@color at bymodel@arg,#1}\else%
+\edef\@pgfPT at assign@color at bymodel@arg{\@pgfPT at assign@color at bymodel@arg,#1}\expandafter\@pgfPT at assign@color at bymodel@process at arg#2\relax\fi%
+}%
+\def\pgfPT at assign@color at byname#1{\colorlet{pgfPTassignedcolor}[rgb]{#1}}%
+%
+%
+% COMBINE TWO CS
+%          mode: 0 -> add ; 1 -> sub ; 2 -> linear
+\def\pgfPTCScombine{\@ifnextchar[\pgfPT at CS@combine{\@pgfPT at CS@combine at nooptions}}%
+\def\@pgfPT at CS@combine at nooptions#1{%
+\edef\pgfPT at CS@combine at options@mode{2}%
+\edef\pgfPT at CS@combine at options@prop at i{1}%
+\edef\pgfPT at CS@combine at options@prop at ii{1}%
+\expandafter\@pgfPT at CS@combine[1:1,0]#1\relax%
+}%
+\def\pgfPT at CS@combine[#1]#2{\ignorespaces%
+\edef\pgfPT at CS@combine at options@prop at i{1}%
+\edef\pgfPT at CS@combine at options@prop at ii{1}%
+\edef\pgfPT at CS@combine at options@mode{0}% add
+\def\pgfPT at CS@combine at options@firstchar##1##2\relax{\edef\pgfPT at tmp{##1}}%
+\@for\@pgfPT at tmp:=#1\do{%
+        \expandafter\pgfPT at CS@combine at options@firstchar\@pgfPT at tmp\relax%
+        \ifcat1\pgfPT at tmp\relax\pgfPT at temptrue%
+            \def\pgfPT at CS@combine at options@ispropOK##1##2##3##4##5 \relax{\edef\pgfPT at proptestOK{:}%
+                  \edef\pgfPT at proptotest{##2}\ifx\pgfPT at proptestOK\pgfPT at proptotest\pgfPT at tempfalse%
+                  \else\edef\pgfPT at proptotest{##3}\ifx\pgfPT at proptestOK\pgfPT at proptotest\pgfPT at tempfalse%
+                  \else\edef\pgfPT at proptotest{##4}\ifx\pgfPT at proptestOK\pgfPT at proptotest\pgfPT at tempfalse%
+                  \else\edef\pgfPT at proptotest{##5}\ifx\pgfPT at proptestOK\pgfPT at proptotest\pgfPT at tempfalse%
+                  \else\ifpgfPT at temp\PackageError{pgfPT}{\string\pgfPTCScombine: something went wrong in '\detokenize{#1}'\space: did you use the proportion sign ':'? The maximum value of proportion is 999... Default value '1:1' will be used...}{}\fi\relax%
+                  \fi\fi\fi\fi%
+                  }%
+            \expandafter\pgfPT at CS@combine at options@ispropOK\@pgfPT at tmp END \relax%
+            \ifpgfPT at temp\else\def\pgfPT at CS@combine at options@getprop##1:##2\relax{\edef\pgfPT at CS@combine at options@prop at i{##1}\edef\pgfPT at CS@combine at options@prop at ii{##2}}%
+            \expandafter\pgfPT at CS@combine at options@getprop\@pgfPT at tmp\relax\fi%
+        \else%
+            \pgfPT at temptrue% se acabar os ifx sem encontrar o handler gera a msg de erro...
+            \edef\pgfPT at CS@combine at options@tmpmode{add}%
+            \ifx\@pgfPT at tmp\pgfPT at CS@combine at options@tmpmode\pgfPT at tempfalse%
+                \edef\pgfPT at CS@combine at options@mode{0}%
+            \else%
+            \edef\pgfPT at CS@combine at options@tmpmode{sub}%
+            \ifx\@pgfPT at tmp\pgfPT at CS@combine at options@tmpmode\pgfPT at tempfalse%
+                \edef\pgfPT at CS@combine at options@mode{1}%
+            \else%
+            \edef\pgfPT at CS@combine at options@tmpmode{linear}%
+            \ifx\@pgfPT at tmp\pgfPT at CS@combine at options@tmpmode\pgfPT at tempfalse%
+                \edef\pgfPT at CS@combine at options@mode{2}%
+            \else%handler not found
+            \ifpgfPT at temp\PackageError{pgfPT}{\string\pgfPTCScombine: '\@pgfPT at tmp'\space in '\detokenize{#1}'\space not known! Default value 'add' will be used...}{}\fi\relax%
+            \fi\fi\fi%
+        \fi%
+        }%
+\expandafter\@pgfPT at CS@combine[\pgfPT at CS@combine at options@prop at i:\pgfPT at CS@combine at options@prop at ii,\pgfPT at CS@combine at options@mode]#2\relax%
+}%
+\def\@pgfPT at CS@combine[#1:#2,#3]#4\relax{\ignorespaces%
+\def\@pgfPT at CS@getNames##1,##2,##3\relax{\edef\@pgfPT at CS@name at i{##1}\edef\@pgfPT at CS@name at ii{##2}\edef\@pgfPT at CS@name at iii{##3}}%
+\expandafter\@pgfPT at CS@getNames#4\relax%
+\edef\pgfPT at CStmp@one{\csname pgfPT at backColorsScheme@\@pgfPT at CS@name at i\endcsname}
+\edef\pgfPT at CStmp@two{\csname pgfPT at backColorsScheme@\@pgfPT at CS@name at ii\endcsname}
+\if\pgfPT at CStmp@one\pgfPT at relax%
+\PackageError{pgfPT}{\string\pgfPTCScombine: the color scheme '\@pgfPT at CS@name at i'\space is not defined! A full white color scheme will be used...}{}%
+\pgfPTnewColorScheme[1/1/1]{pgfPTCSnameerror}{1/1/1}%
+\edef\pgfPT at CStmp@one{pgfPT at backColorsScheme@pgfPTCSnameerror}%
+\fi%
+\if\pgfPT at CStmp@two\pgfPT at relax%
+\PackageError{pgfPT}{\string\pgfPTCScombine: the color scheme '\@pgfPT at CS@name at ii'\space is not defined! A full white color scheme will be used...}{}%
+\pgfPTnewColorScheme[1/1/1]{pgfPTCSnameerror}{1/1/1}%
+\edef\pgfPT at CStmp@two{pgfPT at backColorsScheme@pgfPTCSnameerror}%\fi%
+\fi%
+% sum...
+\edef\@pgfPT at listtosum{(\pgfPT at CStmp@one+\pgfPT at CStmp@two)}%
+\expandafter\pgfPT at somalistas\@pgfPT at listtosum\relax%
+% DO THE NEW CS
+\pgfPTnewColorScheme[1/1/1]{\@pgfPT at CS@name at iii}{\pgfPT at sum@list}%
+}% END \pgfPTCScombine
+%
+% SUM TWO LISTS
+\edef\@pgfPT at ENDLIST{ENDLIST}%
+\def\pgfPT at somalistas(#1+#2){%
+\edef\pgfPT at lista@i{0}\edef\pgfPT at lista@ii{0}\edef\pgfPT at lista@control{0}\edef\pgfPT at somafeita{0}%
+\edef\pgfPT at sum@list{BEGIN}%
+\edef\pgfPT at listas{#1,\@pgfPT at ENDLIST+#2,\@pgfPT at ENDLIST}\expandafter\@pgfPT at somalistas\pgfPT at listas\relax%
+}%
+\def\@pgfPT at somalistas#1,#2+#3,#4\relax{\ignorespaces%
+\ifcase\pgfPT at lista@control\relax%
+% case 0: both have values
+\expandafter\pgfPT at lista@i at rgb#1\relax%
+\expandafter\pgfPT at lista@ii at rgb#3\relax%
+\ifcase\pgfPT at CS@combine at options@mode\relax%
+% 0 -> add
+\@pgfPT at mix@additive[\pgfPT at CS@combine at options@prop at i:\pgfPT at CS@combine at options@prop at ii](\pgfPT at lista@i at r/\pgfPT at lista@i at g/\pgfPT at lista@i at b,\pgfPT at lista@ii at r/\pgfPT at lista@ii at g/\pgfPT at lista@ii at b)%
+\or% 1 -> sub
+\@pgfPT at mix@subtractive[\pgfPT at CS@combine at options@prop at i:\pgfPT at CS@combine at options@prop at ii](\pgfPT at lista@i at r/\pgfPT at lista@i at g/\pgfPT at lista@i at b,\pgfPT at lista@ii at r/\pgfPT at lista@ii at g/\pgfPT at lista@ii at b)%
+\or% 2 -> linear
+\@pgfPT at mix@linear[\pgfPT at CS@combine at options@prop at i:\pgfPT at CS@combine at options@prop at ii](\pgfPT at lista@i at r/\pgfPT at lista@i at g/\pgfPT at lista@i at b,\pgfPT at lista@ii at r/\pgfPT at lista@ii at g/\pgfPT at lista@ii at b)%
+\fi%
+\or% case 1: list one ended
+\expandafter\pgfPT at lista@ii at rgb#1#3\relax%
+\ifcase\pgfPT at CS@combine at options@mode\relax%
+% 0 -> add
+\@pgfPT at mix@additive[\pgfPT at CS@combine at options@prop at i:\pgfPT at CS@combine at options@prop at ii](\pgfPT at lista@i at lastval@r/\pgfPT at lista@i at lastval@g/\pgfPT at lista@i at lastval@b,\pgfPT at lista@ii at r/\pgfPT at lista@ii at g/\pgfPT at lista@ii at b)%
+\or% 1 -> sub
+\@pgfPT at mix@subtractive[\pgfPT at CS@combine at options@prop at i:\pgfPT at CS@combine at options@prop at ii](\pgfPT at lista@i at lastval@r/\pgfPT at lista@i at lastval@g/\pgfPT at lista@i at lastval@b,\pgfPT at lista@ii at r/\pgfPT at lista@ii at g/\pgfPT at lista@ii at b)%
+\or% 2 -> linear
+\@pgfPT at mix@linear[\pgfPT at CS@combine at options@prop at i:\pgfPT at CS@combine at options@prop at ii](\pgfPT at lista@i at lastval@r/\pgfPT at lista@i at lastval@g/\pgfPT at lista@i at lastval@b,\pgfPT at lista@ii at r/\pgfPT at lista@ii at g/\pgfPT at lista@ii at b)%
+\fi%
+\or% case 2: list two ended
+\expandafter\pgfPT at lista@i at rgb#1\relax%
+\ifcase\pgfPT at CS@combine at options@mode\relax%
+% 0 -> add
+\@pgfPT at mix@additive[\pgfPT at CS@combine at options@prop at i:\pgfPT at CS@combine at options@prop at ii](\pgfPT at lista@i at r/\pgfPT at lista@i at g/\pgfPT at lista@i at b,\pgfPT at lista@ii at lastval@r/\pgfPT at lista@ii at lastval@g/\pgfPT at lista@ii at lastval@b)%
+\or% 1 -> sub
+\@pgfPT at mix@subtractive[\pgfPT at CS@combine at options@prop at i:\pgfPT at CS@combine at options@prop at ii](\pgfPT at lista@i at r/\pgfPT at lista@i at g/\pgfPT at lista@i at b,\pgfPT at lista@ii at lastval@r/\pgfPT at lista@ii at lastval@g/\pgfPT at lista@ii at lastval@b)%
+\or% 2 -> linear
+\@pgfPT at mix@linear[\pgfPT at CS@combine at options@prop at i:\pgfPT at CS@combine at options@prop at ii](\pgfPT at lista@i at r/\pgfPT at lista@i at g/\pgfPT at lista@i at b,\pgfPT at lista@ii at lastval@r/\pgfPT at lista@ii at lastval@g/\pgfPT at lista@ii at lastval@b)%
+\fi%
+\or% case 3: both lists ended
+\expandafter\@pgfPT at list@purge \pgfPT at sum@list[pgfPT at sum@list]\relax%
+\edef\pgfPT at somafeita{1}%
+\fi%
+\edef\pgfPT at teste{#2}\ifx\pgfPT at teste\@pgfPT at ENDLIST\edef\pgfPT at lista@i{1}\fi%
+\edef\pgfPT at teste{#4}\ifx\pgfPT at teste\@pgfPT at ENDLIST\edef\pgfPT at lista@ii{2}\fi%
+\ifnum\pgfPT at lista@i=1\relax\ifnum\pgfPT at lista@control=0\relax\edef\pgfPT at lista@i at lastval@r{\pgfPT at lista@i at r}%
+\edef\pgfPT at lista@i at lastval@g{\pgfPT at lista@i at g}\edef\pgfPT at lista@i at lastval@b{\pgfPT at lista@i at b}\fi%
+\edef\pgfPT at lista@i at remainder{,\@pgfPT at ENDLIST}\else\edef\pgfPT at lista@i at remainder{#2}\fi%
+\ifnum\pgfPT at lista@ii=2\relax\ifnum\pgfPT at lista@control=0\relax\edef\pgfPT at lista@ii at lastval@r{\pgfPT at lista@ii at r}%
+\edef\pgfPT at lista@ii at lastval@g{\pgfPT at lista@ii at g}\edef\pgfPT at lista@ii at lastval@b{\pgfPT at lista@ii at b}\fi%
+\edef\pgfPT at lista@ii at remainder{,\@pgfPT at ENDLIST}\else\edef\pgfPT at lista@ii at remainder{#4}\fi%
+\pgfmathparse{int(\pgfPT at lista@i+\pgfPT at lista@ii)}\edef\pgfPT at lista@control{\pgfmathresult}%
+\ifnum\pgfPT at somafeita=0\relax\edef\pgfPT at sum@list{\pgfPT at sum@list,\pgfPT at CS@mix at r/\pgfPT at CS@mix at g/\pgfPT at CS@mix at b}%
+\edef\pgfPT at listas{\pgfPT at lista@i at remainder+\pgfPT at lista@ii at remainder}\expandafter\@pgfPT at somalistas\pgfPT at listas\relax\fi%
+}%
+\def\pgfPT at lista@i at rgb#1/#2/#3\relax{\edef\pgfPT at lista@i at r{#1}\edef\pgfPT at lista@i at g{#2}\edef\pgfPT at lista@i at b{#3}}%
+\def\pgfPT at lista@ii at rgb#1/#2/#3\relax{\edef\pgfPT at lista@ii at r{#1}\edef\pgfPT at lista@ii at g{#2}\edef\pgfPT at lista@ii at b{#3}}%
+%
+%
+% ---- Adding two colors (subtractive) with n parts of color one and k parts of color two ----
+% Actually, you get green from mixing (subtractively) yellow and cyan.
+% Yellow is red + green (255, 255, 0), cyan is green + blue (0, 255, 255).
+% Now make their opposite colors: blue (0, 0, 255) and red (255, 0, 0).
+% Mix them additively and you get purple (255, 0, 255).
+% Make its opposite and you get green (0, 255, 0).
+% In other words, you can get a subtractive mix as the opposite of the additive mix of the opposites of your two colors.
+% Finding a complementary color is very simple in the RGB model:
+% For any given color, for example, red (#FF0000), you need to find the color, which, after being added to red, creates white (0xFFFFFF).
+% Naturally, all you need to do, is subtract red from white and get cyan (0xFFFFFF - 0xFF0000 = 0x00FFFF).
+\def\pgfPT at mix@subtractive{\@ifnextchar[\@pgfPT at mix@subtractive{\@pgfPT at mix@subtractive[1:1]}}%
+\def\@pgfPT at mix@subtractive[#1:#2](#3/#4/#5,#6/#7/#8){%
+% color one -> opposite(color one) = (1-red)/(1-green)/(1-blue)
+\pgfmathparse{1-#3}\edef\pgfPT at CS@colorone at not@r{\pgfmathresult}%
+\pgfmathparse{1-#4}\edef\pgfPT at CS@colorone at not@g{\pgfmathresult}%
+\pgfmathparse{1-#5}\edef\pgfPT at CS@colorone at not@b{\pgfmathresult}%
+% color two -> opposite(color two) = (1-red)/(1-green)/(1-blue)
+\pgfmathparse{1-#6}\edef\pgfPT at CS@colortwo at not@r{\pgfmathresult}%
+\pgfmathparse{1-#7}\edef\pgfPT at CS@colortwo at not@g{\pgfmathresult}%
+\pgfmathparse{1-#8}\edef\pgfPT at CS@colortwo at not@b{\pgfmathresult}%
+% sum opposite(color one) + opposite(color two)
+\pgfmathparse{#1*\pgfPT at CS@colorone at not@r+#2*\pgfPT at CS@colortwo at not@r}\edef\pgfPT at CS@sum at r{\pgfmathresult}%
+\pgfmathparse{#1*\pgfPT at CS@colorone at not@g+#2*\pgfPT at CS@colortwo at not@g}\edef\pgfPT at CS@sum at g{\pgfmathresult}%
+\pgfmathparse{#1*\pgfPT at CS@colorone at not@b+#2*\pgfPT at CS@colortwo at not@b}\edef\pgfPT at CS@sum at b{\pgfmathresult}%
+%
+\pgfmathparse{max(\pgfPT at CS@sum at r,\pgfPT at CS@sum at g,\pgfPT at CS@sum at b)}\edef\pgfPT at CS@sum at max{\pgfmathresult}%
+\pgfmathgreater{\pgfPT at CS@sum at max}{1}\edef\pgfPT at CS@sum at maxIsGreater{\pgfmathresult}%
+\ifnum\pgfPT at CS@sum at maxIsGreater=1\relax%
+\pgfmathparse{\pgfPT at CS@sum at r/\pgfPT at CS@sum at max}\edef\pgfPT at CS@sum at r{\pgfmathresult}%
+\pgfmathparse{\pgfPT at CS@sum at g/\pgfPT at CS@sum at max}\edef\pgfPT at CS@sum at g{\pgfmathresult}%
+\pgfmathparse{\pgfPT at CS@sum at b/\pgfPT at CS@sum at max}\edef\pgfPT at CS@sum at b{\pgfmathresult}%
+\fi%
+% opposite sum
+\pgfmathparse{1-\pgfPT at CS@sum at r}\edef\pgfPT at CS@mix at r{\pgfmathresult}%
+\pgfmathparse{1-\pgfPT at CS@sum at g}\edef\pgfPT at CS@mix at g{\pgfmathresult}%
+\pgfmathparse{1-\pgfPT at CS@sum at b}\edef\pgfPT at CS@mix at b{\pgfmathresult}%
+%
+\definecolor{pgfPTmixedcolor}{rgb}{\pgfPT at CS@mix at r,\pgfPT at CS@mix at g,\pgfPT at CS@mix at b}%
+}%
+%
+% ---- Adding two colors (additive) with n parts of color one and k parts of color two ----
+\def\pgfPT at mix@additive{\@ifnextchar[\@pgfPT at mix@additive{\@pgfPT at mix@additive[1:1]}}%
+\def\@pgfPT at mix@additive[#1:#2](#3/#4/#5,#6/#7/#8){%
+\pgfmathparse{#1*#3+#2*#6}\edef\pgfPT at CS@mix at r{\pgfmathresult}%
+\pgfmathparse{#1*#4+#2*#7}\edef\pgfPT at CS@mix at g{\pgfmathresult}%
+\pgfmathparse{#1*#5+#2*#8}\edef\pgfPT at CS@mix at b{\pgfmathresult}%
+\pgfmathparse{max(\pgfPT at CS@mix at r,\pgfPT at CS@mix at g,\pgfPT at CS@mix at b)}\edef\pgfPT at CS@sum at max{\pgfmathresult}%
+\pgfmathgreater{\pgfPT at CS@sum at max}{1}\edef\pgfPT at CS@sum at maxIsGreater{\pgfmathresult}%
+\ifnum\pgfPT at CS@sum at maxIsGreater=1\relax%
+\pgfmathparse{\pgfPT at CS@mix at r/\pgfPT at CS@sum at max}\edef\pgfPT at CS@mix at r{\pgfmathresult}%
+\pgfmathparse{\pgfPT at CS@mix at g/\pgfPT at CS@sum at max}\edef\pgfPT at CS@mix at g{\pgfmathresult}%
+\pgfmathparse{\pgfPT at CS@mix at b/\pgfPT at CS@sum at max}\edef\pgfPT at CS@mix at b{\pgfmathresult}%
+\fi%
+\definecolor{pgfPTmixedcolor}{rgb}{\pgfPT at CS@mix at r,\pgfPT at CS@mix at g,\pgfPT at CS@mix at b}%
+}%
+%
+% Color mixing (as in xcolor)
+%           \xAB In general, we use linear interpolation for color mixing: mix(C1, C2, p) = p * C1 + (1 - p) * C2 \xBB
+\def\pgfPT at mix@linear{\@ifnextchar[\@pgfPT at mix@linear{\@pgfPT at mix@linear[1:1]}}%
+\def\@pgfPT at mix@linear[#1:#2](#3/#4/#5,#6/#7/#8){%
+\pgfmathparse{#1/(#1+#2)}\edef\pgfPT at CS@mix at p{\pgfmathresult}%
+\pgfmathparse{\pgfPT at CS@mix at p*#3+(1-\pgfPT at CS@mix at p)*#6}\edef\pgfPT at CS@mix at r{\pgfmathresult}%
+\pgfmathparse{\pgfPT at CS@mix at p*#4+(1-\pgfPT at CS@mix at p)*#7}\edef\pgfPT at CS@mix at g{\pgfmathresult}%
+\pgfmathparse{\pgfPT at CS@mix at p*#5+(1-\pgfPT at CS@mix at p)*#8}\edef\pgfPT at CS@mix at b{\pgfmathresult}%
+\definecolor{pgfPTmixedcolor}{rgb}{\pgfPT at CS@mix at r,\pgfPT at CS@mix at g,\pgfPT at CS@mix at b}%
+}%
+%
+%
+% \pgfPTCSwrite[filename]{List of CSNames}
+\begingroup%
+\catcode`\|=0%
+\catcode`\\=11%
+|gdef|pgfPTCSwrite{|@ifnextchar[|pgfPT at CSwrite{|pgfPT at CSwrite[]}}%
+|gdef|pgfPT at CSwrite[#1]#2{%
+|pgfPT at tempfalse%
+|edef|pgfPT at CSnamesprovided{#2}%
+|ifx|pgfPT at CSnamesprovided|pgfPT at relax%
+|PackageError{pgfPT}{\pgfPTCSwrite: no Color Scheme names provided. No file will be written...}{}|relax%
+|else%
+|pgfPT at temptrue|relax%
+|xdef|pgfPT at filenameprovided{#1}%
+|ifx|pgfPT at filenameprovided|pgfPT at relax|relax%
+% setting the file name with the first name of the list
+|def|pgfPT at setfilename##1,##2 |relax{|edef|pgfPT at filename{##1}}%
+|expandafter|pgfPT at setfilename#2, |relax%
+|else%
+|edef|pgfPT at filename{#1}%
+|fi|fi%
+|ifpgfPT at temp%
+|immediate|newwrite|pgfPT at CSfile%
+|immediate|openout|pgfPT at CSfile=|pgfPT at filename.tex%
+|@for|@pgfPT at tmp:=#2|do{%
+|edef|pgfPT at CS@contents{|csname pgfPT at backColorsScheme@|@pgfPT at tmp|endcsname}%
+|if|pgfPT at CS@contents|relax%
+|PackageError{pgfPT}{\pgfPTCSwrite: the named Color Scheme you provided ('|@pgfPT at tmp') doesn't exist. It will not be written to file...}{}|relax%
+|else%
+|immediate|write|pgfPT at CSfile{%
+\pgfPTnewColorScheme{|@pgfPT at tmp}{|pgfPT at CS@contents}%
+}%
+|fi%
+}% end do
+|immediate|closeout|pgfPT at CSfile%
+|fi% pgfPT at temp
+}%
+|endgroup%
+%
+%
+\makeatother%
+\endinput


Property changes on: branches/branch2022.final/Master/texmf-dist/doc/latex/pgf-periodictable/pgfPTlibrary.colorschemes.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: branches/branch2022.final/Master/texmf-dist/tex/latex/pgf-periodictable/pgf-PeriodicTable.sty
===================================================================
--- branches/branch2022.final/Master/texmf-dist/tex/latex/pgf-periodictable/pgf-PeriodicTable.sty	2023-02-21 20:52:23 UTC (rev 66034)
+++ branches/branch2022.final/Master/texmf-dist/tex/latex/pgf-periodictable/pgf-PeriodicTable.sty	2023-02-21 20:53:00 UTC (rev 66035)
@@ -1,9 +1,10 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Hugo Gomes @ 20/02/2023 (v2.0.0)
 % Hugo Gomes @ 08/11/2022 (v1.0.1)
 % Hugo Gomes @ 10/10/2022 (v1.0.0)
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \NeedsTeXFormat{LaTeX2e}%
-\ProvidesPackage{pgf-PeriodicTable}[08/11/2022 pgf-PeriodicTable v1.0.1]%%
+\ProvidesPackage{pgf-PeriodicTable}[20/02/2023 pgf-PeriodicTable v2.0.0]%%
 \RequirePackage{tikz}%
 \usetikzlibrary{fadings}%
 \tikzfading[name=aumentax, left color=transparent!80, right color=transparent!1]%
@@ -41,6 +42,7 @@
 \def\pgfPT at TRUE{TRUE}%
 \def\pgfPT at false{false}%
 \def\pgfPT at relax{}%
+\def\pgfPT at space{ }%
 \def\pgfPT at unit@d at gcm{g/cm3}% v1.0.1
 \def\pgfPT at unit@d at gdm{g/dm3}% v1.0.1
 \def\pgfPT at unit@d at both{both}% v1.0.1
@@ -68,6 +70,7 @@
 \input{pgfPT.names.tex}% Loading the names of the elements in the Periodic Table
 \input{pgfPT.labels.tex}% Loading language labels
 \input{pgfPT.process.language.tex}% Macros for process language labels
+\input{pgfPT.input.library.tex}% Loading the input library mechanism (new v2.0.0)
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 % --------------------------------------------------------------------------------------------------
 % commands #################################################
@@ -2755,7 +2758,9 @@
 % internal macro -> pgfPT at processlist -----------------------------------------------------------
 % Analyze the key and store the list of Z numbers in \pgfPT@@cellslist ------------------------
 \def\pgfPT at processlist{%
-    \ifcat1\pgfPTcells\relax%
+\def\pgfPT at processlist@firstchar##1##2\relax{\edef\pgfPT at tmp{##1}}%
+\expandafter\pgfPT at processlist@firstchar\pgfPTcells\relax%
+    \ifcat1\pgfPT at tmp\relax%
         %\pgfPTcells is a list of Z numbers
         \edef\pgfPT@@cellslist{\pgfPTcells}%
     \else%

Modified: branches/branch2022.final/Master/texmf-dist/tex/latex/pgf-periodictable/pgfPT.backcolors.keys.tex
===================================================================
--- branches/branch2022.final/Master/texmf-dist/tex/latex/pgf-periodictable/pgfPT.backcolors.keys.tex	2023-02-21 20:52:23 UTC (rev 66034)
+++ branches/branch2022.final/Master/texmf-dist/tex/latex/pgf-periodictable/pgfPT.backcolors.keys.tex	2023-02-21 20:53:00 UTC (rev 66035)
@@ -28,7 +28,7 @@
 \xglobal\colorlet{cpgfPTTMP}{cpgfPTTMP}%
 }%
 \def\pgfPT at newColorScheme@noptions#1#2{%
-\expandafter\def\csname pgfPT at backColorsScheme@#1\endcsname{#2,1/1/1}%
+\expandafter\edef\csname pgfPT at backColorsScheme@#1\endcsname{#2,1/1/1}%
 \definecolor{cpgfPTTMP}{rgb}{1,1,1}%
 \xglobal\colorlet{cpgfPTTMP}{cpgfPTTMP}%
 }%
@@ -53,24 +53,24 @@
 csSolid/.style={back color scheme=solid,back color=#1}%
 }% STYLES -> csSoft,csJmol,csCPK,csRasmol,csRasmolNew,csWikipedia,csMNM,csPS,csRadio,csBlocks,csSolid
 % setting keys with default values ---------------------------------------------------------------
-\pgfkeys{/pgfPerTable/.cd,back color scheme,back color}
+\pgfkeys{/pgfPerTable/.cd,back color scheme,back color}%
 % end !! PGF keys: the cells of the periodic table to be drawn ----------------------------------
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \def\pgfPTcolorSchemeInfo{%
 \global\pgfPT at dima=0pt\relax%
-\foreach \Z in {1,...,118}{\path (-\pgfPTcellwd,-10pt*\Z) rectangle node[midway,font=\tiny\bfseries] {Z=\Z} ++(\pgfPTcellwd,-10pt);}
-\foreach \cs in {default,Soft,Jmol,CPK,Rasmol,RasmolNew,Wikipedia,MNM,PS,Radio,Blocks}{
-    \node[below right,text width=\pgfPTcellwd,text centered,font=\tiny,inner xsep=0pt] at (\pgfPT at dima,0pt) {\cs};
-    \path (\pgfPTcellwd+\pgfPT at dima,0pt) rectangle node[midway,font=\tiny\bfseries] {(r,g,b)} ++(2*\pgfPTcellwd,-10pt);
+\foreach \Z in {1,...,118}{\path (-\pgfPTcellwd,-10pt*\Z) rectangle node[midway,font=\tiny\bfseries] {Z=\Z} ++(\pgfPTcellwd,-10pt);}%
+\foreach \cs in {default,Soft,Jmol,CPK,Rasmol,RasmolNew,Wikipedia,MNM,PS,Radio,Blocks}{%
+    \node[below right,text width=\pgfPTcellwd,text centered,font=\tiny,inner xsep=0pt] at (\pgfPT at dima,0pt) {\cs};%
+    \path (\pgfPTcellwd+\pgfPT at dima,0pt) rectangle node[midway,font=\tiny\bfseries] {(r,g,b)} ++(2*\pgfPTcellwd,-10pt);%
     \edef\pgfPT@@colorlist{\csname pgfPT at backColorsScheme@\cs\endcsname}%
-    \foreach \Z in {1,...,118}{
+    \foreach \Z in {1,...,118}{%
         \pgfPT at processbackcolor{\Z}%
-        \draw[fill=cpgfPTTMP] (\pgfPT at dima,-10pt*\Z) rectangle ++(\pgfPTcellwd,-10pt);
-        \pgfPT at extract@rgb at fill{cpgfPTTMP}
-        \draw (\pgfPTcellwd+\pgfPT at dima,-10pt*\Z) rectangle node[midway,font=\tiny\bfseries] {(\pgfPT at rf,\pgfPT at gf,\pgfPT at bf)} ++(2*\pgfPTcellwd,-10pt);
-        }
-    \draw[thick] (\pgfPT at dima,0pt) rectangle ++(3*\pgfPTcellwd,-1190pt);
+        \draw[fill=cpgfPTTMP] (\pgfPT at dima,-10pt*\Z) rectangle ++(\pgfPTcellwd,-10pt);%
+        \pgfPT at extract@rgb at fill{cpgfPTTMP}%
+        \draw (\pgfPTcellwd+\pgfPT at dima,-10pt*\Z) rectangle node[midway,font=\tiny\bfseries] {(\pgfPT at rf,\pgfPT at gf,\pgfPT at bf)} ++(2*\pgfPTcellwd,-10pt);%
+        }%
+    \draw[thick] (\pgfPT at dima,0pt) rectangle ++(3*\pgfPTcellwd,-1190pt);%
     \global\advance\pgfPT at dima by\pgfPTcellwd\global\advance\pgfPT at dima by\pgfPTcellwd\relax\global\advance\pgfPT at dima by\pgfPTcellwd\relax%
-    }
-}
+    }%
+}%
 \endinput



More information about the tex-live-commits mailing list.