0👍
This should work as long as your background-color: $color-error-background is in your main.scss file, after the import statement.
Base and Variants contains variables. Any scss file that imports them, will be able to access those variables.
I think the issue may be the import into index.js.
Source:stackexchange.com