Touying Metropolis theme: What is the variable to define the color of titles in section slides?

Hi,

I’m having trouble trying to change metropolis theme colors in touying. I could set :

  • the background color through neutral-lightest
  • the title slide text color through neutral-darker
  • the progress bar color through primary and primary-lightest, etc.

However, nothing seems to correspond to the color of the title in section slides. Where is this color defined ? I didn’t find any clear reference explaining which color variable defines which element color.

#import "@preview/touying:0.5.3": *
#import themes.metropolis: *
#show: metropolis-theme.with(
    aspect-ratio: "16-9",
    // config-common(handout: true),
    config-info(
        title: [Kéfir et Kombucha],
        subtitle: [Deux écosystèmes microbiens de boissons fermentées],
        author: [Myxonautes],
        date: datetime.today(),
        // institution: [Institution],
        logo: image("images/logo_myxonautes_noir.png"),
    ),
    config-colors(
        primary: rgb(129, 249, 14),
        primary-light: rgb(199, 249, 150),
        secondary: rgb(230, 255, 230),
        neutral-lightest: rgb(8, 10, 8),
        neutral-dark: rgb(230, 255, 230),
        neutral-darkest: rgb(230, 255, 230),
    )
)

#title-slide()
= Kéfir et kombucha
Deux écosystèmes microbiens de boissons fermentées

= Microorganismes 

== test
Du contenu

Everything is fine except the title colors in section slides in this example.

Thanks for your help.

I checked metropolis.typ and found the title and descriptions in new-section-slide doesn’t follow predefined color dict:

#let new-section-slide(level: 1, numbered: true, body) = touying-slide-wrapper(self => {
  let slide-body = {
    set align(horizon)
    show: pad.with(20%)
    set text(size: 1.5em)
    stack(
      dir: ttb,
      spacing: 1em,
      // title
      utils.display-current-heading(level: level, numbered: numbered),
      block(
        height: 2pt,
        width: 100%,
        spacing: 0pt,
        components.progress-bar(height: 2pt, self.colors.primary, self.colors.primary-light),
      ),
    )
    // descriptions
    body
  }
  self = utils.merge-dicts(
    self,
    config-page(fill: self.colors.neutral-lightest),
  )
  touying-slide(self: self, slide-body)
})

You can fix this temporarily by patch new-section-slide function in [package dir]/preview/touying/[version]/themes/metropolis.typ with the function below:

#let new-section-slide(level: 1, numbered: true, body) = touying-slide-wrapper(self => {
  let slide-body = {
    set align(horizon)
    show: pad.with(20%)
    set text(size: 1.5em)
    stack(
      dir: ttb,
      spacing: 1em,
      text(self.colors.neutral-darkest, utils.display-current-heading(level: level, numbered: numbered)),
      block(
        height: 2pt,
        width: 100%,
        spacing: 0pt,
        components.progress-bar(height: 2pt, self.colors.primary, self.colors.primary-light),
      ),
    )
    text(self.colors.neutral-dark, body)
  }
  self = utils.merge-dicts(
    self,
    config-page(fill: self.colors.neutral-lightest),
  )
  touying-slide(self: self, slide-body)
})

I just simply take colors dict into account.

I will open a pull request and hopefully this will be fixed soon.

Thanks, I didn’t know where to check for the slides definitions, that’s great !