parse sca-main format, add phase coloring