I'm trying to work out a way to replace the color parts of the roll template with one of the roll template variables, but having no luck.
All my roll templates are exactly the same other than the subheader color, so instead of making 10 roll templates with just the "background-color:" changed, I was attempting to pass the color in the roll itself.
So for example I send this:
But I try to do something like this, to replace the color it uses via the {{color}} called in the macro:
I'm not sure if what I'm trying to do is possible, as it seems the roll templates update in the chat archives to whatever it currently is (IE: you change the template, the chat archive shown of the old rolls that used it changes also). So a dynamic color might not be viable?
Is there a way to pass variables I can call in the HTML or CSS with the macro to set colors, vs making 10 Roll templates that are the same with just different colors set for the background?
All my roll templates are exactly the same other than the subheader color, so instead of making 10 roll templates with just the "background-color:" changed, I was attempting to pass the color in the roll itself.
So for example I send this:
&{template:RIFTS} {{color=white}} {{name=TestHeader}} {{subheader=Testsub}} {{TestRoll=[[1d20]]}}The css it triggers for subheader:
.sheet-rolltemplate-RIFTS .sheet-subheader { background-color: #FCBA56; color: #000000; font-family:"Helvetica Neue",Helvetica,sans-serif; font-size:0.9em; font-weight:bold; text-align: center; padding-bottom: 5px; border-top: 1px solid #000; border-bottom: 1px solid #000; }All is fine and well, it works like it should, making the table/cell color what the css calls.
But I try to do something like this, to replace the color it uses via the {{color}} called in the macro:
<tr><td class="sheet-subheader" style="background-color:{{color}}">{{subheader}}</td></tr>It doesn't replace it the color.
I'm not sure if what I'm trying to do is possible, as it seems the roll templates update in the chat archives to whatever it currently is (IE: you change the template, the chat archive shown of the old rolls that used it changes also). So a dynamic color might not be viable?
Is there a way to pass variables I can call in the HTML or CSS with the macro to set colors, vs making 10 Roll templates that are the same with just different colors set for the background?