Cool, that you added this feature. One caveat:
If I use var() in colors from global CSS it doe snot work. The spans in TinyMCE are not created correctly. The color style is missing and the preview color also is not correct.
Yeah I think TinyMCE just forces Hex value. I couldn’t really find a way around it, and it’s why the RGB values get converted if you look at the HTML. Otherwise I would just pass in Dynamic Content as the color values and set it up so changing the global colors changes your usages of this as well. For this reason I set this preference as off by default. TinyMCE version 6 might fix this, not sure when WordPress would move over to that though.