WP – Best way to store theme colors to use in SASS/SCSS, JSX (blocks) and PHP [duplicate]
I want to have a way to change theme colors once and use them in SCSS, JSX and PHP.
Right now I have the theme colors in my
$theme-colors: ( base: #fff, primary: #5bb57a, secondary: #f39708, tertiary: #ed7aad, );
Now, I want to mainly use it in combination with JSX to create custom blocks and access the colors as an object in the block editor. (to use it with an color pallet and to store the object key to an attribute)
How can I change the colors once and access them cross language?