\DeclareNamespace{svg}{http://www.w3.org/2000/svg} \XMLelement{svg:svg}{ } {\begin{pgfpicture} \pgfsetyvec{\pgfpoint{0cm}{-1cm}}} {\end{pgfpicture}} \XMLelement{svg:rect}{ \XMLattribute{width}{\svgwidth}{0} \XMLattribute{height}{\svgheight}{0} \XMLattribute{x}{\svgx}{0} \XMLattribute{y}{\svgy}{0} \XMLattribute{fill}{\svgfill}{x000} } { \expandafter\svgparsefill\svgfill \pgfsetfillcolor{mycol} \pgfpathrectangle{\pgfpointxy{\svgx}{\svgy}}{\pgfpointxy{\svgwidth}{\svgheight}} \pgfusepath{fill}} {} \gdef\svgparsefill#1#2#3#4{% \pgfmathparse{\csname tonum#2\endcsname/16} \let\myred=\pgfmathresult \pgfmathparse{\csname tonum#3\endcsname/16} \let\mygreen=\pgfmathresult \pgfmathparse{\csname tonum#4\endcsname/16} \let\myblue=\pgfmathresult \definecolor{mycol}{rgb}{\myred,\mygreen,\myblue} } \expandafter\gdef\csname tonum0\endcsname{0} \expandafter\gdef\csname tonum1\endcsname{1} \expandafter\gdef\csname tonum2\endcsname{2} \expandafter\gdef\csname tonum3\endcsname{3} \expandafter\gdef\csname tonum4\endcsname{4} \expandafter\gdef\csname tonum5\endcsname{5} \expandafter\gdef\csname tonum6\endcsname{6} \expandafter\gdef\csname tonum7\endcsname{7} \expandafter\gdef\csname tonum8\endcsname{8} \expandafter\gdef\csname tonum9\endcsname{9} \expandafter\gdef\csname tonuma\endcsname{10} \expandafter\gdef\csname tonumb\endcsname{11} \expandafter\gdef\csname tonumc\endcsname{12} \expandafter\gdef\csname tonumd\endcsname{13} \expandafter\gdef\csname tonume\endcsname{14} \expandafter\gdef\csname tonumf\endcsname{15}