scss change theme colors with using external veribales

Solution for scss change theme colors with using external veribales
is Given Below:

Hi all i have this case:
I’m importing variables from:

@import "../../../node_modules/element-plus/packages/theme-chalk/src/index";

and i would like to change the variable color in light and dark theme.

if dark:

$--color-warning: grey;

if light

$--color-warning: yellow;

I can’t change this colors in the css

.product {
 background-color: blue // or using a mixin;
}
// it will not work $--color-warning: my color

I’m using external variables! and i can’t change them in node modules and if i change the

$--color-warning: #e6a23c

it will be changed across all the app.

I didn’t find a way that i can change the variable depends on if it’s a light or dark theme.

Is there a way to do it?