texlive[59242] Master/texmf-dist: pgf-spectra (17may21)

commits+karl at tug.org commits+karl at tug.org
Mon May 17 22:42:40 CEST 2021


Revision: 59242
          http://tug.org/svn/texlive?view=revision&revision=59242
Author:   karl
Date:     2021-05-17 22:42:39 +0200 (Mon, 17 May 2021)
Log Message:
-----------
pgf-spectra (17may21)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/pgf-spectra/README
    trunk/Master/texmf-dist/doc/latex/pgf-spectra/pgf-spectraDataLSE.pdf
    trunk/Master/texmf-dist/doc/latex/pgf-spectra/pgf-spectraDataNIST.pdf
    trunk/Master/texmf-dist/doc/latex/pgf-spectra/pgf-spectraManual.pdf
    trunk/Master/texmf-dist/tex/latex/pgf-spectra/pgf-spectra.sty

Modified: trunk/Master/texmf-dist/doc/latex/pgf-spectra/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/pgf-spectra/README	2021-05-17 20:41:56 UTC (rev 59241)
+++ trunk/Master/texmf-dist/doc/latex/pgf-spectra/README	2021-05-17 20:42:39 UTC (rev 59242)
@@ -1,4 +1,4 @@
-This is pgf-spectra, version 2.0.0 (15/03/2021).
+This is pgf-spectra, version 2.1.0 (12/05/2021).
 
 This package provides the \pgfspectra[<options>] command which draws continuous and emission or absorption spectra for 98 elements and their ions. It was developed mainly for the writing of my own documentation and exams sheets supporting directly PDF output format.
 The drawing is made with the TikZ package and is based in the pst-spectra extension for PSTricks.
@@ -5,6 +5,43 @@
 ____________________________________________________________
 
 Major changes:
+The continuous visible region is now drawn via TikZ shading improving a little bit the speed of the whole process.
+Minor fix: the width of the emission/absortion lines are now correctly drawn
+New commands:
+- \tempercolor (correlated color temperature, Kelvin to rgb color)
+- \pgfspectrashade (for usage with TikZ package)
+- \pgfspectraplotshade (for usage with PGFPLOTS package)
+- \pgfspectraplotmap (for usage with PGFPLOTS package)
+- \pgfspectrarainbow (draws a rainbow)
+New keys for \pgfspectra:
+- use visible shading
+- backVIS
+- axis unit
+- axis unit precision
+Keys for \pgfspectraplotshade:
+- shade end
+- shade opacity
+- shade opacity color
+Keys for \pgfspectrarainbow:
+- rainbow fade
+- rainbow start
+- rainbow knock out
+- rainbow background
+- rainbow transparency
+____________________________________________________________
+
+** Requirements: TikZ package.
+** Installation: unpack everything in a directory in the TeX search path and refresh the TeX database.
+** Usage: just place \usepackage{pgf-spectra} in the preamble.
+** Contact the author: Hugo Gomes (hugo.parelho at gmail.com)
+** Licence: released under the LaTeX Project Public License v1.3 or later, see http://www.latex-project.org/lppl.txt
+____________________________________________________________
+
+Previous versions
+____________________________________________________________
+
+version 2.0.0 (15/03/2021).
+Major changes:
 - the 'window' of spectra now ranges from 10nm to 4000nm
  and the lines was updated. (In version 1.0 was 380nm to 740nm)
 - support for redshifted (blueshifted) lines
@@ -21,9 +58,35 @@
 - show redshift value
 ____________________________________________________________
 
-** Requirements: TikZ package.
-** Installation: unpack everything in a directory in the TeX search path and refresh the TeX database.
-** Usage: just place \usepackage{pgf-spectra} in the preamble.
-** Contact the author: Hugo Gomes (hugo.parelho at gmail.com)
-** Licence: released under the LaTeX Project Public License v1.3 or later, see http://www.latex-project.org/lppl.txt
-____________________________________________________________ 
\ No newline at end of file
+First release: version 1.0 (15/04/2016)
+Commands:
+- \pgfspectra
+- \wlcolor
+Keys:
+- element
+- width
+- height
+- back
+- charge
+- Imin
+- lines
+- line width
+- begin
+- end
+- axis step
+- axis color
+- axis font
+- axis font color
+- label position
+- label before text
+- label after text
+- label font
+- label font color
+- gamma
+- brightness
+- line intensity
+- relative intensity threshold
+- absorption
+- axis
+- label
+- relative intensity

Modified: trunk/Master/texmf-dist/doc/latex/pgf-spectra/pgf-spectraDataLSE.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/pgf-spectra/pgf-spectraDataNIST.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/pgf-spectra/pgf-spectraManual.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/tex/latex/pgf-spectra/pgf-spectra.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/pgf-spectra/pgf-spectra.sty	2021-05-17 20:41:56 UTC (rev 59241)
+++ trunk/Master/texmf-dist/tex/latex/pgf-spectra/pgf-spectra.sty	2021-05-17 20:42:39 UTC (rev 59242)
@@ -1,24 +1,31 @@
 % Hugo Gomes @ 15/04/2016 (v1.0)
 % Hugo Gomes @ 15/03/2021 (v2.0.0)
+% Hugo Gomes @ 12/05/2021 (v2.1.0)
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \NeedsTeXFormat{LaTeX2e}%
-\ProvidesPackage{pgf-spectra}[15/03/2021 pgf-spectra v2.0.0]%
+\ProvidesPackage{pgf-spectra}[12/05/2021 pgf-spectra v2.1.0]%
 \RequirePackage{tikz}%
-\DeclareOption{LSE}{\input{./spectra.data.LSE.tex}}%
-\DeclareOption{NIST}{\input{./spectra.data.NIST.tex}}%
+\DeclareOption{LSE}{\input{spectra.data.LSE.tex}}%
+\DeclareOption{NIST}{\input{spectra.data.NIST.tex}}%
 \ExecuteOptions{NIST}%
 \ProcessOptions\relax%
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\definecolor{wlIRcolor}{rgb}{.3157,.2373,.2373}% NEW
-\definecolor{wlUVcolor}{rgb}{.3,.2568,.3}% NEW
+\definecolor{wlIRcolor}{rgb}{.3157,.2373,.2373}% NEW v2.0.0
+\definecolor{wlUVcolor}{rgb}{.3,.2568,.3}% NEW v2.0.0
 %
+\newcount\wl at counta% tmp counter
+\newcount\wl at countb% tmp counter
+\newcount\wl at countc% tmp counter
+\newcount\wl at countd% tmp counter
+%
 \newif\ifwl at absorption%
 \newif\ifcur at elem@exist%
 \newif\ifwl at drawaxis%
 \newif\ifwl at axislabel%
 \newif\ifwl at intensity%
-\newif\ifwl at redshift% NEW
-\newif\ifwl at RSvalue% NEW
+\newif\ifwl at redshift% NEW v2.0.0
+\newif\ifwl at RSvalue% NEW v2.0.0
+\newif\ifwl at usevisibleshade% NEW v2.1.0
 % defining PGF keys
 \pgfkeys{/wl/.cd,%
 element/.get=\wl at element,%
@@ -33,15 +40,18 @@
 back/.get=\wl at back,%
 back/.store in=\wl at back,%
 back/.default=black,%
-backIRUV/.get=\wl at backnotvisible,% NEW
-backIRUV/.store in=\wl at backnotvisible,% NEW
-backIRUV/.default=black,% NEW
-IRcolor/.get=\wl at IRcolor,% NEW
-IRcolor/.store in=\wl at IRcolor,% NEW
-IRcolor/.default=wlIRcolor,% NEW
-UVcolor/.get=\wl at UVcolor,% NEW
-UVcolor/.store in=\wl at UVcolor,% NEW
-UVcolor/.default=wlUVcolor,% NEW
+backIRUV/.get=\wl at backnotvisible,% NEW v2.0.0
+backIRUV/.store in=\wl at backnotvisible,% NEW v2.0.0
+backIRUV/.default=black,% NEW v2.0.0
+backVIS/.get=\wl at backvisible,% NEW v2.1.0
+backVIS/.store in=\wl at backvisible,% NEW v2.1.0
+backVIS/.default=black,% NEW v2.1.0
+IRcolor/.get=\wl at IRcolor,% NEW v2.0.0
+IRcolor/.store in=\wl at IRcolor,% NEW v2.0.0
+IRcolor/.default=wlIRcolor,% NEW v2.0.0
+UVcolor/.get=\wl at UVcolor,% NEW v2.0.0
+UVcolor/.store in=\wl at UVcolor,% NEW v2.0.0
+UVcolor/.default=wlUVcolor,% NEW v2.0.0
 charge/.get=\wl at charge,%
 charge/.store in=\wl at charge,%
 charge/.default=0,%
@@ -63,9 +73,15 @@
 axis step/.get=\wl at axisstep,%
 axis step/.store in=\wl at axisstep,%
 axis step/.default=20,%
-axis ticks/.get=\wl at axisticks,% NEW
-axis ticks/.store in=\wl at axisticks,% NEW
-axis ticks/.default=0,% NEW
+axis unit/.get=\wl at axisunit,% NEW v2.1.0
+axis unit/.store in=\wl at axisunit,% NEW v2.1.0
+axis unit/.default=nm,% NEW v2.1.0
+axis unit precision/.get=\wl at axisunitprecision,% NEW v2.1.0
+axis unit precision/.store in=\wl at axisunitprecision,% NEW v2.1.0
+axis unit precision/.default=3,% NEW v2.1.0
+axis ticks/.get=\wl at axisticks,% NEW v2.0.0
+axis ticks/.store in=\wl at axisticks,% NEW v2.0.0
+axis ticks/.default=0,% NEW v2.0.0
 axis color/.get=\wl at axiscolor,%
 axis color/.store in=\wl at axiscolor,%
 axis color/.default=black,%
@@ -106,15 +122,17 @@
 axis/.is if=wl at drawaxis,%
 label/.is if=wl at axislabel,%
 relative intensity/.is if=wl at intensity,%
-redshift/.get=\wl at redshift,% NEW
-redshift/.store in=\wl at redshift,% NEW
-redshift/.default={},% NEW
-show redshift value/.is if=wl at RSvalue% NEW
+redshift/.get=\wl at redshift,% NEW v2.0.0
+redshift/.store in=\wl at redshift,% NEW v2.0.0
+redshift/.default={},% NEW v2.0.0
+show redshift value/.is if=wl at RSvalue,% NEW v2.0.0
+use visible shading/.is if=wl at usevisibleshade% NEW v2.1.0
 }%
 % setting keys with default values
-\pgfkeys{/wl/.cd,element,width,height,back,backIRUV,IRcolor,UVcolor,charge,Imin,lines,line width,begin,end,% NEW -> backIRUV,IRcolor,UVcolor
-axis color,axis font,axis font color,axis step,axis ticks,label position,label before text,label after text,label font,label font color,gamma,brightness,line intensity,%
-relative intensity threshold,absorption=false,axis=false,label=false,relative intensity=false,redshift,show redshift value=false}% NEW -> redshift, show redshift value
+\pgfkeys{/wl/.cd,element,width,height,back,backIRUV,IRcolor,UVcolor,charge,Imin,lines,line width,begin,end,% NEW v2.0.0 -> backIRUV,IRcolor,UVcolor
+axis color,axis font,axis font color,axis step,axis unit,axis unit precision,axis ticks,label position,label before text,label after text,label font,label font color,gamma,brightness,line intensity,% NEW v2.1.0 -> axis unit,axis unit precision
+relative intensity threshold,absorption=false,axis=false,label=false,relative intensity=false,redshift,show redshift value=false,% NEW v2.0.0 -> redshift, show redshift value
+use visible shading,backVIS}% NEW v2.1.0 -> use visible shading
 % strings for \ifx tests
 \def\wlN at NE{NONE}%
 \def\wl at ll{all}%
@@ -121,20 +139,24 @@
 \def\wl at visible{visible}%
 \def\wl at visible@list{visible,visible5,visible10,visible15,visible20,visible25,visible30,visible35,visible40,visible45,visible50,visible55,visible60,visible65,visible70,visible75,visible80,visible85,visible90,visible95,visible100}%
 \def\wl at label@position at list{west,north west,north,north east,east,south east,south,south west}%
-\def\wl at redshift@D{D}% NEW
+\def\wl at redshift@D{D}% NEW v2.0.0
+\def\wl at axisunit@nm{nm}% NEW v2.1.0
+\def\wl at axisunit@um{micron}% NEW v2.1.0
+\def\wl at axisunit@A{A}% NEW v2.1.0
 %%%% COMMANDS -------------------------------------------------------------------------------->
 % commands ##################################################
