Unfortunately, the .ca file format does not save color information for individual dislocations. What you would have to do is to assign the colors at runtime, e.g., with a Python modifier in OVITO Pro after having imported the .ca file.
Could you kindly direct me towards such a sample script which would modify the color of the dislocation lines. Which property would I need to modify for the dislocations?
You would do it in the same way you have already done it, just within the scope of a Python Script modifier in the Desktop application OVITO Pro.
(You already posted the link to a code example you can use above).