Colour scheme per blog post via CMS

I‘m working on my personal blog, and for each blog, I want to set three colours:

  1. Background colour
  2. Text colour
  3. Accent colour

This will help me generate colour scheme per post. So for example, this post has a light scheme, but this one has a dark one.

Now, the tricky part is how to apply those colour variables inside each post? Looks like for some elements, it works, but for some it doesn‘t. It works for setting the body bg, the post title, but not the post content (which is a rich-text). It also doesn‘t work when I want to set the text in the header and footer.

And to make things even harder, it would be ideal if I can set the colour variables to my logo, which is an SVG. Can a CMS colour variable manipulate the fill attribute in the SVG code? :slight_smile: