I'm trying to set the style tag inside an email widget in macros. Following works fine
style="background-color: {% CMSContext.Current.GlobalObjects.CustomTables["Keyton.EmailTemplateUIElements"].Items.Where("StyleKey = 'theme_bg_1'").FirstItem.StyleValue #%};"
Now, I want to change the above query to use multiple where clauses. The value of the second where clause (Theme) is coming from a property in the widget. I tried the following query but the syntax doesn't seem to be right.
style="background-color: {% CMSContext.Current.GlobalObjects.CustomTables["Keyton.EmailTemplateUIElements"].Items.Where("StyleKey = 'theme_bg_1' and Theme = {% Theme %} ").FirstItem.StyleValue #%};"
How do I set the second parameter value?

I think you have to concatenate the second variable instead of escaping it. In your .Where() try:
Assuming Theme is a string as well.