In this case i use --green_4
as a var() for background-color of a CSS Class.
While --wp--preset--color--green-4
is generated for the use in Gutenberg, the “unprocessed” Variable --green_4 does not exist in the context of the Block Editor.
As a workaround i would have to redeclare the colors form Design Panel as vars like this in a an editor stylesheet:
.editor-styles-wrapper {
--beige_1: #F6F5EB;
--green_0: #5E7158;
--green_1: #839D80;
--green_2: #9BBD9B;
--green_3: #C9D8C3;
--green_4: #e5eee6;
--grey_0: #151515;
--grey_1: #404040;
--white: #fff;
--black: #000;
}