I have a decorative SVG-figure, and I want to change just one variable, to alter both text- and SVG-colour
Working in Sharelatex, using pdfLatex to compile
SVG to retain its scaling properties
MWE
main.tex
\documentclass{article}
\usepackage{that-theme-of-mine}
\usepackage{svg}
\usepackage{color}
\begin{document}
\begin{figure}
\includesvg{rectangle}
\end{figure}
\end{document}
that-theme-of-mine.sty
\ProvidesPackage{that-theme-of-mine}
% Enables setting text colour
\usepackage{xcolor}
% Defining my specially chosen colour as #dcdccc
\definecolor{my-special-colour}{HTML}{dcdccc}
% Setting the text colour to be my special colour
\color{my-special-colour}
rectangle.svg
<svg>
<rect width="100" height="100" fill="#ff5566"/>
</svg>
Tried
\VerbatimInput{\mycolour}{ffff00}into the theme-file before "My colour scheme":<svg><rect width="100" height="100" fill="#\mycolour"/></svg>and\definecolor{page-colour}{HTML}{\mycolour}under "Background and text colour"\newcommand\x{30}- From David Carlisle's answer to Define numeric variables - No effect. Seems to only support 0-9 anyway\begin{figure}\color{red}from David Carlisle's answer to Change text color when inserting a pdf_tex image - Couldn't even force a colour onto a rectangle without fill
Next
- Inkscape through Sharelatex somehow? I get error messages mentioning Inkscape sometimes, but documentation on the two combined seems flimsy
- Exploring decodearray?
- TikZ?