Changing theme colors at runtime

Hey guys, I’m working on a theme that basically revolves around a single color with all other shades referencing that value. the yaml is something like this:

  g-accent-h: '200'
  highlight:  hsl(var(--g-accent-h),50%,70%)  
  heavy-highlight: hsl(var(--g-accent-h),50%,90%)
  lightdark: hsl(var(--g-accent-h),50%,30%)
  heavydark: hsl(var(--g-accent-h),50%,15%)
  ultradark: hsl(var(--g-accent-h),50%,5%)
  ha-card-background: 'var(--lightdark)'

I was now wondering is it possibile to change the value of the variables without editing the yaml file, with an automation or a script?

frontend.set_theme will change the theme, but you’d have to define one for each colour scheme.