@Hurix, ignore the previous one and try the below.
Hi Hasvi,
Try this.
var paras = app.activeDocument.stories.everyItem().paragraphs.everyItem().getElements();
try{
app.activeDocument.colors.add({name:"Red", model:ColorModel.process, colorValue:[15,100,100,0]});
}
catch(e){}
for(var i =0;i<paras.length;i++)
{
for(var j =0;j<paras[i].words.length;j++)
{
if(paras[i].words[j].appliedFont.fontFamily != paras[i].appliedParagraphStyle.appliedFont.fontFamily)
{
paras[i].words[j].fillColor = app.activeDocument.swatches.item("Red");
}
}
}
Regards,
Chinna