{{ $cssvar := "--trim-color:\\s*([^!;}]*).*" }}
{{ $hackbg := "pre{background-color:([^!;}]*).*" }}
{{ with index (findRE $cssvar . 1) 0 }}
  <meta name="theme-color" content={{ strings.TrimRight " " (. | replaceRE $cssvar "$1") }}>
{{ else }}
  {{ with index (findRE $hackbg . 1) 0 }}
    <meta name="theme-color" content={{ . | replaceRE $hackbg "$1" }}>
  {{ end }}
{{ end }}
