How to change CSS color for a single theme palette?

Thanks for pointing that out, @Johani. It looks like the dark-light-choose($light, $dark) function does exactly what I want, but my problem now is that it’s not detecting the change of palette.

My only active theme is called “Nacho” and it has two palettes: “Clara” (Light) and “Oscura” (Dark):

I’ve personalized it with this CSS:

$dark-theme-ins: #4da06d;
$light-theme-ins: #acf2bd;
.modal.history-modal {
    ins {
        background: dark-light-choose($light-theme-ins, $dark-theme-ins);
    }
}

This works with the light palette:
image

But it doesn’t work with the dark palette:
image

If I change the CSS to this, it works:

.modal.history-modal {
    ins {
        background: $dark-theme-ins;
    }
}

So it looks like the change to the dark palette is not being detected. I can see that is-light-color-scheme looks at the brightness of $primary and $secondary. Here is my dark palette:

And the bright palette:

I’m all out of ideas.