@odd theme-color is just a suggestion to the browser. It might decide, for example, that the color you provide will make text hard to read in the user interface and choose another color. You can suggest a different color for Dark Mode like this:

<meta name="theme-color"
    content="#ecd96f"
    media="(prefers-color-scheme: light)">
<meta name="theme-color"
    content="#0b3e05"
    media="(prefers-color-scheme: dark)">