PLY export with color with Scalar

i dont know how saveState/LoadState would help of correctly exporting color into a fileformat which can be read by other 3d toolkits? can you explain this a little bit deeper?