I have an SVG I would like to display as a faint background in a system that supports numerous themes. I am using CSS to set it as the background-image
.
The only way I would be able to do this is if I can manipulate things like the fill
styles and set them to a CSS variable. For example, I have various surface colors like --surface-a
, --surface-b
, etc. I need to set the SVG colors to these variables.
If I manually edit the SVG and set fill: red
, this changes it to red. If I set it to fill: var(--surface-a)
it does not apply the color.
Is this technically possible?