-\newif\ifpgfspectra at StyleIsDef\pgfspectra at StyleIsDeffalse% NEW
-% \pgfspectraStyle[options]% NEW
+\newif\ifpgfspectra at StyleIsDef\pgfspectra at StyleIsDeffalse% NEW v2.0.0
+% \pgfspectraStyle[options]% NEW v2.0.0
 \def\pgfspectraStyle[#1]{\pgfspectraStyleReset\pgfspectra at StyleIsDeftrue\relax\tikzset{/wl/.cd,#1}%
 \def\pgfspectra at DoStyle{\tikzset{/wl/.cd,#1}}% applies storing user style for future use
-}% NEW
-% \pgfspectraStyleReset% NEW
+}% NEW v2.0.0
+% \pgfspectraStyleReset% NEW v2.0.0
 \def\pgfspectraStyleReset{\pgfspectra at StyleIsDeffalse\tikzset{/wl/.cd,%
 element=NONE,width=0.9\textwidth,height=1cm,back=black,backIRUV=black,IRcolor=wlIRcolor,UVcolor=wlUVcolor,%
-charge=0,Imin=0,lines={},line width=1pt,begin=380,end=780,axis color=black,axis font=\tiny,axis font color=white,axis step=20,axis ticks=0,label position=west,%
+charge=0,Imin=0,lines={},line width=1pt,begin=380,end=780,axis color=black,axis font=\tiny,axis font color=white,axis step=20,axis unit=nm,axis unit precision=3,axis ticks=0,label position=west,% NEW v2.1.0 -> axis unit,axis unit precision
 label before text={},label after text={},label font=\bfseries\small,label font color=black,gamma=0.8,brightness=1,line intensity=100,%
-relative intensity threshold=0.25,absorption=false,axis=false,label=false,relative intensity=false,redshift={},show redshift value=false}}% NEW
+relative intensity threshold=0.25,absorption=false,axis=false,label=false,relative intensity=false,redshift={},show redshift value=false,% NEW v2.0.0 -> redshift, show redshift value
+use visible shading,backVIS=black}}% NEW v2.1.0 -> use visible shading
 % --------------- The main command to draw the spectra -----------------------------------------
 % \pgfspectra[options]
 \def\pgfspectra{\@ifnextchar[\wl at pgfspectra@withoptions{\wl at pgfspectra@nooptions}}%
@@ -141,9 +163,13 @@
 \def\wl at pgfspectra@nooptions{\wl at pgfspectra@continuous(0.9\textwidth,1cm)}%
 % ##########################################################
 \def\wl at pgfspectra@continuous(#1,#2){\ignorespaces%
+\ifwl at usevisibleshade% NEW v2.1.0
+\pgfspectrashade(380,780){wl at visibleshade}%
+\tikz{\fill[shading=wl at visibleshade] (0,0) rectangle (#1,#2);}%
+\else%
 \begin{tikzpicture}%
 \pgfmathparse{#1/400}\edef\xscale{\pgfmathresult}
-\pgfmathparse{1.4*\xscale+.09*\linewidth/\wl at width}\edef\wl at linewidth{\pgfmathresult}% NEW {\xscale} -> {1.4*\xscale+.09*\linewidth/\wl at width}
+\pgfmathparse{1.4*\xscale+.09*\linewidth/\wl at width}\edef\wl at linewidth{\pgfmathresult}% NEW v2.0.0 {\xscale} -> {1.4*\xscale+.09*\linewidth/\wl at width}
 \foreach \x in {380,...,780}%
         {%
         \wlcolor{\x}%
@@ -151,11 +177,12 @@
         \draw[wl at temp,line width=\wl at linewidth] (\wl at currentx,0) -- ++(0,#2);%
         }%
 \end{tikzpicture}%
+\fi%
 }%
 % ##########################################################
 \def\wl at pgfspectra@withoptions[#1]{\ignorespaces%
 % setting default values or user style
-\ifpgfspectra at StyleIsDef\pgfspectraStyleReset\pgfspectra at DoStyle\pgfspectra at StyleIsDeftrue\relax\else\pgfspectraStyleReset\relax\fi% NEW
+\ifpgfspectra at StyleIsDef\pgfspectraStyleReset\pgfspectra at DoStyle\pgfspectra at StyleIsDeftrue\relax\else\pgfspectraStyleReset\relax\fi% NEW v2.0.0
 % process options (key values)
 \pgfkeys{/wl/.cd,#1}%
 % axis height
@@ -167,12 +194,11 @@
             \ifx\wl at back\@myarg\wl at countb=\wl at counta\fi%
             \advance\wl at counta by1%
             }%
-\ifnum\wl at countb=-1\edef\@visible at opacity{1}\else% NEW
+\ifnum\wl at countb=-1\edef\@visible at opacity{1}\else% NEW v2.0.0
 \ifnum\wl at countb=0\let\wl at back\wl at visible\edef\@visible at opacity{.5}\else%
 \ifnum\wl at countb>0\let\wl at back\wl at visible\pgfmathparse{.05*\wl at countb}\edef\@visible at opacity{\pgfmathresult}\fi\fi\fi%
-%back color: \wl at back\\ debug
 % ----------------------------------------------------------------------------------------------------------
-% check limits... % NEW
+% check limits... % NEW v2.0.0
 \ifnum\wl at end<10\relax\def\wldez{10}\let\wl at end\wldez\fi%
 \ifnum\wl at end>4000\relax\def\wlquatromil{4000}\let\wl at end\wlquatromil\fi%
 \ifnum\wl at begin<10\relax\def\wldez{10}\let\wl at begin\wldez\fi%
@@ -191,7 +217,7 @@
     \ifx\wl at lines\@empty%no lines by the user => continuous spectrum
     % draws the continuous spectrum width options (default or by the user)
     \begin{tikzpicture}%
-        \pgfkeys{/wl/.cd,#1}% NEW
+        \pgfkeys{/wl/.cd,#1}% NEW v2.0.0
         \pgfmathparse{\wl at width/(abs(\wl at end-\wl at begin))}\edef\xscale{\pgfmathresult}%
         \ifwl at drawaxis%draws the axis
         \wl at utils@draw at axis%
@@ -232,7 +258,7 @@
     \ifx\wl at list@@\@empty\ifx\wl at element\wlN at NE\else Element\ ``\wl at element'' with charge ``\wl at charge'' have no lines to display.\fi\else%
         \ifwl at absorption%absortion spectrum
         \begin{tikzpicture}%
-                \pgfkeys{/wl/.cd,#1}% NEW
+                \pgfkeys{/wl/.cd,#1}% NEW v2.0.0
                 \pgfmathparse{\wl at width/(abs(\wl at end-\wl at begin))}\edef\xscale{\pgfmathresult}%
                 \ifwl at drawaxis%draws the axis
                 \wl at utils@draw at axis%
@@ -250,7 +276,7 @@
         % draws the spectrum
         \ifx\wl at back\wl at visible%visible background
         \begin{tikzpicture}%
-                \pgfkeys{/wl/.cd,#1}% NEW
+                \pgfkeys{/wl/.cd,#1}% NEW v2.0.0
                 \pgfmathparse{\wl at width/(abs(\wl at end-\wl at begin))}\edef\xscale{\pgfmathresult}%
                 \ifwl at drawaxis%draws the axis
                 \wl at utils@draw at axis%
@@ -264,7 +290,7 @@
         \end{tikzpicture}%
         \else%without visible background
         \begin{tikzpicture}%
-                \pgfkeys{/wl/.cd,#1}% NEW
+                \pgfkeys{/wl/.cd,#1}% NEW v2.0.0
                 \pgfmathparse{\wl at width/(abs(\wl at end-\wl at begin))}\edef\xscale{\pgfmathresult}%
                 \ifwl at drawaxis%draws the axis
                 \wl at utils@draw at axis%
@@ -422,46 +448,57 @@
 % internal utils
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \def\wl at utils@draw at axis{\ignorespaces%
+                % axis unit -> NEW v2.1.0
+                \pgfkeys{/pgf/number format/.cd,fixed,precision=\wl at axisunitprecision,set thousands separator={},assume math mode=true}
+                \ifx\wl at axisunit\wl at axisunit@nm\relax%
+                    \def\wl at axisunit@scale{1}\def\wl at axisunit@addzeros{}%
+                \else\ifx\wl at axisunit\wl at axisunit@um\relax%
+                    \def\wl at axisunit@scale{1000}\def\wl at axisunit@addzeros{}\pgfkeys{/pgf/number format/.cd,fixed zerofill}%
+                \else\ifx\wl at axisunit\wl at axisunit@A\relax%
+                    \def\wl at axisunit@scale{1}\def\wl at axisunit@addzeros{0}% probably not the best solution to overcome the TeX dimension limit values (16384pt)... but works!
+                \fi\fi\fi%
                 \ifnum\wl at begin>\wl at end%
                 % New xshift={-2.5*\@wl at axis@height} to hold bigger numbers, e.g. 2500
                 \draw[draw=none,fill=\wl at axiscolor] ([xshift={2.5*\@wl at axis@height}]0,\wl at height+2.5pt) rectangle ([xshift={-2.5*\@wl at axis@height}]-\wl at width,-2.5*\@wl at axis@height);%
-                        % minor ticks -> NEW
+                        % minor ticks -> NEW v2.0.0
                         \ifnum\wl at axisticks>0\relax%
-                        \pgfmathparse{\wl at end+\wl at axisstep/(\wl at axisticks+1)}\pgfmathparse{int(\pgfmathresult)}
-                        \edef\@axis at list{\wl at end,\pgfmathresult,...,\wl at begin}
+                        \pgfmathparse{\wl at end+\wl at axisstep/(\wl at axisticks+1)}\pgfmathparse{int(\pgfmathresult)}%
+                        \edef\@axis at list{\wl at end,\pgfmathresult,...,\wl at begin}%
                         \foreach \x in \@axis at list%
                         {%
                         \pgfmathparse{(\wl at end-\x)*\xscale}\edef\wl at currentx{\pgfmathresult pt}%
-                        \draw[\wl at axisfontcolor!80!transparent,line width=.25pt] (\wl at currentx,-.375*\@wl at axis@height) -- ++(0,.375*\@wl at axis@height);
+                        \draw[\wl at axisfontcolor!80!transparent,line width=.25pt] (\wl at currentx,-.375*\@wl at axis@height) -- ++(0,.375*\@wl at axis@height);%
                         }%
                         \fi%
-                \pgfmathparse{\wl at end+\wl at axisstep}\pgfmathparse{int(\pgfmathresult)}
-                \edef\@axis at list{\wl at end,\pgfmathresult,...,\wl at begin}
+                \pgfmathparse{\wl at end+\wl at axisstep}\pgfmathparse{int(\pgfmathresult)}%
+                \edef\@axis at list{\wl at end,\pgfmathresult,...,\wl at begin}%
                 \foreach \x in \@axis at list%
                 {%
                 \pgfmathparse{(\wl at end-\x)*\xscale}\edef\wl at currentx{\pgfmathresult pt}%
-                \draw[\wl at axisfontcolor,line width=.25pt] (\wl at currentx,-.75*\@wl at axis@height) -- ++(0,.75*\@wl at axis@height);
-                \node[\wl at axisfontcolor,font=\wl at axisfont,above,inner sep=0pt] at (\wl at currentx,-2.25*\@wl at axis@height) {\x};
+                \draw[\wl at axisfontcolor,line width=.25pt] (\wl at currentx,-.75*\@wl at axis@height) -- ++(0,.75*\@wl at axis@height);%
+                \pgfmathparse{\x/\wl at axisunit@scale}\edef\wl at xscaledvalue{\pgfmathresult}% NEW v2.1.0
+                \node[\wl at axisfontcolor,font=\wl at axisfont,above,inner sep=0pt] at (\wl at currentx,-2.25*\@wl at axis@height) {\pgfmathprintnumber{\wl at xscaledvalue}\wl at axisunit@addzeros};%
                 }%
                 \else%
                 \draw[draw=none,fill=\wl at axiscolor] ([xshift={-2.5*\@wl at axis@height}]0,\wl at height+2.5pt) rectangle ([xshift={2.5*\@wl at axis@height}]\wl at width,-2.5*\@wl at axis@height);%
-                        % minor ticks -> NEW
+                        % minor ticks -> NEW v2.0.0
                         \ifnum\wl at axisticks>0\relax%
-                        \pgfmathparse{\wl at begin+\wl at axisstep/(\wl at axisticks+1)}\pgfmathparse{int(\pgfmathresult)}
-                        \edef\@axis at list{\wl at begin,\pgfmathresult,...,\wl at end}
+                        \pgfmathparse{\wl at begin+\wl at axisstep/(\wl at axisticks+1)}\pgfmathparse{int(\pgfmathresult)}%
+                        \edef\@axis at list{\wl at begin,\pgfmathresult,...,\wl at end}%
                         \foreach \x in \@axis at list%
                         {%
                         \pgfmathparse{(\x-\wl at begin)*\xscale}\edef\wl at currentx{\pgfmathresult pt}%
-                        \draw[\wl at axisfontcolor!80!transparent,line width=.25pt] (\wl at currentx,-.375*\@wl at axis@height) -- ++(0,.375*\@wl at axis@height);
+                        \draw[\wl at axisfontcolor!80!transparent,line width=.25pt] (\wl at currentx,-.375*\@wl at axis@height) -- ++(0,.375*\@wl at axis@height);%
                         }%
                         \fi%
-                \pgfmathparse{\wl at begin+\wl at axisstep}\pgfmathparse{int(\pgfmathresult)}
-                \edef\@axis at list{\wl at begin,\pgfmathresult,...,\wl at end}
+                \pgfmathparse{\wl at begin+\wl at axisstep}\pgfmathparse{int(\pgfmathresult)}%
+                \edef\@axis at list{\wl at begin,\pgfmathresult,...,\wl at end}%
                 \foreach \x in \@axis at list%
                 {%
                 \pgfmathparse{(\x-\wl at begin)*\xscale}\edef\wl at currentx{\pgfmathresult pt}%
-                \draw[\wl at axisfontcolor,line width=.25pt] (\wl at currentx,-.75*\@wl at axis@height) -- ++(0,.75*\@wl at axis@height);
-                \node[\wl at axisfontcolor,font=\wl at axisfont,above,inner sep=0pt] at (\wl at currentx,-2.25*\@wl at axis@height) {\x};
+                \draw[\wl at axisfontcolor,line width=.25pt] (\wl at currentx,-.75*\@wl at axis@height) -- ++(0,.75*\@wl at axis@height);%
+                \pgfmathparse{\x/\wl at axisunit@scale}\edef\wl at xscaledvalue{\pgfmathresult}% NEW v2.1.0
+                \node[\wl at axisfontcolor,font=\wl at axisfont,above,inner sep=0pt] at (\wl at currentx,-2.25*\@wl at axis@height) {\pgfmathprintnumber{\wl at xscaledvalue}\wl at axisunit@addzeros};%
                 }%
                 \fi%
 }%
@@ -564,7 +601,7 @@
                         \fi%
                 \fi%
 }%
-\def\wl at utils@drawbackground#1{\ignorespaces% NEW - in this version draws from UV, VIS to IV -> replaces \wl at utils@visiblespectrum#1
+\def\wl at utils@drawbackground#1{\ignorespaces% NEW v2.0.0 - in this version draws from UV, VIS to IV -> replaces \wl at utils@visiblespectrum#1
 % reprocess visible background (only visible) -> needed because of the override in keys
     \wl at counta=0%
     \wl at countb=-1%
@@ -573,8 +610,8 @@
             \advance\wl at counta by1%
             }%
         \ifnum\wl at countb>-1\let\wl at back\wl at visible\fi%
+            \ifwl at usevisibleshade\relax% NEW v2.1.0
                 \pgfmathparse{int(#1*100)}\edef\wl at bright{\pgfmathresult}%
-                \pgfmathparse{1.4*\xscale+.09*\linewidth/\wl at width}\edef\wl at linewidth{\pgfmathresult}% NEW {\xscale} -> {1.4*\xscale+.09*\linewidth/\wl at width}
                 \ifnum\wl at begin>\wl at end% 0
                     \ifnum\wl at end<380\relax% 1
                         \pgfmathparse{(\wl at end-380)*\xscale}\edef\wl at pointA{\pgfmathresult pt}%
@@ -583,11 +620,101 @@
                             \draw[draw=none,fill=\wl at background@UVcolor] (0,0) rectangle (\wl at pointA,\wl at height);%
                             \draw[draw=none,fill=\wl at background@IRcolor] (\wl at pointB,0) rectangle (-\wl at width,\wl at height);%
                                 \ifx\wl at back\wl at visible% 3 visible background
+                                    \pgfspectrashade(380,780){wl at visibleshade}%
+                                    \fill[shading=wl at visibleshade,shading angle=180] (\wl at pointA,0) rectangle (\wl at pointB,\wl at height);%
+                                \else% 3
+                                    \draw[draw=none,fill=\wl at back] (\wl at pointA,0) rectangle (\wl at pointB,\wl at height);%
+                                \fi% 3
+                        \else% 2
+                            \pgfmathparse{(\wl at end-\wl at begin)*\xscale}\edef\wl at pointB{\pgfmathresult pt}%
+                            \draw[draw=none,fill=\wl at background@UVcolor] (0,0) rectangle (\wl at pointA,\wl at height);%
+                                \ifx\wl at back\wl at visible% 3 visible background
+                                    \pgfspectrashade(380,\wl at begin){wl at visibleshade}%
+                                    \fill[shading=wl at visibleshade,shading angle=180] (\wl at pointA,0) rectangle (\wl at pointB,\wl at height);%
+                                \else% 3
+                                    \draw[draw=none,fill=\wl at back] (\wl at pointA,0) rectangle (\wl at pointB,\wl at height);%
+                                \fi% 3
+                        \fi% 2
+                    \else% 1
+                        \ifnum\wl at begin>780\relax% 2
+                            \pgfmathparse{(\wl at end-780)*\xscale}\edef\wl at pointB{\pgfmathresult pt}%
+                            \draw[draw=none,fill=\wl at background@IRcolor] (\wl at pointB,0) rectangle (-\wl at width,\wl at height);%
+                                \ifx\wl at back\wl at visible% 3 visible background
+                                    \pgfspectrashade(\wl at end,780){wl at visibleshade}%
+                                    \fill[shading=wl at visibleshade,shading angle=180] (0,0) rectangle (\wl at pointB,\wl at height);%
+                                \else% 3
+                                    \draw[draw=none,fill=\wl at back] (0,0) rectangle (\wl at pointB,\wl at height);%
+                                \fi% 3
+                        \else% 2
+                            \pgfmathparse{(\wl at end-\wl at begin)*\xscale}\edef\wl at pointB{\pgfmathresult pt}%
+                                \ifx\wl at back\wl at visible% 3 visible background
+                                    \pgfspectrashade(\wl at end,\wl at begin){wl at visibleshade}%
+                                    \fill[shading=wl at visibleshade,shading angle=180] (0,0) rectangle (\wl at pointB,\wl at height);%
+                                \else% 3
+                                    \draw[draw=none,fill=\wl at back] (0,0) rectangle (\wl at pointB,\wl at height);%
+                                \fi% 3
+                        \fi% 2
+                    \fi% 1
+                \else% 0
+                    \ifnum\wl at begin<380\relax% 1
+                        \pgfmathparse{(380-\wl at begin)*\xscale}\edef\wl at pointA{\pgfmathresult pt}%
+                        \ifnum\wl at end>780\relax% 2
+                            \pgfmathparse{(780-\wl at begin)*\xscale}\edef\wl at pointB{\pgfmathresult pt}%
+                            \draw[draw=none,fill=\wl at background@UVcolor] (0,0) rectangle (\wl at pointA,\wl at height);%
+                            \draw[draw=none,fill=\wl at background@IRcolor] (\wl at pointB,0) rectangle (\wl at width,\wl at height);%
+                                \ifx\wl at back\wl at visible% 3 visible background
+                                    \pgfspectrashade(380,780){wl at visibleshade}%
+                                    \fill[shading=wl at visibleshade] (\wl at pointA,0) rectangle (\wl at pointB,\wl at height);%
+                                \else% 3
+                                    \draw[draw=none,fill=\wl at back] (\wl at pointA,0) rectangle (\wl at pointB,\wl at height);%
+                                \fi% 3
+                        \else% 2
+                            \pgfmathparse{(\wl at end-\wl at begin)*\xscale}\edef\wl at pointB{\pgfmathresult pt}%
+                            \draw[draw=none,fill=\wl at background@UVcolor] (0,0) rectangle (\wl at pointA,\wl at height);%
+                                \ifx\wl at back\wl at visible% 3 visible background
+                                    \pgfspectrashade(380,\wl at end){wl at visibleshade}%
+                                    \fill[shading=wl at visibleshade] (\wl at pointA,0) rectangle (\wl at pointB,\wl at height);%
+                                \else% 3
+                                    \draw[draw=none,fill=\wl at back] (\wl at pointA,0) rectangle (\wl at pointB,\wl at height);%
+                                \fi% 3
+                        \fi% 2
+                    \else% 1
+                        \ifnum\wl at end>780\relax% 2
+                            \pgfmathparse{(780-\wl at begin)*\xscale}\edef\wl at pointB{\pgfmathresult pt}%
+                            \draw[draw=none,fill=\wl at background@IRcolor] (\wl at pointB,0) rectangle (\wl at width,\wl at height);%
+                                \ifx\wl at back\wl at visible% 3 visible background
+                                    \pgfspectrashade(\wl at begin,780){wl at visibleshade}%
+                                    \fill[shading=wl at visibleshade] (0,0) rectangle (\wl at pointB,\wl at height);%
+                                \else% 3
+                                    \draw[draw=none,fill=\wl at back] (0,0) rectangle (\wl at pointB,\wl at height);%
+                                \fi% 3
+                        \else% 2
+                            \pgfmathparse{(\wl at end-\wl at begin)*\xscale}\edef\wl at pointB{\pgfmathresult pt}%
+                                \ifx\wl at back\wl at visible% 3 visible background
+                                    \pgfspectrashade(\wl at begin,\wl at end){wl at visibleshade}%
+                                    \fill[shading=wl at visibleshade] (0,0) rectangle (\wl at pointB,\wl at height);%
+                                \else% 3
+                                    \draw[draw=none,fill=\wl at back] (0,0) rectangle (\wl at pointB,\wl at height);%
+                                \fi% 3
+                        \fi% 2
+                    \fi% 1
+                \fi%0
+            \else% wl at usevisibleshade (don't use shading, draw line by line...)
+                \pgfmathparse{int(#1*100)}\edef\wl at bright{\pgfmathresult}%
+                \pgfmathparse{1.4*\xscale+.09*\linewidth/\wl at width}\edef\@wl at linewidth{\pgfmathresult}% NEW v2.0.0 {\xscale} -> {1.4*\xscale+.09*\linewidth/\wl at width}
+                \ifnum\wl at begin>\wl at end% 0
+                    \ifnum\wl at end<380\relax% 1
+                        \pgfmathparse{(\wl at end-380)*\xscale}\edef\wl at pointA{\pgfmathresult pt}%
+                        \ifnum\wl at begin>780\relax% 2
+                            \pgfmathparse{(\wl at end-780)*\xscale}\edef\wl at pointB{\pgfmathresult pt}%
+                            \draw[draw=none,fill=\wl at background@UVcolor] (0,0) rectangle (\wl at pointA,\wl at height);%
+                            \draw[draw=none,fill=\wl at background@IRcolor] (\wl at pointB,0) rectangle (-\wl at width,\wl at height);%
+                                \ifx\wl at back\wl at visible% 3 visible background
                                     \foreach \x in {780,...,380}{%
                                     \wlcolor{\x}%
-                                    \colorlet{wlcolor}{wl at temp!\wl at bright!black}%
+                                    \colorlet{wlcolor}{wl at temp!\wl at bright!\wl at backvisible}% CHANGED v2.1.0
                                     \pgfmathparse{\wl at pointB+(780-\x)*\xscale}\edef\wl at currentx{\pgfmathresult pt}%
-                                    \draw[wlcolor,line width=\wl at linewidth] (\wl at currentx,0) -- ++(0,\wl at height);}%
+                                    \draw[wlcolor,line width=\@wl at linewidth] (\wl at currentx,0) -- ++(0,\wl at height);}%
                                 \else% 3
                                     \draw[draw=none,fill=\wl at back] (\wl at pointA,0) rectangle (\wl at pointB,\wl at height);%
                                 \fi% 3
@@ -597,9 +724,9 @@
                                 \ifx\wl at back\wl at visible% 3 visible background
                                     \foreach \x in {\wl at begin,...,380}{%
                                     \wlcolor{\x}%
-                                    \colorlet{wlcolor}{wl at temp!\wl at bright!black}%
+                                    \colorlet{wlcolor}{wl at temp!\wl at bright!\wl at backvisible}% CHANGED v2.1.0
                                     \pgfmathparse{\wl at pointB+(\wl at begin-\x)*\xscale}\edef\wl at currentx{\pgfmathresult pt}%
-                                    \draw[wlcolor,line width=\wl at linewidth] (\wl at currentx,0) -- ++(0,\wl at height);}%
+                                    \draw[wlcolor,line width=\@wl at linewidth] (\wl at currentx,0) -- ++(0,\wl at height);}%
                                 \else% 3
                                     \draw[draw=none,fill=\wl at back] (\wl at pointA,0) rectangle (\wl at pointB,\wl at height);%
                                 \fi% 3
@@ -611,9 +738,9 @@
                                 \ifx\wl at back\wl at visible% 3 visible background
                                     \foreach \x in {780,...,\wl at end}{%
                                     \wlcolor{\x}%
-                                    \colorlet{wlcolor}{wl at temp!\wl at bright!black}%
+                                    \colorlet{wlcolor}{wl at temp!\wl at bright!\wl at backvisible}% CHANGED v2.1.0
                                     \pgfmathparse{\wl at pointB+(780-\x)*\xscale}\edef\wl at currentx{\pgfmathresult pt}%
-                                    \draw[wlcolor,line width=\wl at linewidth] (\wl at currentx,0) -- ++(0,\wl at height);}%
+                                    \draw[wlcolor,line width=\@wl at linewidth] (\wl at currentx,0) -- ++(0,\wl at height);}%
                                 \else% 3
                                     \draw[draw=none,fill=\wl at back] (0,0) rectangle (\wl at pointB,\wl at height);%
                                 \fi% 3
@@ -622,9 +749,9 @@
                                 \ifx\wl at back\wl at visible% 3 visible background
                                     \foreach \x in {\wl at begin,...,\wl at end}{%
                                     \wlcolor{\x}%
-                                    \colorlet{wlcolor}{wl at temp!\wl at bright!black}%
+                                    \colorlet{wlcolor}{wl at temp!\wl at bright!\wl at backvisible}% CHANGED v2.1.0
                                     \pgfmathparse{\wl at pointB+(\wl at begin-\x)*\xscale}\edef\wl at currentx{\pgfmathresult pt}%
-                                    \draw[wlcolor,line width=\wl at linewidth] (\wl at currentx,0) -- ++(0,\wl at height);}%
+                                    \draw[wlcolor,line width=\@wl at linewidth] (\wl at currentx,0) -- ++(0,\wl at height);}%
                                 \else% 3
                                     \draw[draw=none,fill=\wl at back] (0,0) rectangle (\wl at pointB,\wl at height);%
                                 \fi% 3
@@ -640,9 +767,9 @@
                                 \ifx\wl at back\wl at visible% 3 visible background
                                     \foreach \x in {380,...,780}{%
                                     \wlcolor{\x}%
-                                    \colorlet{wlcolor}{wl at temp!\wl at bright!black}%
+                                    \colorlet{wlcolor}{wl at temp!\wl at bright!\wl at backvisible}% CHANGED v2.1.0
                                     \pgfmathparse{\wl at pointB-(780-\x)*\xscale}\edef\wl at currentx{\pgfmathresult pt}%
-                                    \draw[wlcolor,line width=\wl at linewidth] (\wl at currentx,0) -- ++(0,\wl at height);}%
+                                    \draw[wlcolor,line width=\@wl at linewidth] (\wl at currentx,0) -- ++(0,\wl at height);}%
                                 \else% 3
                                     \draw[draw=none,fill=\wl at back] (\wl at pointA,0) rectangle (\wl at pointB,\wl at height);%
                                 \fi% 3
@@ -652,9 +779,9 @@
                                 \ifx\wl at back\wl at visible% 3 visible background
                                     \foreach \x in {\wl at end,...,380}{%
                                     \wlcolor{\x}%
-                                    \colorlet{wlcolor}{wl at temp!\wl at bright!black}%
+                                    \colorlet{wlcolor}{wl at temp!\wl at bright!\wl at backvisible}% CHANGED v2.1.0
                                     \pgfmathparse{\wl at pointB-(\wl at end-\x)*\xscale}\edef\wl at currentx{\pgfmathresult pt}%
-                                    \draw[wlcolor,line width=\wl at linewidth] (\wl at currentx,0) -- ++(0,\wl at height);}%
+                                    \draw[wlcolor,line width=\@wl at linewidth] (\wl at currentx,0) -- ++(0,\wl at height);}%
                                 \else% 3
                                     \draw[draw=none,fill=\wl at back] (\wl at pointA,0) rectangle (\wl at pointB,\wl at height);%
                                 \fi% 3
@@ -666,9 +793,9 @@
                                 \ifx\wl at back\wl at visible% 3 visible background
                                     \foreach \x in {\wl at begin,...,780}{%
                                     \wlcolor{\x}%
-                                    \colorlet{wlcolor}{wl at temp!\wl at bright!black}%
+                                    \colorlet{wlcolor}{wl at temp!\wl at bright!\wl at backvisible}% CHANGED v2.1.0
                                     \pgfmathparse{(\x-\wl at begin)*\xscale}\edef\wl at currentx{\pgfmathresult pt}%
-                                    \draw[wlcolor,line width=\wl at linewidth] (\wl at currentx,0) -- ++(0,\wl at height);}%
+                                    \draw[wlcolor,line width=\@wl at linewidth] (\wl at currentx,0) -- ++(0,\wl at height);}%
                                 \else% 3
                                     \draw[draw=none,fill=\wl at back] (0,0) rectangle (\wl at pointB,\wl at height);%
                                 \fi% 3
@@ -677,9 +804,9 @@
                                 \ifx\wl at back\wl at visible% 3 visible background
                                     \foreach \x in {\wl at begin,...,\wl at end}{%
                                     \wlcolor{\x}%
-                                    \colorlet{wlcolor}{wl at temp!\wl at bright!black}%
+                                    \colorlet{wlcolor}{wl at temp!\wl at bright!\wl at backvisible}% CHANGED v2.1.0
                                     \pgfmathparse{\x-\wl at begin)*\xscale}\edef\wl at currentx{\pgfmathresult pt}%
-                                    \draw[wlcolor,line width=\wl at linewidth] (\wl at currentx,0) -- ++(0,\wl at height);}%
+                                    \draw[wlcolor,line width=\@wl at linewidth] (\wl at currentx,0) -- ++(0,\wl at height);}%
                                 \else% 3
                                     \draw[draw=none,fill=\wl at back] (0,0) rectangle (\wl at pointB,\wl at height);%
                                 \fi% 3
@@ -686,11 +813,12 @@
                         \fi% 2
                     \fi% 1
                 \fi%0
+            \fi% wl at usevisibleshade
 }%
 \def\wl at utils@drawabsorptionlines{\ignorespaces%
                 \ifnum\wl at begin>\wl at end%
                     \ifwl at intensity%
-                        \ifwl at redshift\wl at utils@redshift\fi% NEW
+                        \ifwl at redshift\wl at utils@redshift\fi% NEW v2.0.0
                         \foreach \x/\y in \wl at list@@%
                         {%
                         \pgfmathparse{notless(\x,\wl at end)}\edef\wl at x@nl{\pgfmathresult}%
@@ -705,7 +833,7 @@
                         \fi%
                         }%
                     \else%
-                        \ifwl at redshift\wl at utils@redshift\fi% NEW
+                        \ifwl at redshift\wl at utils@redshift\fi% NEW v2.0.0
                         \foreach \x in \wl at list@@%
                         {%
                         \pgfmathparse{notless(\x,\wl at end)}\edef\wl at x@nl{\pgfmathresult}%
@@ -721,7 +849,7 @@
                     \fi%
                 \else%
                     \ifwl at intensity%
-                        \ifwl at redshift\wl at utils@redshift\fi% NEW
+                        \ifwl at redshift\wl at utils@redshift\fi% NEW v2.0.0
                         \foreach \x/\y in \wl at list@@%
                         {%
                         \pgfmathparse{notless(\x,\wl at begin)}\edef\wl at x@nl{\pgfmathresult}%
@@ -736,7 +864,7 @@
                         \fi%
                         }%
                     \else%
-                        \ifwl at redshift\wl at utils@redshift\fi% NEW
+                        \ifwl at redshift\wl at utils@redshift\fi% NEW v2.0.0
                         \foreach \x in \wl at list@@%
                         {%
                         \pgfmathparse{notless(\x,\wl at begin)}\edef\wl at x@nl{\pgfmathresult}%
@@ -751,7 +879,7 @@
                         }%
                     \fi%
                 \fi%
-\ifwl at RSvalue% NEW
+\ifwl at RSvalue% NEW v2.0.0
 \ifnum\wl at begin>\wl at end%
 \ifwl at drawaxis\pgfmathparse{-\wl at width-2.5*\@wl at axis@height}\edef\wl at redshiftinfo@x{\pgfmathresult pt}%
 \else\pgfmathparse{-\wl at width}\edef\wl at redshiftinfo@x{\pgfmathresult pt}\fi%
@@ -761,12 +889,12 @@
 \fi%
 \ifwl at drawaxis\pgfmathparse{-.75*\@wl at axis@height-1.3*\ht0-2pt}\edef\wl at redshiftinfo@y{\pgfmathresult pt}\else\edef\wl at redshiftinfo@y{0pt}\fi%
 \node[below right,inner xsep=0pt,font=\wl at axisfont] at (\wl at redshiftinfo@x,\wl at redshiftinfo@y) {\wl at redshiftinfo};%
-\fi% NEW
+\fi% NEW v2.0.0
 }%
 \def\wl at utils@drawemissionlines{\ignorespaces%
                 \ifnum\wl at begin>\wl at end%
                 \ifwl at intensity%
-                    \ifwl at redshift\wl at utils@redshift\fi% NEW
+                    \ifwl at redshift\wl at utils@redshift\fi% NEW v2.0.0
                         \foreach \x/\y in \wl at list@@%
                         {%
                         \wlcolor{\x}%
@@ -781,7 +909,7 @@
                         \fi%
                         }%
                 \else%
-                    \ifwl at redshift\wl at utils@redshift\fi% NEW
+                    \ifwl at redshift\wl at utils@redshift\fi% NEW v2.0.0
                         \foreach \x in \wl at list@@%
                         {%
                         \wlcolor{\x}%
@@ -797,7 +925,7 @@
                 \fi%
                 \else%
                 \ifwl at intensity%
-                    \ifwl at redshift\wl at utils@redshift\fi% NEW
+                    \ifwl at redshift\wl at utils@redshift\fi% NEW v2.0.0
                         \foreach \x/\y in \wl at list@@%
                         {%
                         \wlcolor{\x}%
@@ -812,7 +940,7 @@
                         \fi%
                         }%
                 \else%
-                    \ifwl at redshift\wl at utils@redshift\fi% NEW
+                    \ifwl at redshift\wl at utils@redshift\fi% NEW v2.0.0
                         \foreach \x in \wl at list@@%
                         {%
                         \wlcolor{\x}%
@@ -827,7 +955,7 @@
                         }%
                 \fi%
                 \fi%
-\ifwl at RSvalue% NEW
+\ifwl at RSvalue% NEW v2.0.0
 \ifnum\wl at begin>\wl at end%
 \ifwl at drawaxis\pgfmathparse{-\wl at width-2.5*\@wl at axis@height}\edef\wl at redshiftinfo@x{\pgfmathresult pt}%
 \else\pgfmathparse{-\wl at width}\edef\wl at redshiftinfo@x{\pgfmathresult pt}\fi%
@@ -837,7 +965,7 @@
 \fi%
 \ifwl at drawaxis\pgfmathparse{-.75*\@wl at axis@height-1.3*\ht0-2pt}\edef\wl at redshiftinfo@y{\pgfmathresult pt}\else\edef\wl at redshiftinfo@y{0pt}\fi%
 \node[below right,inner xsep=0pt,font=\wl at axisfont] at (\wl at redshiftinfo@x,\wl at redshiftinfo@y) {\wl at redshiftinfo};%
-\fi% NEW
+\fi% NEW v2.0.0
 }%
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 % return: integer with position (e.g. '0' for west, ... )
@@ -849,7 +977,7 @@
             \advance\wl at countc by1%
             }%
 }%
-% NEW ----------------------
+% NEW v2.0.0 ----------------------
 % redshift: lambda(obs)=lambda(emit)*{(1+v/c*cos(theta))/sqrt(1-v^2/c^2)} ---> Relativistic Doppler
 % vbar-> v/c -> normalized velocity of the source (e.g. '0.9' for v=0.9c )
 % theta ->angle between the direction of relative motion of the source and the direction of emission in the observer's frame (zero angle is directly away from the observer)
@@ -898,11 +1026,333 @@
         }%
     \fi%
 }%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% NEW v2.1.0 ---------------------->
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \pgfspectrashade[type=<h|v>](start,end){name} ---> type: h-horizontal (default) | v-vertical
+\def\pgfspectrashade{\ignorespaces\@ifnextchar[\wl at pgfspectrashade{\wl at pgfspectrashade[h]}}%
+\def\wl at pgfspectrashade[#1](#2,#3)#4{\ignorespaces%
+\ifnum#2>#3\relax\PackageError{pgf-spectra}%
+{in \textbackslash pgfspectrashade the starting wavelength (#2) must be lesser then the finishing wavelength (#3)}%
+{Try typing the wavelengths in the correct order: \textbackslash pgfspectrashade(#3,#2)...}\else%
+\ifnum#3<381\relax\PackageError{pgf-spectra}{in \textbackslash pgfspectrashade the finishing wavelength (#3) must be at least 381...}%
+{Please type a finishing wavelength greater then 380...}\else%
+\ifnum#2<380\relax\def\wl at shade@begin{380}\else\pgfmathparse{int(#2)}\edef\wl at shade@begin{\pgfmathresult}\fi%
+\ifnum#3>780\relax\def\wl at shade@end{780}\else\pgfmathparse{int(#3)}\edef\wl at shade@end{\pgfmathresult}\fi%
+\pgfmathparse{(\wl at shade@end-\wl at shade@begin)/50}\edef\wl at shadecolor@step{\pgfmathresult}%
+%\foreach \n in {1,...,51}{%
+\@for\n:={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51}\do{%
+\pgfmathparse{\wl at shade@begin+(\n-1)*\wl at shadecolor@step}\edef\wl at currentwl{\pgfmathresult}%
+\wlcolor{\wl at currentwl}%
+\edef\wl at colorname{wlshcol\@Roman\n}\relax\colorlet{\wl at colorname}{wlcolor}%%
+}%
+\def\wl at test{#1}\def\wl at v{v}\def\wl at h{h}%
+\ifx\wl at test\wl at h\relax%
+% the horizontal pgfshading
+\pgfdeclarehorizontalshading{#4}{100bp}{color(0bp)=(wlshcolI); color(25bp)=(wlshcolI); color(26bp)=(wlshcolII); color(27bp)=(wlshcolIII); color(28bp)=(wlshcolIV); color(29bp)=(wlshcolV); color(30bp)=(wlshcolVI); color(31bp)=(wlshcolVII); color(32bp)=(wlshcolVIII); color(33bp)=(wlshcolIX); color(34bp)=(wlshcolX); color(35bp)=(wlshcolXI); color(36bp)=(wlshcolXII); color(37bp)=(wlshcolXIII); color(38bp)=(wlshcolXIV); color(39bp)=(wlshcolXV); color(40bp)=(wlshcolXVI); color(41bp)=(wlshcolXVII); color(42bp)=(wlshcolXVIII); color(43bp)=(wlshcolXIX); color(44bp)=(wlshcolXX); color(45bp)=(wlshcolXXI); color(46bp)=(wlshcolXXII); color(47bp)=(wlshcolXXIII); color(48bp)=(wlshcolXXIV); color(49bp)=(wlshcolXXV); color(50bp)=(wlshcolXXVI); color(51bp)=(wlshcolXXVII); color(52bp)=(wlshcolXXVIII); color(53bp)=(wlshcolXXIX); color(54bp)=(wlshcolXXX); color(55bp)=(wlshcolXXXI); color(56bp)=(wlshcolXXXII); color(57bp)=(wlshcolXXXIII); color(58bp)=(wlshcolXXXIV); color(59bp)=(wlshcolXXXV); color(60bp)=(wlshcolXXXVI); color(61bp)=(wlshcolXXXVII); color(62bp)=(wlshcolXXXVIII); color(63bp)=(wlshcolXXXIX); color(64bp)=(wlshcolXL); color(65bp)=(wlshcolXLI); color(66bp)=(wlshcolXLII); color(67bp)=(wlshcolXLIII); color(68bp)=(wlshcolXLIV); color(69bp)=(wlshcolXLV); color(70bp)=(wlshcolXLVI); color(71bp)=(wlshcolXLVII); color(72bp)=(wlshcolXLVIII); color(73bp)=(wlshcolXLIX); color(74bp)=(wlshcolL); color(75bp)=(wlshcolLI); color(100bp)=(wlshcolLI)}%
+\else\ifx\wl at test\wl at v\relax%
+% the vertical pgfshading
+\pgfdeclareverticalshading{#4}{100bp}{color(0bp)=(wlshcolI); color(25bp)=(wlshcolI); color(26bp)=(wlshcolII); color(27bp)=(wlshcolIII); color(28bp)=(wlshcolIV); color(29bp)=(wlshcolV); color(30bp)=(wlshcolVI); color(31bp)=(wlshcolVII); color(32bp)=(wlshcolVIII); color(33bp)=(wlshcolIX); color(34bp)=(wlshcolX); color(35bp)=(wlshcolXI); color(36bp)=(wlshcolXII); color(37bp)=(wlshcolXIII); color(38bp)=(wlshcolXIV); color(39bp)=(wlshcolXV); color(40bp)=(wlshcolXVI); color(41bp)=(wlshcolXVII); color(42bp)=(wlshcolXVIII); color(43bp)=(wlshcolXIX); color(44bp)=(wlshcolXX); color(45bp)=(wlshcolXXI); color(46bp)=(wlshcolXXII); color(47bp)=(wlshcolXXIII); color(48bp)=(wlshcolXXIV); color(49bp)=(wlshcolXXV); color(50bp)=(wlshcolXXVI); color(51bp)=(wlshcolXXVII); color(52bp)=(wlshcolXXVIII); color(53bp)=(wlshcolXXIX); color(54bp)=(wlshcolXXX); color(55bp)=(wlshcolXXXI); color(56bp)=(wlshcolXXXII); color(57bp)=(wlshcolXXXIII); color(58bp)=(wlshcolXXXIV); color(59bp)=(wlshcolXXXV); color(60bp)=(wlshcolXXXVI); color(61bp)=(wlshcolXXXVII); color(62bp)=(wlshcolXXXVIII); color(63bp)=(wlshcolXXXIX); color(64bp)=(wlshcolXL); color(65bp)=(wlshcolXLI); color(66bp)=(wlshcolXLII); color(67bp)=(wlshcolXLIII); color(68bp)=(wlshcolXLIV); color(69bp)=(wlshcolXLV); color(70bp)=(wlshcolXLVI); color(71bp)=(wlshcolXLVII); color(72bp)=(wlshcolXLVIII); color(73bp)=(wlshcolXLIX); color(74bp)=(wlshcolL); color(75bp)=(wlshcolLI); color(100bp)=(wlshcolLI)}%
+\fi\fi%
+\fi\fi%
+}%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\pgfkeys{/wl/.cd,%
+shade end/.get=\wl at shadeend,%
+shade end/.store in=\wl at shadeend,%
+shade end/.default=780,%
+shade opacity/.get=\wl at shade@opacity,%
+shade opacity/.store in=\wl at shade@opacity,%
+shade opacity/.default=1,%
+shade opacity color/.get=\wl at shade@opacitycolor,%
+shade opacity color/.store in=\wl at shade@opacitycolor,%
+shade opacity color/.default=white%
+}%
+\pgfkeys{/wl/.cd,shade end,shade opacity,shade opacity color}%
+% \pgfspectraplotshade{name} or
+% \pgfspectraplotshade[options]{name}
+\def\pgfspectraplotshade{\@ifnextchar[\wl at pgfspectraplotshade{\wl at pgfspectraplotshade[]}}%
+\def\wl at pgfspectraplotshade[#1]#2{\ignorespaces%
+\pgfkeys{/wl/.cd,shade end=780,shade opacity=1,shade opacity color=white}%
+\pgfkeys{/wl/.cd,UVcolor=wlUVcolor,IRcolor=wlIRcolor,gamma=.8}%
+\pgfkeys{/wl/.cd,#1}%
+\pgfmathparse{100*\wl at shade@opacity}\edef\@wl at shade@opacity{\pgfmathresult}%
+%
+% x[bp]=25+(380+8*(\n-1))*(50/\wl at shadeend)
+%
+\edef\wl at shadeend@pt{\wl at shadeend pt}%
+\ifdim\wl at shadeend@pt<381pt\relax%
+\PackageError{pgf-spectra}{shade end must be greater then 380}{Type a wavelength greater then 380}%
+\else%
+\pgfkeys{/pgf/number format/.cd,fixed,precision=4,set thousands separator={},assume math mode=true}%
+\pgfmathparse{25+379.9/\wl at shadeend*50}%
+\pgfmathprintnumberto{\pgfmathresult}{\wl at X@tmp}%
+\edef\xO{\wl at X@tmp bp}%
+\ifdim\wl at shadeend@pt<780pt\relax%
+\pgfkeys{/pgf/number format/.cd,fixed,precision=3,set thousands separator={},assume math mode=true}%
+\@for\n:={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51}\do{%
+\pgfmathparse{380+(\n-1)*(\wl at shadeend/50-7.6)}\edef\wl at currentwl{\pgfmathresult}%
+\wlcolor{\wl at currentwl}%
+\colorlet{wlcolor}{wl at temp!\@wl at shade@opacity!\wl at shade@opacitycolor}%
+\edef\wl at colorname{wlshcol\@Roman\n}\relax\colorlet{\wl at colorname}{wlcolor}%%
+\pgfmathparse{24+380/\wl at shadeend*50+\n-380/\wl at shadeend*\n+380/\wl at shadeend}%
+\pgfmathprintnumberto{\pgfmathresult}{\wl at X@tmp}%
+\expandafter\edef\csname x\@Roman\n\endcsname{\wl at X@tmp bp}%
+}%
+\pgfkeys{/pgf/number format/.cd,fixed,precision=4,set thousands separator={},assume math mode=true}%
+\pgfmathparse{25+(\wl at shadeend+.1)/\wl at shadeend*50}%
+\pgfmathprintnumberto{\pgfmathresult}{\wl at X@tmp}%
+\edef\xF{\wl at X@tmp bp}%
+\else%
+\pgfkeys{/pgf/number format/.cd,fixed,precision=3,set thousands separator={},assume math mode=true}%
+\@for\n:={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51}\do{%
+\pgfmathparse{380+(\n-1)*8}\edef\wl at currentwl{\pgfmathresult}%
+\wlcolor{\wl at currentwl}%
+\colorlet{wlcolor}{wl at temp!\@wl at shade@opacity!\wl at shade@opacitycolor}%
+\edef\wl at colorname{wlshcol\@Roman\n}\relax\colorlet{\wl at colorname}{wlcolor}%%
+\pgfmathparse{25+380/\wl at shadeend*50+400/\wl at shadeend*\n-400/\wl at shadeend}%
+\pgfmathprintnumberto{\pgfmathresult}{\wl at X@tmp}%
+\expandafter\edef\csname x\@Roman\n\endcsname{\wl at X@tmp bp}%
+}%
+\pgfkeys{/pgf/number format/.cd,fixed,precision=2,set thousands separator={},assume math mode=true}%
+\pgfmathparse{25+780.1/\wl at shadeend*50}%
+\pgfmathprintnumberto{\pgfmathresult}{\wl at X@tmp}%
+\edef\xF{\wl at X@tmp bp}%
+\fi% ifdim<780pt
+% the horizontal shading
+\pgfdeclarehorizontalshading{#2}{100bp}{color(0bp)=(\wl at UVcolor!\@wl at shade@opacity!\wl at shade@opacitycolor);color(\xO)=(\wl at UVcolor!\@wl at shade@opacity!\wl at shade@opacitycolor);%
+color(\xI)=(wlshcolI);color(\xII)=(wlshcolII);color(\xIII)=(wlshcolIII);color(\xIV)=(wlshcolIV);color(\xV)=(wlshcolV);color(\xVI)=(wlshcolVI);color(\xVII)=(wlshcolVII);color(\xVIII)=(wlshcolVIII);color(\xIX)=(wlshcolIX);color(\xX)=(wlshcolX);color(\xXI)=(wlshcolXI);color(\xXII)=(wlshcolXII);color(\xXIII)=(wlshcolXIII);color(\xXIV)=(wlshcolXIV);color(\xXV)=(wlshcolXV);color(\xXVI)=(wlshcolXVI);color(\xXVII)=(wlshcolXVII);color(\xXVIII)=(wlshcolXVIII);color(\xXIX)=(wlshcolXIX);color(\xXX)=(wlshcolXX);color(\xXXI)=(wlshcolXXI);color(\xXXII)=(wlshcolXXII);color(\xXXIII)=(wlshcolXXIII);color(\xXXIV)=(wlshcolXXIV);color(\xXXV)=(wlshcolXXV);color(\xXXVI)=(wlshcolXXVI);color(\xXXVII)=(wlshcolXXVII);color(\xXXVIII)=(wlshcolXXVIII);color(\xXXIX)=(wlshcolXXIX);color(\xXXX)=(wlshcolXXX);color(\xXXXI)=(wlshcolXXXI);color(\xXXXII)=(wlshcolXXXII);color(\xXXXIII)=(wlshcolXXXIII);color(\xXXXIV)=(wlshcolXXXIV);color(\xXXXV)=(wlshcolXXXV);color(\xXXXVI)=(wlshcolXXXVI);color(\xXXXVII)=(wlshcolXXXVII);color(\xXXXVIII)=(wlshcolXXXVIII);color(\xXXXIX)=(wlshcolXXXIX);color(\xXL)=(wlshcolXL);color(\xXLI)=(wlshcolXLI);color(\xXLII)=(wlshcolXLII);color(\xXLIII)=(wlshcolXLIII);color(\xXLIV)=(wlshcolXLIV);color(\xXLV)=(wlshcolXLV);color(\xXLVI)=(wlshcolXLVI);color(\xXLVII)=(wlshcolXLVII);color(\xXLVIII)=(wlshcolXLVIII);color(\xXLIX)=(wlshcolXLIX);color(\xL)=(wlshcolL);color(\xLI)=(wlshcolLI);%
+color(\xF)=(\wl at IRcolor!\@wl at shade@opacity!\wl at shade@opacitycolor);color(100bp)=(\wl at IRcolor!\@wl at shade@opacity!\wl at shade@opacitycolor)}
+\fi% ifdim<381pt
+}%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \pgfspectraplotmap[<l|h>]{name}
+% l -> low resolution (51 colors -> 380 to 780 nm ; step 8 nm) ! Default
+% h -> high resolution (401 colors -> 380 to 780 nm ; step 1 nm)
+\def\pgfspectraplotmap{\ignorespaces\@ifnextchar[\wl at pgfspectraplotmap{\wl at pgfspectraplotmap[l]}}%
+\def\wl at pgfspectraplotmap[#1]#2{\ignorespaces%
+\def\wl at test{#1}\def\wl at l{l}\def\wl at h{h}%
+\ifx\wl at test\wl at l\relax%
+\@for\n:={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51}\do{%
+\pgfmathparse{380+(\n-1)*8}\edef\wl at currentwl{\pgfmathresult}%
+\wlcolor{\wl at currentwl}%
+\edef\wl at colorname{wlshcol\@Roman\n}\relax\colorlet{\wl at colorname}{wlcolor}%%
+}%
+% the pgfplots colormap
+\pgfplotsset{/pgfplots/colormap={#2}{color(0bp)=(wlshcolI); color(1bp)=(wlshcolII); color(2bp)=(wlshcolIII); color(3bp)=(wlshcolIV); color(4bp)=(wlshcolV); color(5bp)=(wlshcolVI); color(6bp)=(wlshcolVII); color(7bp)=(wlshcolVIII); color(8bp)=(wlshcolIX); color(9bp)=(wlshcolX); color(10bp)=(wlshcolXI); color(11bp)=(wlshcolXII); color(12bp)=(wlshcolXIII); color(13bp)=(wlshcolXIV); color(14bp)=(wlshcolXV); color(15bp)=(wlshcolXVI); color(16bp)=(wlshcolXVII); color(17bp)=(wlshcolXVIII); color(18bp)=(wlshcolXIX); color(19bp)=(wlshcolXX); color(20bp)=(wlshcolXXI); color(21bp)=(wlshcolXXII); color(22bp)=(wlshcolXXIII); color(23bp)=(wlshcolXXIV); color(24bp)=(wlshcolXXV); color(25bp)=(wlshcolXXVI); color(26bp)=(wlshcolXXVII); color(27bp)=(wlshcolXXVIII); color(28bp)=(wlshcolXXIX); color(29bp)=(wlshcolXXX); color(30bp)=(wlshcolXXXI); color(31bp)=(wlshcolXXXII); color(32bp)=(wlshcolXXXIII); color(33bp)=(wlshcolXXXIV); color(34bp)=(wlshcolXXXV); color(35bp)=(wlshcolXXXVI); color(36bp)=(wlshcolXXXVII); color(37bp)=(wlshcolXXXVIII); color(38bp)=(wlshcolXXXIX); color(39bp)=(wlshcolXL); color(40bp)=(wlshcolXLI); color(41bp)=(wlshcolXLII); color(42bp)=(wlshcolXLIII); color(43bp)=(wlshcolXLIV); color(44bp)=(wlshcolXLV); color(45bp)=(wlshcolXLVI); color(46bp)=(wlshcolXLVII); color(47bp)=(wlshcolXLVIII); color(48bp)=(wlshcolXLIX); color(49bp)=(wlshcolL); color(50bp)=(wlshcolLI)}}%
+\else\ifx\wl at test\wl at h\relax%%
+\pgfplotsset{/pgfplots/colormap={#2}{rgb(0bp)=(.3,0,.3); rgb(1bp)=(.3122,0,.3175); rgb(2bp)=(.3238,0,.335); rgb(3bp)=(.3349,0,.3525); rgb(4bp)=(.3453,0,.37); rgb(5bp)=(.3552,0,.3875); rgb(6bp)=(.3645,0,.405); rgb(7bp)=(.3732,0,.4225); rgb(8bp)=(.3813,0,.44); rgb(9bp)=(.3889,0,.4575); rgb(10bp)=(.3958,0,.475); rgb(11bp)=(.4022,0,.4925); rgb(12bp)=(.408,0,.51); rgb(13bp)=(.4132,0,.5275); rgb(14bp)=(.4178,0,.545); rgb(15bp)=(.4219,0,.5625); rgb(16bp)=(.4253,0,.58); rgb(17bp)=(.4282,0,.5975); rgb(18bp)=(.4305,0,.615); rgb(19bp)=(.4322,0,.6325); rgb(20bp)=(.4333,0,.65); rgb(21bp)=(.4339,0,.6675); rgb(22bp)=(.4338,0,.685); rgb(23bp)=(.4332,0,.7025); rgb(24bp)=(.432,0,.72); rgb(25bp)=(.4302,0,.7375); rgb(26bp)=(.4278,0,.755); rgb(27bp)=(.4249,0,.7725); rgb(28bp)=(.4213,0,.79); rgb(29bp)=(.4172,0,.8075); rgb(30bp)=(.4125,0,.825); rgb(31bp)=(.4072,0,.8425); rgb(32bp)=(.4013,0,.86); rgb(33bp)=(.3949,0,.8775); rgb(34bp)=(.3878,0,.895); rgb(35bp)=(.3802,0,.9125); rgb(36bp)=(.372,0,.93); rgb(37bp)=(.3632,0,.9475); rgb(38bp)=(.3538,0,.965); rgb(39bp)=(.3439,0,.9825); rgb(40bp)=(.3333,0,1); rgb(41bp)=(.3167,0,1); rgb(42bp)=(.3,0,1); rgb(43bp)=(.2833,0,1); rgb(44bp)=(.2667,0,1); rgb(45bp)=(.25,0,1); rgb(46bp)=(.2333,0,1); rgb(47bp)=(.2167,0,1); rgb(48bp)=(.2,0,1); rgb(49bp)=(.1833,0,1); rgb(50bp)=(.1667,0,1); %
+rgb(51bp)=(.15,0,1); rgb(52bp)=(.1333,0,1); rgb(53bp)=(.1167,0,1); rgb(54bp)=(.1,0,1); rgb(55bp)=(.0833,0,1); rgb(56bp)=(.0667,0,1); rgb(57bp)=(.05,0,1); rgb(58bp)=(.0333,0,1); rgb(59bp)=(.0167,0,1); rgb(60bp)=(0,0,1); rgb(61bp)=(0,.02,1); rgb(62bp)=(0,.04,1); rgb(63bp)=(0,.06,1); rgb(64bp)=(0,.08,1); rgb(65bp)=(0,.1,1); rgb(66bp)=(0,.12,1); rgb(67bp)=(0,.14,1); rgb(68bp)=(0,.16,1); rgb(69bp)=(0,.18,1); rgb(70bp)=(0,.2,1); rgb(71bp)=(0,.22,1); rgb(72bp)=(0,.24,1); rgb(73bp)=(0,.26,1); rgb(74bp)=(0,.28,1); rgb(75bp)=(0,.3,1); rgb(76bp)=(0,.32,1); rgb(77bp)=(0,.34,1); rgb(78bp)=(0,.36,1); rgb(79bp)=(0,.38,1); rgb(80bp)=(0,.4,1); rgb(81bp)=(0,.42,1); rgb(82bp)=(0,.44,1); rgb(83bp)=(0,.46,1); rgb(84bp)=(0,.48,1); rgb(85bp)=(0,.5,1); rgb(86bp)=(0,.52,1); rgb(87bp)=(0,.54,1); rgb(88bp)=(0,.56,1); rgb(89bp)=(0,.58,1); rgb(90bp)=(0,.6,1); rgb(91bp)=(0,.62,1); rgb(92bp)=(0,.64,1); rgb(93bp)=(0,.66,1); rgb(94bp)=(0,.68,1); rgb(95bp)=(0,.7,1); rgb(96bp)=(0,.72,1); rgb(97bp)=(0,.74,1); rgb(98bp)=(0,.76,1); rgb(99bp)=(0,.78,1); rgb(100bp)=(0,.8,1); %
+rgb(101bp)=(0,.82,1); rgb(102bp)=(0,.84,1); rgb(103bp)=(0,.86,1); rgb(104bp)=(0,.88,1); rgb(105bp)=(0,.9,1); rgb(106bp)=(0,.92,1); rgb(107bp)=(0,.94,1); rgb(108bp)=(0,.96,1); rgb(109bp)=(0,.98,1); rgb(110bp)=(0,1,1); rgb(111bp)=(0,1,.95); rgb(112bp)=(0,1,.9); rgb(113bp)=(0,1,.85); rgb(114bp)=(0,1,.8); rgb(115bp)=(0,1,.75); rgb(116bp)=(0,1,.7); rgb(117bp)=(0,1,.65); rgb(118bp)=(0,1,.6); rgb(119bp)=(0,1,.55); rgb(120bp)=(0,1,.5); rgb(121bp)=(0,1,.45); rgb(122bp)=(0,1,.4); rgb(123bp)=(0,1,.35); rgb(124bp)=(0,1,.3); rgb(125bp)=(0,1,.25); rgb(126bp)=(0,1,.2); rgb(127bp)=(0,1,.15); rgb(128bp)=(0,1,.1); rgb(129bp)=(0,1,.05); rgb(130bp)=(0,1,0); rgb(131bp)=(.0143,1,0); rgb(132bp)=(.0286,1,0); rgb(133bp)=(.0429,1,0); rgb(134bp)=(.0571,1,0); rgb(135bp)=(.0714,1,0); rgb(136bp)=(.0857,1,0); rgb(137bp)=(.1,1,0); rgb(138bp)=(.1143,1,0); rgb(139bp)=(.1286,1,0); rgb(140bp)=(.1429,1,0); rgb(141bp)=(.1571,1,0); rgb(142bp)=(.1714,1,0); rgb(143bp)=(.1857,1,0); rgb(144bp)=(.2,1,0); rgb(145bp)=(.2143,1,0); rgb(146bp)=(.2286,1,0); rgb(147bp)=(.2429,1,0); rgb(148bp)=(.2571,1,0); rgb(149bp)=(.2714,1,0); rgb(150bp)=(.2857,1,0); %
+rgb(151bp)=(.3,1,0); rgb(152bp)=(.3143,1,0); rgb(153bp)=(.3286,1,0); rgb(154bp)=(.3429,1,0); rgb(155bp)=(.3571,1,0); rgb(156bp)=(.3714,1,0); rgb(157bp)=(.3857,1,0); rgb(158bp)=(.4,1,0); rgb(159bp)=(.4143,1,0); rgb(160bp)=(.4286,1,0); rgb(161bp)=(.4429,1,0); rgb(162bp)=(.4571,1,0); rgb(163bp)=(.4714,1,0); rgb(164bp)=(.4857,1,0); rgb(165bp)=(.5,1,0); rgb(166bp)=(.5143,1,0); rgb(167bp)=(.5286,1,0); rgb(168bp)=(.5429,1,0); rgb(169bp)=(.5571,1,0); rgb(170bp)=(.5714,1,0); rgb(171bp)=(.5857,1,0); rgb(172bp)=(.6,1,0); rgb(173bp)=(.6143,1,0); rgb(174bp)=(.6286,1,0); rgb(175bp)=(.6429,1,0); rgb(176bp)=(.6571,1,0); rgb(177bp)=(.6714,1,0); rgb(178bp)=(.6857,1,0); rgb(179bp)=(.7,1,0); rgb(180bp)=(.7143,1,0); rgb(181bp)=(.7286,1,0); rgb(182bp)=(.7429,1,0); rgb(183bp)=(.7571,1,0); rgb(184bp)=(.7714,1,0); rgb(185bp)=(.7857,1,0); rgb(186bp)=(.8,1,0); rgb(187bp)=(.8143,1,0); rgb(188bp)=(.8286,1,0); rgb(189bp)=(.8429,1,0); rgb(190bp)=(.8571,1,0); rgb(191bp)=(.8714,1,0); rgb(192bp)=(.8857,1,0); rgb(193bp)=(.9,1,0); rgb(194bp)=(.9143,1,0); rgb(195bp)=(.9286,1,0); rgb(196bp)=(.9429,1,0); rgb(197bp)=(.9571,1,0); rgb(198bp)=(.9714,1,0); rgb(199bp)=(.9857,1,0); rgb(200bp)=(1,1,0); %
+rgb(201bp)=(1,.9846,0); rgb(202bp)=(1,.9692,0); rgb(203bp)=(1,.9538,0); rgb(204bp)=(1,.9385,0); rgb(205bp)=(1,.9231,0); rgb(206bp)=(1,.9077,0); rgb(207bp)=(1,.8923,0); rgb(208bp)=(1,.8769,0); rgb(209bp)=(1,.8615,0); rgb(210bp)=(1,.8462,0); rgb(211bp)=(1,.8308,0); rgb(212bp)=(1,.8154,0); rgb(213bp)=(1,.8,0); rgb(214bp)=(1,.7846,0); rgb(215bp)=(1,.7692,0); rgb(216bp)=(1,.7538,0); rgb(217bp)=(1,.7385,0); rgb(218bp)=(1,.7231,0); rgb(219bp)=(1,.7077,0); rgb(220bp)=(1,.6923,0); rgb(221bp)=(1,.6769,0); rgb(222bp)=(1,.6615,0); rgb(223bp)=(1,.6462,0); rgb(224bp)=(1,.6308,0); rgb(225bp)=(1,.6154,0); rgb(226bp)=(1,.6,0); rgb(227bp)=(1,.5846,0); rgb(228bp)=(1,.5692,0); rgb(229bp)=(1,.5538,0); rgb(230bp)=(1,.5385,0); rgb(231bp)=(1,.5231,0); rgb(232bp)=(1,.5077,0); rgb(233bp)=(1,.4923,0); rgb(234bp)=(1,.4769,0); rgb(235bp)=(1,.4615,0); rgb(236bp)=(1,.4462,0); rgb(237bp)=(1,.4308,0); rgb(238bp)=(1,.4154,0); rgb(239bp)=(1,.4,0); rgb(240bp)=(1,.3846,0); rgb(241bp)=(1,.3692,0); rgb(242bp)=(1,.3538,0); rgb(243bp)=(1,.3385,0); rgb(244bp)=(1,.3231,0); rgb(245bp)=(1,.3077,0); rgb(246bp)=(1,.2923,0); rgb(247bp)=(1,.2769,0); rgb(248bp)=(1,.2615,0); rgb(249bp)=(1,.2462,0); rgb(250bp)=(1,.2308,0); %
+rgb(251bp)=(1,.2154,0); rgb(252bp)=(1,.2,0); rgb(253bp)=(1,.1846,0); rgb(254bp)=(1,.1692,0); rgb(255bp)=(1,.1538,0); rgb(256bp)=(1,.1385,0); rgb(257bp)=(1,.1231,0); rgb(258bp)=(1,.1077,0); rgb(259bp)=(1,.0923,0); rgb(260bp)=(1,.0769,0); rgb(261bp)=(1,.0615,0); rgb(262bp)=(1,.0462,0); rgb(263bp)=(1,.0308,0); rgb(264bp)=(1,.0154,0); rgb(265bp)=(1,0,0); rgb(266bp)=(1,0,0); rgb(267bp)=(1,0,0); rgb(268bp)=(1,0,0); rgb(269bp)=(1,0,0); rgb(270bp)=(1,0,0); rgb(271bp)=(1,0,0); rgb(272bp)=(1,0,0); rgb(273bp)=(1,0,0); rgb(274bp)=(1,0,0); rgb(275bp)=(1,0,0); rgb(276bp)=(1,0,0); rgb(277bp)=(1,0,0); rgb(278bp)=(1,0,0); rgb(279bp)=(1,0,0); rgb(280bp)=(1,0,0); rgb(281bp)=(1,0,0); rgb(282bp)=(1,0,0); rgb(283bp)=(1,0,0); rgb(284bp)=(1,0,0); rgb(285bp)=(1,0,0); rgb(286bp)=(1,0,0); rgb(287bp)=(1,0,0); rgb(288bp)=(1,0,0); rgb(289bp)=(1,0,0); rgb(290bp)=(1,0,0); rgb(291bp)=(1,0,0); rgb(292bp)=(1,0,0); rgb(293bp)=(1,0,0); rgb(294bp)=(1,0,0); rgb(295bp)=(1,0,0); rgb(296bp)=(1,0,0); rgb(297bp)=(1,0,0); rgb(298bp)=(1,0,0); rgb(299bp)=(1,0,0); rgb(300bp)=(1,0,0); %
+rgb(301bp)=(1,0,0); rgb(302bp)=(1,0,0); rgb(303bp)=(1,0,0); rgb(304bp)=(1,0,0); rgb(305bp)=(1,0,0); rgb(306bp)=(1,0,0); rgb(307bp)=(1,0,0); rgb(308bp)=(1,0,0); rgb(309bp)=(1,0,0); rgb(310bp)=(1,0,0); rgb(311bp)=(1,0,0); rgb(312bp)=(1,0,0); rgb(313bp)=(1,0,0); rgb(314bp)=(1,0,0); rgb(315bp)=(1,0,0); rgb(316bp)=(1,0,0); rgb(317bp)=(1,0,0); rgb(318bp)=(1,0,0); rgb(319bp)=(1,0,0); rgb(320bp)=(1,0,0); rgb(321bp)=(.9913,0,0); rgb(322bp)=(.9825,0,0); rgb(323bp)=(.9738,0,0); rgb(324bp)=(.965,0,0); rgb(325bp)=(.9563,0,0); rgb(326bp)=(.9475,0,0); rgb(327bp)=(.9388,0,0); rgb(328bp)=(.93,0,0); rgb(329bp)=(.9213,0,0); rgb(330bp)=(.9125,0,0); rgb(331bp)=(.9038,0,0); rgb(332bp)=(.895,0,0); rgb(333bp)=(.8863,0,0); rgb(334bp)=(.8775,0,0); rgb(335bp)=(.8688,0,0); rgb(336bp)=(.86,0,0); rgb(337bp)=(.8513,0,0); rgb(338bp)=(.8425,0,0); rgb(339bp)=(.8338,0,0); rgb(340bp)=(.825,0,0); rgb(341bp)=(.8163,0,0); rgb(342bp)=(.8075,0,0); rgb(343bp)=(.7988,0,0); rgb(344bp)=(.79,0,0); rgb(345bp)=(.7813,0,0); rgb(346bp)=(.7725,0,0); rgb(347bp)=(.7638,0,0); rgb(348bp)=(.755,0,0); rgb(349bp)=(.7463,0,0); rgb(350bp)=(.7375,0,0); %
+rgb(351bp)=(.7288,0,0); rgb(352bp)=(.72,0,0); rgb(353bp)=(.7113,0,0); rgb(354bp)=(.7025,0,0); rgb(355bp)=(.6938,0,0); rgb(356bp)=(.685,0,0); rgb(357bp)=(.6763,0,0); rgb(358bp)=(.6675,0,0); rgb(359bp)=(.6588,0,0); rgb(360bp)=(.65,0,0); rgb(361bp)=(.6413,0,0); rgb(362bp)=(.6325,0,0); rgb(363bp)=(.6238,0,0); rgb(364bp)=(.615,0,0); rgb(365bp)=(.6063,0,0); rgb(366bp)=(.5975,0,0); rgb(367bp)=(.5888,0,0); rgb(368bp)=(.58,0,0); rgb(369bp)=(.5713,0,0); rgb(370bp)=(.5625,0,0); rgb(371bp)=(.5538,0,0); rgb(372bp)=(.545,0,0); rgb(373bp)=(.5363,0,0); rgb(374bp)=(.5275,0,0); rgb(375bp)=(.5188,0,0); rgb(376bp)=(.51,0,0); rgb(377bp)=(.5013,0,0); rgb(378bp)=(.4925,0,0); rgb(379bp)=(.4838,0,0); rgb(380bp)=(.475,0,0); rgb(381bp)=(.4663,0,0); rgb(382bp)=(.4575,0,0); rgb(383bp)=(.4488,0,0); rgb(384bp)=(.44,0,0); rgb(385bp)=(.4313,0,0); rgb(386bp)=(.4225,0,0); rgb(387bp)=(.4138,0,0); rgb(388bp)=(.405,0,0); rgb(389bp)=(.3963,0,0); rgb(390bp)=(.3875,0,0); rgb(391bp)=(.3788,0,0); rgb(392bp)=(.37,0,0); rgb(393bp)=(.3613,0,0); rgb(394bp)=(.3525,0,0); rgb(395bp)=(.3438,0,0); rgb(396bp)=(.335,0,0); rgb(397bp)=(.3263,0,0); rgb(398bp)=(.3175,0,0); rgb(399bp)=(.3088,0,0); rgb(400bp)=(.3,0,0); %
+}}%
+\fi\fi%
+}%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \pgfspectrarainbow[<tikz options>](<rainbow fade>,<rainbow start>,<rainbow knock out>,<rainbow background>,<rainbow transparency>){radius}
+% tikz options -> color, opacity,scope fading
+% rainbow clip -> applies a scope fading in clipped region
+% ...
+\pgfkeys{/wl/.cd,%
+rainbow fade/.get=\wl at rainbowfade,%
+rainbow fade/.store in=\wl at rainbowfade,%
+rainbow fade/.default={},%
+rainbow start/.get=\wl at rainbow@start,%
+rainbow start/.store in=\wl at rainbow@start,%
+rainbow start/.default=.6,% -> 60%
+rainbow knock out/.get=\wl at rainbow@KO,%
+rainbow knock out/.store in=\wl at rainbow@KO,%
+rainbow knock out/.default=.4,% -> 40%
+rainbow background/.get=\wl at rainbowback,%
+rainbow background/.store in=\wl at rainbowback,%
+rainbow background/.default=white,%
+rainbow transparency/.get=\wl at rainbowtransp,%
+rainbow transparency/.store in=\wl at rainbowtransp,%
+rainbow transparency/.default=0}% -> 0%
+%
+\def\pgfspectrarainbow{\ignorespaces\@ifnextchar[\pgf at spectrarainbow{\pgf at spectrarainbow[]}}%
+\def\pgf at spectrarainbow[#1]{\ignorespaces\@ifnextchar({\pgf at spectra@rainbow{#1}}{\pgf at spectra@rainbow{#1}()}}%
+%
+\def\pgf at spectra@rainbow#1(#2)#3{\ignorespaces%
+\pgfkeys{/wl/.cd,rainbow fade,rainbow start,rainbow knock out,rainbow background,rainbow transparency}%
+\pgfkeys{/wl/.cd,#2}%
+\pgfmathparse{100-\wl at rainbowtransp*100}\edef\wl at rainbow@transp{\pgfmathresult}%
+\pgfmathparse{\wl at rainbowtransp*100}\edef\wl at rainbow@transp at w{\pgfmathresult}%
+\edef\wl at rainbowend{.8875cm}\pgfmathparse{\wl at rainbow@start*\wl at rainbowend/1cm}\edef\wl at rainbowstart{\pgfmathresult cm}%
+\pgfmathparse{\wl at rainbow@KO*#3/1cm}\edef\wl at rainbowKO{\pgfmathresult cm}%%\edef\wl at rainbowKO{\wl at rainbow@KO cm}%
+\ifdim\wl at rainbowstart<\wl at rainbowend\relax%
+\ifdim\wl at rainbowstart<.0175cm\relax\edef\wl at rainbowstart{.0175cm}\fi% ensuring there is no error in radial shading
+\pgfkeys{/pgf/number format/.cd,fixed,precision=3,set thousands separator={},assume math mode=true}%
+\pgfmathparse{\wl at rainbowstart-1/50*(\wl at rainbowend-\wl at rainbowstart)}%
+\pgfmathprintnumberto{\pgfmathresult}{\wl at rainbowresult}%
+\edef\rO{\wl at rainbowresult pt}%
+\@for\n:={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51}\do{%
+\pgfmathparse{380+(\n-1)*8}\edef\wl at currentwl{\pgfmathresult}%
+\wlcolor{\wl at currentwl}%
+\edef\wl at colorname{wlshcol\@Roman\n}\relax\colorlet{\wl at colorname}{wlcolor!100!transparent!\wl at rainbow@transp}%
+\pgfmathparse{\wl at rainbowstart+1/50*(\n-1)*(\wl at rainbowend-\wl at rainbowstart)}%
+\pgfmathprintnumberto{\pgfmathresult}{\wl at rainbowresult}%
+\expandafter\edef\csname r\@Roman\n\endcsname{\wl at rainbowresult pt}%
+}%
+\pgfdeclareradialshading{pgfspectrarainbow}{\pgfpoint{0pt}{0pt}}{%
+color(0cm)=(\wl at rainbowback!\wl at rainbow@transp at w!white);color(4/5*\rO)=(\wl at rainbowback!\wl at rainbow@transp at w!white!50);color(\rO)=(white);%
+color(\rI)=(wlshcolI);color(\rII)=(wlshcolII);color(\rIII)=(wlshcolIII);color(\rIV)=(wlshcolIV);color(\rV)=(wlshcolV);color(\rVI)=(wlshcolVI);color(\rVII)=(wlshcolVII);color(\rVIII)=(wlshcolVIII);color(\rIX)=(wlshcolIX);color(\rX)=(wlshcolX);%
+color(\rXI)=(wlshcolXI);color(\rXII)=(wlshcolXII);color(\rXIII)=(wlshcolXIII);color(\rXIV)=(wlshcolXIV);color(\rXV)=(wlshcolXV);color(\rXVI)=(wlshcolXVI);color(\rXVII)=(wlshcolXVII);color(\rXVIII)=(wlshcolXVIII);color(\rXIX)=(wlshcolXIX);color(\rXX)=(wlshcolXX);%
+color(\rXXI)=(wlshcolXXI);color(\rXXII)=(wlshcolXXII);color(\rXXIII)=(wlshcolXXIII);color(\rXXIV)=(wlshcolXXIV);color(\rXXV)=(wlshcolXXV);color(\rXXVI)=(wlshcolXXVI);color(\rXXVII)=(wlshcolXXVII);color(\rXXVIII)=(wlshcolXXVIII);color(\rXXIX)=(wlshcolXXIX);color(\rXXX)=(wlshcolXXX);%
+color(\rXXXI)=(wlshcolXXXI);color(\rXXXII)=(wlshcolXXXII);color(\rXXXIII)=(wlshcolXXXIII);color(\rXXXIV)=(wlshcolXXXIV);color(\rXXXV)=(wlshcolXXXV);color(\rXXXVI)=(wlshcolXXXVI);color(\rXXXVII)=(wlshcolXXXVII);color(\rXXXVIII)=(wlshcolXXXVIII);color(\rXXXIX)=(wlshcolXXXIX);color(\rXL)=(wlshcolXL);%
+color(\rXLI)=(wlshcolXLI);color(\rXLII)=(wlshcolXLII);color(\rXLIII)=(wlshcolXLIII);color(\rXLIV)=(wlshcolXLIV);color(\rXLV)=(wlshcolXLV);color(\rXLVI)=(wlshcolXLVI);color(\rXLVII)=(wlshcolXLVII);color(\rXLVIII)=(wlshcolXLVIII);color(\rXLIX)=(wlshcolXLIX);color(\rL)=(wlshcolL);color(\rLI)=(wlshcolLI);%
+color(.95cm)=(wlshcolLI)%
+}%
+\ifx\wl at rainbowfade\@empty\relax%
+\tikz{\clip(-#3,\wl at rainbowKO) rectangle ++(2*#3,#3-\wl at rainbowKO);%
+\fill[#1,shading=pgfspectrarainbow] (0,0) circle(#3);}%
+\else%
+\tikz{\clip[scope fading=\wl at rainbowfade] (-#3,\wl at rainbowKO) rectangle ++(2*#3,#3-\wl at rainbowKO);%
+\fill[shading=pgfspectrarainbow,\wl at rainbowback,#1] (0,0) circle(#3);}%
+\fi%
+\else\PackageError{pgf-spectra}{invalid 'rainbow start' value (rainbow start=\wl at rainbow@start). The rainbow start should be greater or equal then 0 and lower then 1.}{Don\xB4t forget that 'rainbow start' value is the fraction from witch the colors begin, relative to the center of a circle with radius 1...}%
+\fi
+}%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \tempercolor -> Convert a temperature in Kelvin to rgb color
+%
+% The original algorithm used in this macro can be found at
+%
+%                                    https://github.com/neilbartlett/color-temperature
+%
+% More information at...
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% --------------------------------------------------------------------------------------------------------------
+% https://tannerhelland.com/2012/09/18/convert-temperature-rgb-algorithm-code.html
+%
+% \xABStart with a temperature, in Kelvin, somewhere between 1000 and 40000.  (Other values may work,
+% but I can't make any promises about the quality of the algorithm's estimates above 40000 K.)\xBB
+%                                                                                                                       Tanner Helland
+% https://www.zombieprototypes.com/?p=210
+%---------------------------------------------------------------------------------------------------------------
+% and the improved algorithm at...
+% --------------------------------------------------------------------------------------------------------------
+% https://github.com/neilbartlett/color-temperature
+%
+% neilbartlett/color-temperature is licensed under the
+%
+% MIT License
+% A short and simple permissive license with conditions only requiring preservation of copyright and license notices.
+% Licensed works, modifications, and larger works may be distributed under different terms and without source code.
+%
+% Permissions
+%      Commercial use, Modification,  Distribution,  Private use
+% Limitations
+%    Liability,  Warranty
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% The MIT License (MIT)
+%
+% Copyright (c) 2015 Neil Bartlett
+%
+% Permission is hereby granted, free of charge, to any person obtaining a copy
+% of this software and associated documentation files (the "Software"), to deal
+% in the Software without restriction, including without limitation the rights
+% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+% copies of the Software, and to permit persons to whom the Software is
+% furnished to do so, subject to the following conditions:
+%
+% The above copyright notice and this permission notice shall be included in
+% all copies or substantial portions of the Software.
+%
+% THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+% THE SOFTWARE.
+% \xA9 2021 GitHub, Inc.
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\definecolor{tempercolor}{rgb}{0,0,0}%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \tempercolor{Kelvin}
+\def\tempercolor#1{\ignorespaces%
+%Set Temperature = Temperature \ 100
+\edef\wl at temperatura{#1sp}%
+\ifdim\wl at temperatura>16380sp\relax% for supporting large values of T
+\pgfkeys{/pgf/number format/.cd,fixed,precision=2,fixed zerofill,set thousands separator={},assume math mode=true}%
+\pgfmathparse{#1sp/100sp*1.0026931+.002}% correction factor for the division made in sp
+\pgfmathprintnumberto{\pgfmathresult}{\wl at T@tmp}%
+\edef\wl at temperatura{\wl at T@tmp}%
+\edef\wl at temperatura@pt{\pgfmathresult pt}%
+\else%
+\pgfmathparse{#1/100}%
+\edef\wl at temperatura{\pgfmathresult}%
+\edef\wl at temperatura@pt{\pgfmathresult pt}%
+\fi%
+\ifdim\wl at temperatura@pt<10pt\relax%
+\PackageError{pgf-spectra}{tempercolor: the temperature must be at least 1000K}{Type a greater temperature...}%
+\else\ifdim\wl at temperatura@pt>400pt\relax%
+\PackageError{pgf-spectra}{tempercolor: the temperature must be at most 40000K}{Type a smaller temperature...}%
+\else%
+%Calculate Red:
+\ifdim\wl at temperatura@pt>66pt\relax%
+    \pgfmathparse{\wl at temperatura-55}\edef\wl at tempercolor@r{\pgfmathresult}%
+    \pgfmathparse{351.976906+ 0.114207*\wl at tempercolor@r-40.253663*ln(\wl at tempercolor@r)}%
+    \edef\wl at tempercolor@r{\pgfmathresult}%
+    \edef\wl at tempercolor@r at pt{\pgfmathresult pt}%
+    \ifdim\wl at tempercolor@r at pt<0pt\edef\wl at tempercolor@r{0}\relax\fi%
+    \ifdim\wl at tempercolor@r at pt>255pt\edef\wl at tempercolor@r{255}\relax\fi%
+    \pgfmathparse{\wl at tempercolor@r/255}\edef\wl at tempercolor@r{\pgfmathresult}%
+\else%
+    \edef\wl at tempercolor@r{1}%
+\fi%
+% Calculate Green:
+\ifdim\wl at temperatura@pt>66pt\relax%
+    \pgfmathparse{\wl at temperatura-50}\edef\wl at tempercolor@g{\pgfmathresult}%
+    \pgfmathparse{325.449413+0.079435*\wl at tempercolor@g -28.085296*ln(\wl at tempercolor@g)}%
+    \edef\wl at tempercolor@g{\pgfmathresult}%
+    \edef\wl at tempercolor@g at pt{\pgfmathresult pt}%
+    \ifdim\wl at tempercolor@g at pt<0pt\edef\wl at tempercolor@g{0}\relax\fi%
+    \ifdim\wl at tempercolor@g at pt>255pt\edef\wl at tempercolor@g{255}\relax\fi%
+    \pgfmathparse{\wl at tempercolor@g/255}\edef\wl at tempercolor@g{\pgfmathresult}%
+\else%
+    \pgfmathparse{\wl at temperatura-2}\edef\wl at tempercolor@g{\pgfmathresult}%
+    \pgfmathparse{-155.254856-0.445970*\wl at tempercolor@g+104.492162*ln(\wl at tempercolor@g)}%
+    \edef\wl at tempercolor@g{\pgfmathresult}%
+    \edef\wl at tempercolor@g at pt{\pgfmathresult pt}%
+    \ifdim\wl at tempercolor@g at pt<0pt\edef\wl at tempercolor@g{0}\relax\fi%
+    \ifdim\wl at tempercolor@g at pt>255pt\edef\wl at tempercolor@b{255}\relax\fi%
+    \pgfmathparse{\wl at tempercolor@g/255}\edef\wl at tempercolor@g{\pgfmathresult}%
+\fi%
+%Calculate Blue:
+\ifdim\wl at temperatura@pt<66pt\relax%
+    \ifdim\wl at temperatura@pt>20pt\relax%
+    \pgfmathparse{\wl at temperatura-10}\edef\wl at tempercolor@b{\pgfmathresult}%
+    \pgfmathparse{-254.769352+0.827410*\wl at tempercolor@b+115.679944*ln(\wl at tempercolor@b)}%
+    \edef\wl at tempercolor@b{\pgfmathresult}%
+    \edef\wl at tempercolor@b at pt{\pgfmathresult pt}%
+    \ifdim\wl at tempercolor@b at pt<0pt\edef\wl at tempercolor@b{0}\relax\fi%
+    \ifdim\wl at tempercolor@b at pt>255pt\edef\wl at tempercolor@b{255}\relax\fi%
+    \pgfmathparse{\wl at tempercolor@b/255}\edef\wl at tempercolor@b{\pgfmathresult}%
+    \else%
+    \edef\wl at tempercolor@b{0}%
+    \fi%
+\else%
+    \edef\wl at tempercolor@b{1}%
+\fi%
+\definecolor{wl@@tempercolor}{rgb}{\wl at tempercolor@r,\wl at tempercolor@g,\wl at tempercolor@b}%
+\colorlet{tempercolor}{wl@@tempercolor}%
+\fi\fi% check limits 1000K<T<40000K
+}%
+% <--- NEW v2.1.0 ------------------
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %
-% nm2rgb convert nanometer wavelength to rgb
+% nm2rgb convert nanometre wavelength to rgb
 % (380 <= Lambda <= 780 ) -> r,g,b on stack
 %
 % BASED on FORTRAN Code
@@ -921,19 +1371,16 @@
 \newdimen\wlc at lorr%red (0. - 1)
 \newdimen\wlc at lorg%green (0. - 1)
 \newdimen\wlc at lorb%blue (0. - 1) % wavelength to rgb values
-\newcount\wl at counta% tmp counter
-\newcount\wl at countb% tmp counter
-\newcount\wl at countc% tmp counter
-\newcount\wl at countd% tmp counter
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 % \wlcolor{wavelength}
 \def\wlcolor#1{\ignorespaces%
+\ifx\wl at bright\undefined\relax\def\wl at bright{100}\fi% NEW v2.1.0
 \wl=#1pt%
 \@wl at gamma=\wl at gamma pt%
 % compute the rgb components
-\ifdim\wl<10pt\relax\PackageWarning{pgf-spectra}{(#1nm) wavelength out of range ignored. The wavelength must be graeter or equal to 10nm (EUV)...}\else% NEW
-\ifdim\wl<379.99999pt\relax\else%% NEW
+\ifdim\wl<10pt\relax\PackageWarning{pgf-spectra}{(#1nm) wavelength out of range ignored. The wavelength must be graeter or equal to 10nm (EUV)...}\else% NEW v2.0.0
+\ifdim\wl<379.99999pt\relax\else%% NEW v2.0.0
 \ifdim\wl<440pt\wlc at lorr=440pt\advance\wlc at lorr by-\wl\divide\wlc at lorr by60\wlc at lorg=0pt\wlc at lorb=1pt\else%
 \ifdim\wl<490pt\wlc at lorr=0pt\wlc at lorg=\wl\advance\wlc at lorg by-440pt\divide\wlc at lorg by50\wlc at lorb=1pt\else%
 \ifdim\wl<510pt\wlc at lorr=0pt\wlc at lorg=1pt\wlc at lorb=510pt\advance\wlc at lorb by-\wl\divide\wlc at lorb by20\else%
@@ -940,7 +1387,7 @@
 \ifdim\wl<580pt\wlc at lorr=\wl\advance\wlc at lorr by-510pt\divide\wlc at lorr by70\wlc at lorg=1pt\wlc at lorb=0pt\else%
 \ifdim\wl<645pt\wlc at lorr=1pt\wlc at lorg=645pt\advance\wlc at lorg by-\wl\divide\wlc at lorg by65\wlc at lorb=0pt\else%
 \ifdim\wl<780.00001pt\wlc at lorr=1pt\wlc at lorg=0pt\wlc at lorb=0pt\else%
-\ifdim\wl>4000pt\relax\PackageWarning{pgf-spectra}{invalid wavelength (#1nm). The wavelength must be lesser or equal to 4000nm (NIR)...}% NEW
+\ifdim\wl>4000pt\relax\PackageWarning{pgf-spectra}{invalid wavelength (#1nm). The wavelength must be lesser or equal to 4000nm (NIR)...}% NEW v2.0.0
 \relax%
 \fi\fi\fi\fi\fi\fi\fi\fi\fi%
 % intensity correction at vision limits
@@ -949,13 +1396,17 @@
 \wl at i=1pt%
 \fi\fi%
 %apply intensity at vision limits correction and  gamma
-\ifdim\wl<380pt\colorlet{wl at temp}{\wl at UVcolor}\else\ifdim\wl>780pt\colorlet{wl at temp}{\wl at IRcolor}\else% NEW
+\ifdim\wl<380pt\colorlet{wl at temp}{\wl at UVcolor}\else\ifdim\wl>780pt\colorlet{wl at temp}{\wl at IRcolor}\else% NEW v2.0.0
 \pgfmathparse{\wlc at lorr*\wl at i^\@wl at gamma}\edef\wl at red{\pgfmathresult}%
 \pgfmathparse{\wlc at lorg*\wl at i^\@wl at gamma}\edef\wl at green{\pgfmathresult}%
 \pgfmathparse{\wlc at lorb*\wl at i^\@wl at gamma}\edef\wl at blue{\pgfmathresult}%
 \definecolor{wl at temp}{rgb}{\wl at red,\wl at green,\wl at blue}%
-\fi\fi% NEW
-\colorlet{wlcolor}{wl at temp}
+\fi\fi% NEW v2.0.0
+\ifwl at usevisibleshade\relax% NEW v2.1.0
+\colorlet{wlcolor}{wl at temp!\wl at bright!\wl at backvisible}%
+\else%
+\colorlet{wlcolor}{wl at temp}%
+\fi%
 }%
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



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