Export: SVG tables linked to CPAL?

Is it possible to export an OpenType SVG font where the SVG table hex colors are linked to the CPAL table?

And if not, is there already a script that helps do this quickly?

Thanks!

How do you build your svg? If you use COLR layer and a “Color layers to SVG” parameter, you get the same colors in the CPAL and in the SVG.