how can I export vertex colors?

Hello, I tried to export a mesh that has multiple vertex colors in .x and .3ds formats. The problem is that vertex colors are not exported, only the basic material color is.
Can you help me?