Yes, there’s a way.
With var(--text-normal) the color behaves as the normal text: almost black in light theme and white in dark theme.
If you want another colors they need to be defined in this way:
:root
{
--mycolor1: #F9E300;
--mycolor2: #ef4343;
}
.theme-light {
--color-code: var(--mycolor1);
}
.theme-dark {
--color-code: var(--mycolor2);
}
Then, instead of color: var(--text-normal) you place this:
color: var(--color-code)