It works in my case, where I need to darken warning text color in light mode:
I've added to my custom stylesheet:
[data-bs-theme="light"] { --bs-warning-rgb: 228,155,15; }