Layered color font

I was wondering if it is possible to export a color font with 2 layers just into one .otf file (instead of 2)?

And keep the colors? Best option would be a CPAL font. Or SVG. Or both. There are tutorials for both.

Thank you, Rainer! Going to have a look at the tutorials.